summaryrefslogtreecommitdiff
path: root/src/rebar_compiler_erl.erl
Commit message (Collapse)AuthorAgeFilesLines
* Fix Parallel CompilationFred Hebert2019-03-291-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | This patch does two things: 1. it broadens the interface for the compiler module so that non-first-file modules can possibly be parallelized. This is done by dynamically switching on `[ListOfFiles]`, which remains sequential as before, or `{[SeqPriority], [Parallel]}`, which divides regular files between higher priority ones and those that can be in parallel 2. implements this mechanism in the rebar compiler, based on the erl file digraph. If a file has an in-neighbour, it is depended on by another file. The mechanism therefore makes it so all files that have dependants get compiled in their strict relative sequential order first, and then the undepended-on files get compiled together in parallel. By running: ./rebar3 ct --suite test/rebar_compile_SUITE.erl --case \ recompile_when_parse_transform_inline_changes --repeat 50 the previous iteration of this would rapidly fail, and this one succeeds every time.
* Fix performance regression in compilerFred Hebert2019-01-231-1/+1
| | | | | | | | | | | | | | | | | | When the commit at https://github.com/erlang/rebar3/commit/8c4a74a3ed9ddd9841e6596ca86b81f3d43906c0 introduced a recursive search for build elements, it accidentally did so using a function that accepts a regex for its match. In doing so, if a behaviour or include had a name such as `common_prefix` and that multiple other modules used the name `common_prefix_<rest_of_name>`, all the other files would be seen as dependencies to be checked in a directed graph. This resulted in continuous re-checking of files that kept depending on each others and blew the compile time up exponentially. By using a delimitation on the regex (^<modulename>$), the build comes back down to finding only the right files and becomes fast again.
* search subdirectories as well for imports/transforms/behavioursTristan Sloughter2018-11-251-10/+1
|
* check last modified time on erl files for xrl and yrl files before compilingTristan Sloughter2018-11-091-2/+2
|
* compiler behaviour (#1893)Tristan Sloughter2018-10-051-0/+368
* add compile type for dynamic project compilation * new rebar_compiler abstraction for running multiple compilers rebar_compiler is a new behaviour that a plugin can implement to be called on any ues of the compile provider to compile source files and keep track of their dependencies. * fix check that modules in .app modules list are from src_dirs * use project_type to find module for building projects * allow plugins to add project builders and compilers