Release 0.18.3

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Release 0.18.3

Herby Vojčík
Hi there!

I released version 0.18.2.

Biggest change: TRAITS!

They actually work, but read the caveats below:

   - `uses: TFoo + TBar` DOES NOT work. Use `uses: {TFoo. TBar}`
   - `uses: TFoo @ {#bar -> #baz} - #(quux)` DOES work
     - but only applied to trait itself, not to the whole composition
   - changing `uses: ...` of existing classes / traits DOES work and
updates all that is needed
   - changing / adding / deleting trait method DOES work and things are
updated all way down
   - methods from traits are shown in both IDEs by appending ` (TFoo)`
     - they are not protected in any way, though, so
       - deleting them may delete the method in trait
       - editing and/or saving them saves method locally
         - deleting it uncovers trait one again
     - aliased methods are tricky, to use them is safe, but do play with
them in IDE may bring strange results
   - There is NO classTrait. Traits have only instance-side.
     - OTOH, you can add `uses:` to metaclass directly. It just needs to
be in a trait of its own.
   - create traits by editing class definition pane (in both legacy and
Helios) to be `Trait named: #TFoo [uses: ...] package: '...'`
   - after traits are created, Helios DOES NOT show them. Click to
different package, then click back to see it.
     - In other situations, Helios may behave similarly. Just click away
and click back.
   - deleting traits in Helios via Ctrl+sp,x,c DOES work.
   - moving traits to different package using Helios menu as well as
editing package in definition DOES work.
   - copying traits via Helios menu DOES NOT work.
   - renaming traits via Helios menu should be working (but users are
not updated).
   - traits are NOT used yet in the system nor any library
     - 0.19.0 will be move to use traits internally, as well as other
libs' newer releases
   - there are no tests :-/ but I feel safe enough to use traits anyway

Kernel was changed because of traits a bit. Former boot.js is now split
in three files kernel-fundamentals.js, kernel-language.js and
kernel-runtime.js; boot.js just glues them and initializes Amber.

Also, #asJSON was deprecated in favour of #asJavaScriptObject (and
pretty internal #asJavascript in favour of #asJavaScriptSource).


   npm -g install amber-cli

to be able to create new projects with `amber init` that use new version.

More on the changes in:


As for upgrade of existing project, it's always the pain point. I'd like
to have functionality similar to `react-native upgrade`. In the
meantime, you can simulate in general way by doing `amber init` in
separate directory, supply same values as in old project, then copy
files back and use diff to sort things out.


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.