Skip to content
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

Merged
merged 9 commits into from
Apr 11, 2020
Merged

Track build artifacts in DAG #2246

merged 9 commits into from
Apr 11, 2020

Conversation

ferd
Copy link
Collaborator

@ferd ferd commented Mar 12, 2020

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

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.
ferd and others added 7 commits March 12, 2020 01:24
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.
Copy link
Collaborator

@tsloughter tsloughter left a 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.

@ferd
Copy link
Collaborator Author

ferd commented Apr 3, 2020

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.
@ferd ferd merged commit b639fca into erlang:master Apr 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants