summaryrefslogtreecommitdiff
path: root/test/rebar_profiles_SUITE.erl
Commit message (Collapse)AuthorAgeFilesLines
* Fix precedence rules of erl_opts for test profileFred Hebert2018-04-201-0/+32
| | | | | | | | | | | | | | When adding the 'TEST' macro to the test profile, we mistakenly sourced the erl_opts values from the base profile rather than the test profile itself. This means that in cases where the base profile set an option such as 'no_debug_info' and a profile overrode it with 'debug_info', the default options would get injected within the test profile, and broke the precedence rules, yielding incompatible values. This patch fixes things by adding the macro to the values sourced from the test profile itself, fixing the issue.
* sort-as: bar profile specializes dep "b" into a version anterior to what ↵Pierre Fenoll2018-03-021-1/+1
| | | | test profile wants
* Revert "sort-as: show issue more clearly"Pierre Fenoll2018-03-021-16/+3
| | | | This reverts commit 4ad1db97336a3ac070880876ada07d4c7b769327.
* sort-as: show issue more clearlyPierre Fenoll2018-03-021-3/+16
|
* Make debug_info rules clearFred Hebert2017-11-201-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current rebar3 uses debug_info rules where debug_info is added by default, and no_debug_info prevents the default from being added, and removes any explicit debug_info, if any. The problem is that if 'no_debug_info' is anywhere in the config for a run, it cannot be removed even with other profiles. additionally, no_debug_info ignores special tuples like {debug_info, {Mod, Data}} and {debug_info_key, Key}, which can be used to add debug info and encrypt it (in lieu of plain debug_info) respectively. This patch makes it so that the following rules are in place: - the last option seen takes priority, allowing profile overrides by the ordering rules the compiler expects - the overriden options shall be explicitly deleted to avoid confusing the compiler - any option related to debug info seen last cancels any no_debug_info that preceded it - any no_debug_info option seen last cancels all of the other debug_info options - if debug_info is seen last, it cancels out {debug_info_key, Key} - if {debug_info_key, Key} is seen last, it cancels out debug_info - All other options are left untouched in that context (defines can still be expanded and so on) This should allow proper profile rules to be followed. Note that erl_opt profile merging puts precedence on the *last* element of a list, to match the compiler.
* OTP-21 readiness, Full Unicode supportFred Hebert2017-11-161-1/+1
| | | | | | | | | | | | This replaces all deprecated function usage by alternative ones based on a version switch enacted at compile time, preventing all warnings. This will likely introduce some possible runtime errors in using a Rebar3 compiled on OTP-20 or OTP-21 back in versions 19 and earlier, but we can't really work around that. A bunch of dependencies have been updated to support OTP-21 without warnings as well.
* Fix recursive profile merging in umbrella appsFred Hebert2017-08-111-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a config file exists at the root of a project, defines a given configuration value for a given profile, and that a sub-application (umbrella app) also has the same profile defined with the same key (but different values), the configuration values of the sub-application's profile would get silently dropped. The problem being that when the function to merge profiles is applied recursively, it is applied to each profile (so it will merge on the keys test, prod, etc.) rather than to each of the values of each profile. This patch reworks the profile merging so that the current behaviour is respected overall (a profile cannot be cancelled by a subdep's non-existant profile since its value should have been ignored), but ensures that sub-deps' profiles are otherwise applied recursively with the proper rules: - dependencies favor prior values - plugins favor new values - erl_first_files combine the lists - relx uses the tuple merge algorithm - erl_opts has its own custom merge as well - otherwise the new value takes precedence A test has also been added. There is a risk of breakage in some applications that may have relied on the buggy behaviour to work, though at this time we are aware of none of them.
* Add tests for the first_files profile mergesFred Hebert2017-05-111-2/+23
|
* Added regression tests for PR 1398Ted Burghart2016-12-051-2/+102
|
* Revert "define the 'EUNIT' macro in the test profile"alisdair sullivan2016-03-031-10/+4
| | | | This reverts commit 4c32c52b557c66ac6e6764efb1ed9135c00a3c20.
* define the 'EUNIT' macro in the test profilealisdair sullivan2016-03-031-4/+10
|
* inject `eunit_compile_opts`, `eunit_first_files` and `TEST` macroalisdair sullivan2015-09-291-2/+2
| | | | prior to running compile and compile prehooks
* remove state record from app_info recordTristan Sloughter2015-08-311-2/+1
|
* Add tests for mixed deps installsFred Hebert2015-08-161-5/+10
| | | | | Requires a rework of other test suites using the same dep-handling mechanism.
* Adding directory path test for deduplicationFred Hebert2015-05-041-0/+18
|
* Merge branch 'master' into app-discover-profile-duplicationViacheslav V. Kovalev2015-05-011-3/+42
|\ | | | | | | | | Conflicts: test/rebar_profiles_SUITE.erl
| * R15 support, replace unsetenv with putenv empty stringTristan Sloughter2015-04-221-1/+1
| |
| * fix tracking of all profiles dep pathsTristan Sloughter2015-04-221-2/+37
| |
| * real bootstrappingTristan Sloughter2015-04-221-1/+1
| |
| * track and cleanup code paths for different contextsTristan Sloughter2015-04-211-3/+8
| |
* | Implement opts umerge deduplicationViacheslav Kovalev2015-04-221-6/+48
| |
* | Implement some test on profiles deduplicationViacheslav V. Kovalev2015-04-221-0/+91
|/
* add a more direct way to generate an `eunitized` test app toalisdair sullivan2015-03-241-4/+4
| | | | test utils and add better eunit tests
* Preserve profile order on mergeable tuple/optsFred Hebert2015-03-221-2/+9
| | | | | | | | | | | Rather than using the stdlib lists:umerge, we expand it to allow fuzzy matching on tuples vs. vals (`key` vs. `{key,val}`) with an overriden sort order so that two tuples or values comparing equal get a priority on the newest profile. This is a partial fix for #287 -- this current patch should be followed by a relx update to take options in order (as if they were a proplist) to complete it.
* store base opts after initialization of providersTristan Sloughter2015-03-061-4/+16
|
* add test for test profile applied to project appsalisdair sullivan2015-03-051-2/+24
|
* two failing tests and one passing test to attempt to isolate wherealisdair sullivan2015-03-051-2/+48
| | | | | | profiles are failing to be applied relevant to #224 and #233
* fix for profiles_remain_applied_with_config_presentTristan Sloughter2015-03-041-3/+25
|
* `add_to_profile/3` function added to `rebar_state`alisdair sullivan2015-03-021-2/+25
|
* don't replace non-string list with empty list in profile mergeTristan Sloughter2015-03-021-2/+10
|
* profiles: combine lists of values for conflicting config optionsTristan Sloughter2015-02-241-2/+20
|
* basic profile deps testsTristan Sloughter2015-02-221-0/+82