Smalltalk Package Dependencies

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Smalltalk Package Dependencies

Sean P. DeNigris
Administrator
If MyPackage has:
  MyClass>>launchExample
    Counter tryExample
... it would be really useful for MyPackage.js to be updated from:
  define("amber-myproject/MyPackage", ["amber/boot", "amber_core/Kernel-Objects"]...
... to:
  define("amber-myproject/MyPackage", ["amber/boot", "amber_core/Kernel-Objects", 'amber_core/Examples']...

If the dependency on 'amber_core/Examples' was automatically added, we would save updating two places - index.html's require([...]) and app.build.js. This also feels right, since MyPackage.js is an amd module, right? If I copy paste it into another Amber project, it would just keep working vs. having to then update that project in two places, etc...

What do you think?
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk Package Dependencies

Herby Vojčík
Impossible because the way Smalltalk is packaged. The use-dependencies may be (and are) cyclical, in addition you cannot "autodiscover" all the dependencies because you may need a package for its extebsion methods even if you do not use any class from it.

Load-deoendencies, OTOH, must be obeyed and can be autodiscoved, so they are, naturally, used to fill define dependency list.

What I want to have, though, is ability for a package to explicitlt declare its addituonal dependencies (though I see it useful mainly for non-Amber dependencies - like telling Web to depend on jquery and remove it from amber itself).

Herby

"Sean P. DeNigris" <[hidden email]>napísal/a:

>If MyPackage has:
>  MyClass>>launchExample
>    Counter tryExample
>... it would be really useful for MyPackage.js to be updated from:
>  define("amber-myproject/MyPackage", ["amber/boot",
>"amber_core/Kernel-Objects"]...
>... to:
>  define("amber-myproject/MyPackage", ["amber/boot",
>"amber_core/Kernel-Objects", 'amber_core/Examples']...
>
>If the dependency on 'amber_core/Examples' was automatically added, we would
>save updating two places - index.html's require([...]) and app.build.js.
>This also feels right, since MyPackage.js is an amd module, right? If I copy
>paste it into another Amber project, it would just keep working vs. having
>to then update that project in two places, etc...
>
>What do you think?
>
>
>
>-----
>Cheers,
>Sean
>--
>View this message in context: http://forum.world.st/Smalltalk-Package-Dependencies-tp4770444.html
>Sent from the Amber Smalltalk mailing list archive at Nabble.com.
>
>--
>You received this message because you are subscribed to the Google Groups "amber-lang" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.