Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project loading sequence and dependencies - how to correctly manage them in JfP and/or Rowan? #217

Open
tukanos opened this issue Feb 10, 2025 · 5 comments

Comments

@tukanos
Copy link

tukanos commented Feb 10, 2025

Hi @ericwinger , @dalehenrich ,

Again I'm unsure what project (Rowan, JfP or projects/libraries) is having a bug. Feel free to assign it to correct project.

The issue

  • If I load the BitmapCharacterSet-Core package using BitmapCharacterSet-Core spec. It loads correctly.
  • If I try to load BitmapCharacterSet-Tests package using BitmapCharacterSet-Tests spec afterwards the load ends with an error: a MessageNotUnderstood occurred (error 2010), a UndefinedObject does not understand.

I wanted to load the ...Core package first and then the ...Tests package.

A way to load both components

If I revisit either BitmapCharacterSet- Core or - Tests and edit the componentNames as following:

  #componentNames : [
        'Core',
        'Tests'
  ],

It loads both Packages.

Trying to find a different solution

Now why I tried to separate the Core and Tests packages? On production environment I would like the Core loaded. On testing or development environment you want to have Tests too with the possibility to add tests if new bug was found.

I have tried to understand both Rowan specification and Specification_v2.0.0. I ended up rather confused.

For the first specification contains RwProjectCompoundConfiguration and RwProjectLoadConfiguration (the latter kind of reminds me of baseline(s)). Looks different from the current version as I'm using RwProjectSpecificationV2 and RwLoadSpecificationV2 and no configuration yet.

The second Specification_v2.0.0 contained some code which I could not find in current Rowan version. For example, the RwConfigurationDefinition. The closes match was RwConfiguration - is it the same class or not hard to say.

How does it suppose to work now?

@tukanos tukanos changed the title Loading Project loading sequence and dependencies - how to correctly manage them in JfP and/or Rowan? Feb 10, 2025
@ericwinger
Copy link
Member

Hi @tukanos,

a MessageNotUnderstood occurred (error 2010), a UndefinedObject does not understand.

Can you attach the stack? That will help us determine in which product the problem lies.

@tukanos
Copy link
Author

tukanos commented Feb 11, 2025

Hi @ericwinger ,

Ah, that completely slipped my mind.

The stack:

2025-02-11_1274522_rowanServerStackDump.txt

@dalehenrich
Copy link
Member

@tukanos, please take a look at the project RowanSample9V3 - spec_0002. In that project, conditional attributes that can be set in the load spec at load time to control whether or not tests will be loaded.

You can see that the tests attribute is included in the (default) load spec. I think the cleanest (for you at the moment) solution is to have two load specs defined one with tests attribute present and one without the tests attribute present ... then you can decide which spec to load based on your what you want to do ...

Also notice that the Core component, unconditionally references the Tests component, where the tests attribute is present ... the packages in Tests component will only be loaded if the tests attribute is present in the load spec.

I should warn you that the configuration implementation is schedule to be revamped for 3.0 ... currently specifying complex conditional expressions is more complicated than they need to be :)

I won't deprecate the configure implementation anytime soon and won't until there is a way to convert to the new implementation ...

@tukanos
Copy link
Author

tukanos commented Feb 12, 2025

Thank you @dalehenrich for explaining. I'll have to process it and think about it.

One question concerning conditionals. What does #condition: mean in the compoments (in case of RwSimpleProjectLoadComponentV2)? For example, if I have a #condition : 'common' what does it imply?

@dalehenrich
Copy link
Member

If a component has a #condition, then the packages in the component will be loaded if the condition is present in the #conditionalAttributes of the load spec.

When I referred to "changing the components structure" elsewhere, part of the work will be to use conditional expressions "attached to a package". This approach should make things much easier to work with and understand (I hope) ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants