summaryrefslogtreecommitdiff
path: root/src/rebar_core.erl
Commit message (Collapse)AuthorAgeFilesLines
* improved dep handling and add package list taskTristan Sloughter2014-08-241-1/+1
|
* simplify dep download and buildingTristan Sloughter2014-08-231-1/+1
|
* refactoring and remove unused providers for nowTristan Sloughter2014-08-231-1/+2
|
* only build unbuilt depsTristan Sloughter2014-08-181-4/+4
|
* start of moving to splitting state from config parsingTristan Sloughter2014-08-171-41/+12
|
* add rebar update providerTristan Sloughter2014-08-161-2/+2
|
* move back to single command with arguments for comamnd after itTristan Sloughter2014-08-161-3/+3
|
* large refactoringTristan Sloughter2014-08-161-594/+35
| | | | | | | | Removed separate compilers Resolves apps to build Finds avail deps before pulling/building Includes relx Simplifies build commands
* Fix OS X resource fork handling (Reported-by: Richard O'Keefe)Tuncer Ayaz2014-07-251-2/+1
| | | | | | | | | If you happen to fetch a zip archive of the git repo and try to build from that, you may, for example, ask erlc to build src/._rebar.erl. ._* are OS X resource forks and not real .erl files. This may also happen with network filesystems on OS X. To fix that, limit the files compiled by rebar to include only those which start with a letter or a digit.
* Add REBAR to environment before executing hooksTino Breddin2014-06-021-1/+2
| | | | | | | | REBAR will be set to the rebar binary which was executed and runs the builds. Enables the use of the same binary for rebar invocations as part of a pre or post hook like so: ${REBAR} escriptize
* Fix #267 (code path regression)Tuncer Ayaz2014-04-231-43/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the introduction of -r/--recursive, deps were not properly added to the code path when running ct, eunit, etc. To fix that, pass a flag down to process_dir1 and conditionalize execution of the command. This moves the decision into process_dir1 where we can decide to invoke preprocess/2 and postprocess/2 but not execute the command. Without this fix, you'd have to, for example, invoke 'rebar -r ct skip_deps=true', if you wanted to run base_dir's ct suites with deps on the code path (while skipping all non-base_dir ct suites). So, with this patch applied, if you run $ rebar ct deps will be on the code path, and only base_dir's ct suites will be tested. If you want to test ct suites in base_dir and sub_dirs, you have to run $ rebar -r ct skip_deps=true If you want to test ct suites in all dirs, you have to run $ rebar -r ct The fix is not specific to ct and applies to all commands. To be able to add inttest/code_path_no_recurse/deps, I had to fix .gitignore. While at it, I've updated and fixed all entries.
* rebar_core: consistently order args and simplify codeTuncer Ayaz2014-04-201-59/+55
| | | | | | | | | | | | | * Fix arg order: The order of arguments got inconsistent over time. To fix that, use the same consistent order in all functions. * Avoid one erlang:'++'/2 call in process_dir/6. * Avoid lists:prefix/2 and atom_to_list/1 calls: We can easily avoid 2 lists:prefix/2 calls and one atom_to_list/1 call in execute/5 by passing in whether the command is a hook or not. The resulting code is simpler and easier to read.
* Fix 'rebar generate' regression (#253)Tuncer Ayaz2014-03-301-1/+21
| | | | | | | | | | If the directory we're about to process contains reltool.config[.script] and the command to be applied is 'generate', then it's safe to process. We do this to retain the behavior of specifying {sub_dirs, ["rel"]} and have "rebar generate" pick up rel/reltool.config[.script]. Without this workaround you'd have to run "rebar -r generate" (which you don't want to do if you have deps or other sub_dirs) or "cd rel && rebar generate".
* Fix #56 (always-on recursion)Tuncer Ayaz2014-03-111-6/+24
| | | | | | | | | | | | | | | | | | Always-on recursive application of all rebar commands causes too many issues. Recursive application is required for: 1. dealing with dependencies: get-deps, update-deps, and compile of deps right after get-deps or update-deps 2. projects with a riak-like apps/ project structure and dev process The vast majority of projects are not structured like riak. Therefore, moving forward it's best to (by default) restrict recursive behavior to dealing with deps. This commit does that and also adds command line and rebar.config options for controlling or configuring recursion. Also, we introduce two meta commands: prepare-deps (equivalent to rebar -r get-deps compile) and refresh-deps (equivalent to rebar -r update-deps compile). riak-like projects can extend the list of recursive commands (to include 'eunit' and 'compile') by adding {recursive_cmds, [eunit, compile]} to rebar.config.
* Fix regression caused by 252b31f (#90)Tuncer Ayaz2014-01-011-1/+6
|
* rebar_core: minor comment fixTuncer Ayaz2014-01-011-1/+1
|
* rebar_core: fix Dialyzer warning introduced in aa46d85 (#157)Tuncer Ayaz2013-11-261-1/+1
|
* Merge pull request #155 from tuncer/fixesJared Morrow2013-11-261-1/+1
|\ | | | | Fixes for #137 and #142
| * 'current_command' has to be stored in xconfTuncer Ayaz2013-10-161-1/+1
| |
* | Don't badmatch if a path we think we added isn't in the code pathAndrew Thompson2013-10-171-1/+1
| |
* | Don't over-aggressively clean the code path in the presence of lib_dir ↵Andrew Thompson2013-10-161-4/+5
|/ | | | | | | | | | | | | | | | | | | | | | | directives Rebar, when it encounters a lib_dir directive, caches the current code path, adds the libdir(s) and returns the cached copy of the path. When rebar has finished processing that directory, it restores the cached path. This is problematic in the below scenario: /(lib_dir)->G A -> B -> C -> D -> E \-> F -> D -> E When rebar is finished processing B, it restores the code path to what it was before it processed B, removing C, D, E and G from the code path. This means when it comes to process F, neither D or E are in the code path, so any header includes, rebar plugins or parse transforms will not be in the code path. Without the lib_dir directive, rebar does no code path cleanups, so everything works fine. This change makes rebar only remove the explicit lib_dir code paths it added and adds an inttest that replicates the above scenario.
* Address review comments and add inttest for update-depsAndrew Thompson2013-09-301-2/+2
|
* Make update-deps honor apps= and skip_apps=Andrew Thompson2013-09-231-0/+7
| | | | | | | | | | | | Because rebar_core handles skipping apps, we had to specialcase the handling in the case of update-deps because it has to do its own dep handling. The way this was done is not particularly clean, but there currently does not exist another way for a command to signal rebar_core that it doesn't want rebar_core to pay attention to skip_apps. With this change, however, you can update-deps even with local conflicting changes/commits by simply skipping the deps you don't wish to update, or whitelisting he ones you do wish to update.
* Make update-deps traverse deps breadth-first, top-downAndrew Thompson2013-09-201-1/+2
| | | | | | | | | | | | This ensures that deps of deps are updated AFTER the dep listing them is, so that a complicated project with many layers of deps will be updated correctly. Any new deps encountered along the way are also cloned, and THEIR deps are also evaluated. Also added was conflict detection, if a dep has differing versions or source information, inherited from different places, that will be logged at the end of update-deps, along with the origin of each conflicting dep.
* rebar_core: fix consistency issues caused by 252b31fTuncer Ayaz2013-06-241-16/+22
| | | | | | | - refactor plugin dirs code to be simpler and easier to read - use erlang-mode's default (%%) comments for portability/consistency - make sure erlang-mode's indenter is used so that a future whole buffer indent doesn't get messed up
* When expanding lib_dirs, don't crash with 'volumerelative' pathsJuan Jose Comellas2013-06-181-1/+1
|
* Allow the use of absolute paths in the lib_dirs configuration settingJuan Jose Comellas2013-06-181-1/+4
|
* Fix searching for pluginsMotiejus Jakštys2013-05-191-17/+23
| | | | | If a plugin is in a dependency, rebar didn't search for it carefully enough.
* Fix missing call to cwd_predirsDave Smith2013-03-021-2/+2
|
* rebar_core: fix broken indentationTuncer Ayaz2013-02-261-6/+6
|
* rebar_core: remove useless return after ?ABORT callTuncer Ayaz2013-02-261-2/+1
|
* rebar_core: document pre-dirs associationTuncer Ayaz2013-02-261-16/+17
|
* Implement 'rebar help CMD1 CMD2' and extend common 'rebar help' msgTuncer Ayaz2012-12-311-1/+30
| | | | | * allow plugins to print help message for implemented commands * append core rebar.config options to common 'rebar help' message
* Cleanup rebar_core and rebar_erlc_compilerTuncer Ayaz2012-11-151-15/+16
| | | | | Rename rebar_core functions for improved readability. Remove redundant comments and blank lines.
* Fix rebar_core:restore_code_path (Reported-by: Siri Hansen)Tuncer Ayaz2012-08-091-1/+3
| | | | | Use erl_prim_loader:read_file_info instead of filelib:is_file to make sure paths inside the escript archive are handled properly.
* Only print absolute filename if not in base_dirTuncer Ayaz2012-08-051-4/+1
|
* Refactor setup_env rebar_config funsTuncer Ayaz2012-08-041-5/+5
|
* Fix R13B03 build (Reported-by: Sergey Nartimov)Tuncer Ayaz2012-07-281-4/+4
|
* Do not use application:set_envTuncer Ayaz2012-07-231-10/+9
|
* Document rebar_config TODOsTuncer Ayaz2012-07-131-0/+1
|
* Make sure cached setup_envs are resetTuncer Ayaz2012-07-131-3/+7
|
* Remove shared stateTuncer Ayaz2012-07-131-129/+114
|
* Manually report errors/warnings with absolute pathTuncer Ayaz2012-06-111-22/+2
|
* Fix whitespace errorsTuncer Ayaz2012-06-081-6/+10
|
* Introduce -k flagDave Smith2012-06-081-23/+39
|
* Remove ?FAIL in favor of ?ABORTDave Smith2012-06-081-2/+2
|
* Simplify and fix check if enter/leaving should be printedTuncer Ayaz2012-05-181-6/+1
|
* Do not print entering/leaving message if skip_dirTuncer Ayaz2012-05-181-6/+13
|
* Add support for target-specific port optionsTuncer Ayaz2012-04-161-34/+44
| | | | {port_specs, [{".*", "priv/foo.so", ["c_src/foo.c"], [{env, []}]}]}.
* Fix typo in comment (thanks Michael Santos)Tuncer Ayaz2012-04-161-1/+1
|