conditional loading of packages in BaselineOf/ConfigurationOf
Hi, is it possible to specify _natively_ (in the BaselineOf spec itself) a conditional loading of packages? Example usage: I have package with extensions for Calypso, but Calypso is not always loaded, so I want to load the package only if Calypso is present. The ugly way (because it's a hack and you cannot see the condition by looking at the project spec): self environment at: #ClyBrowser ifPresent: [ spec package: 'My-Calypso-Extensions'. ]. The imagined way (or something along the lines): spec package: 'My-Calypso-Extensions' with: [ spec condition: [ self environment includesKey: #ClyBrowser ] ] Is this possible? Or is there some other recommended way how to approach this? Thanks, Peter
On 05/04/2018 09:53, Peter Uhnák wrote:
Hi,
is it possible to specify _natively_ (in the BaselineOf spec itself) a conditional loading of packages?
Example usage: I have package with extensions for Calypso, but Calypso is not always loaded, so I want to load the package only if Calypso is present.
The ugly way (because it's a hack and you cannot see the condition by looking at the project spec):
self environment at: #ClyBrowser ifPresent: [ spec package: 'My-Calypso-Extensions'. ].
The imagined way (or something along the lines):
spec package: 'My-Calypso-Extensions' with: [ spec condition: [Â self environment includesKey: #ClyBrowser ] ]
Is this possible? Or is there some other recommended way how to approach this?
Thanks, Peter
Hi Peter, Maybe this can help you: https://code.google.com/archive/p/metacello/wikis/CustomProjectAttrributes.w... -- Cyril Ferlicot https://ferlicot.fr
participants (2)
-
Cyril Ferlicot D. -
Peter Uhnák