-
Notifications
You must be signed in to change notification settings - Fork 519
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
Track build artifacts in DAG #2246
Conversation
This allows to do quicker re-compile option validation by not requiring to access the disk and check all candidate erlang files for option changes. This also opens up the way to compilers that produce more than one artifact per file.
The propagation was confusing source files and artifacts; the artifact ordering was flipped, and the tagging non-mandatory (aside from as edges), which made things hard to identify when plugins for compilers are used.
now all sources have at least one edge with 'artifact' label, let's ignore it when choosing whether to compile in parallel or sequentially
Also fixes artifacts left on filesystem, and produces less filelib:last_modified() checks.
fix parallel compilation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't do a great review but did scan through it and the test. I'll play with this stuff more when I'm working full time on relx/rebar3 again soon but this should get merged before that.
Yeah part of it there is that this should sooner or later let me (in the next phase) go in and drop some of the beam file reading that is taking place to instead rely on the artifact tracking in the DAG. I think @max-au had a few optimizations he wanted to add on top of it, but ended up digressing into rewriting a minimal form of his own compiler there; we'll re-sync sooner or later to get to a more steady state. |
- topsort of an app does a full analysis of all apps to come up with their app-level DAG - each extra_src_dir has its own analysis run - each extra_src_dir run is simulated as being an app - we therefore end up doing a lot of useless analysis for single app runs This patch notes runs with 1 or 0 apps and skips doing the topsort analysis on them, which speeds things up further.
This allows to do quicker re-compile option validation by not requiring
to access the disk and check all candidate erlang files for option
changes. This also opens up the way to compilers that produce more than
one artifact per file.
This is not exactly optimal on all fronts but should still be faster than the old thing.
Related to #2200