RE: Problem in resolution phase
"Goldsack, Patrick" <[email protected]> Thu, 10 Nov 2005 16:27:49 -0000
| Newsgroups | gmane.comp.java.smartfrog.devel |
|---|---|
| Message-ID | <[email protected]> |
Gustavo,
This was fixed a few months ago (in August, so it is in the September release). Not strictly a bug fix, more a subtle change in the semantics of link resolution to make it more natural and easy to understand (and to prepare the language for some soon-to-be released extensions to do constraint resolution). It is unlikely to have an impact on originally valid usages, it is these oddities that are improved.
Why oddity? Well what you are doing is considered somewhat "dangerous", in that you are triggering a function evaluation in a component that is not contained in sfConfig. The new semantics handles this better.
The latest reference manual covers the link resolution semantics in some detail - I would encourage you to move over to the latest release (or perhaps wait a few days as we are about to make another...)
Patrick
-----Original Message-----
From: smartfrog-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:smartfrog-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Gustavo Wagner D Mendes / Pos. COPIN
Sent: 10 November 2005 13:33
To: smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [Smartfrog-developer] Problem in resolution phase
Hello all.
We have a doubt about the resolution phase. Looking at these 2 component definitions below, is there any clear problem? When we try to parse the component1.sf, the following error occurs:
ERROR
'/local/gustavo/applications/workspace/ServiceProfile/src/org/ourgrid/serviceprofile/teste/testeResolution/component1.sf':
SmartFrogCompileResolutionException:: Unresolved Reference, data: [basedir in:
HERE sfConfig:home], source: HERE sfConfig, resolutionPhase: link
We have an explanation, but we don't know if this error should occur. First, the Component1 has a link reference to the Component2:home. In the Component2:home definition, there is a local variable ( local to Component2 ) named "basedir". The parser tries to copy the "home" variable from Component2 to Component1. But, in Component1, there is not the "basedir" variable. So, the error occurs. Should this happen?
Thank you,
Gustavo and Alisson
===== component1.sf =====
#include "org/smartfrog/components.sf"
#include "org/smartfrog/functions.sf"
#include "org/ourgrid/serviceprofile/teste/testeResolution/component2.sf"
Component1 extends {
home ATTRIB Component2:home;
}
sfConfig extends Component1;
===== component2.sf =====
#include "org/smartfrog/components.sf"
#include "org/smartfrog/functions.sf"
#include "org/smartfrog/sfcore/workflow/components.sf"
Component2 extends {
basedir "/tmp/dir";
home ( basedir ++ "/test/");
}
sfConfig extends Component2;
#############################################
# GUSTAVO WAGNER DINIZ MENDES #
# Graduado pela UFCG #
# Curso: Ciência da Computação #
# Mestrando pela COPIN-UFCG #
# * Integrante do projeto OurGrid #
# Fones: (83)88246910 / 32358355 #
# 33333453 #
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Smartfrog-developer mailing list
Smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/smartfrog-developer
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php