#1012 amberc: find out the dependencies in .st / .js files itself

Open
opened 1 year ago by nero · 1 comments

Originally at 2014-05-18T11:06:10Z by Herbert Vojčík

For the moment, amberc needs to get .st flles in dependency order, otherwise it compiles lots of classes as subclasses of nil; it also needs list libraries in dependency order.

It would be great if the amberc finds out the dependencies itself / uses superclass names lazily / whatever else to be able to just get the list of all files to compile and compile them correctly; the same for .js files containing the libraries.

Implementation ideas: for this to run, .st files should be probably read by different chunk format reader than is there now, which would just parse (and reason on the result) the chunks instead of running them. This way in phase 1 .st files could be examined for classes they define, classes they subclass and classes they extend, and this can be used to create a dependency order in which they can be compiled. As an added value, nil subclass: possibly missing dependency could be correctly detected, not just guessed.

For properly load .js files in dependency order, requirejs would probably need to be used (configured using config.js; extracted into own #1183). This also means, libraries should probably be listed using their full module names (not just by in-Amber package names).

This also means integration of #1071 will probably be easier.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Originally at 2014-05-18T11:06:10Z by Herbert Vojčík For the moment, amberc needs to get .st flles in dependency order, otherwise it compiles lots of classes as subclasses of nil; it also needs list libraries in dependency order. It would be great if the amberc finds out the dependencies itself / uses superclass names lazily / whatever else to be able to just get the list of all files to compile and compile them correctly; the same for .js files containing the libraries. Implementation ideas: for this to run, .st files should be probably read by different chunk format reader than is there now, which would just parse (and reason on the result) the chunks instead of running them. This way in phase 1 .st files could be examined for classes they define, classes they subclass and classes they extend, and this can be used to create a dependency order in which they can be compiled. As an added value, `nil subclass: possibly missing dependency` could be correctly detected, not just guessed. For properly load .js files in dependency order, requirejs would probably need to be used (configured using `config.js`; extracted into own #1183). This also means, libraries should probably be listed using their full module names (not just by in-Amber package names). This also means integration of #1071 will probably be easier. <bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/2214904-amberc-find-out-the-dependencies-in-st-js-files-itself?utm_campaign=plugin&utm_content=tracker%2F79201&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F79201&utm_medium=issues&utm_source=github). </bountysource-plugin>
Herby Vojčík commented 1 year ago
Owner

Important and long overdue.

Important and long overdue.
Sign in to join this conversation.
No Label
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.