summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Support minimal coverage validation in testsFred Hebert2017-12-022-15/+92
| | | | | | | | | | | | | | | | Adds an option (-m, --min_coverage, or {cover_opts, {min_coverage,X}}) to the 'cover' command, where the value is an integer between 0 and 100. If the total coverage during the analysis is below the value received, the command will fail with output like: ===> Requiring 64% coverage to pass. Only 62% obtained If the rate is correct, the command silently passes as it currently does. This feature allows to enforce code coverage standards in a project if desired.
* Merge pull request #1672 from ferd/ct-retry-reduxFred Hebert2017-11-242-4/+178
|\ | | | | Add experimental support for ct --retry option
| * Add experimental support for ct --retry optionFred Hebert2017-11-242-4/+178
|/ | | | | | | | | | | | | | | | | This commit adds a common test hook along with the cth_readable stuff whose role is to track failing test cases, and create a test specification out of them. The test specification is dumped on disk at _build/<profile>/logs/retry.spec and can be accessed by calling 'rebar3 ct --retry'. This will auto-load the spec file if it can be found and re-run the failing cases. If any other argument is found on the list specifying tests, the '--retry' argument is ignored. All code for this is marked as experimental in case we end up (keeping and then) dropping the feature.
* Merge pull request #1671 from erlang/revert-1670-ct-retryFred Hebert2017-11-242-184/+5
|\ | | | | Revert "Add experimental support for ct --retry option"
| * Revert "Add experimental support for ct --retry option"Fred Hebert2017-11-242-184/+5
|/
* Merge pull request #1670 from ferd/ct-retryFred Hebert2017-11-232-5/+184
|\ | | | | Add experimental support for ct --retry option
| * Add experimental support for ct --retry optionFred Hebert2017-11-232-5/+184
|/ | | | | | | | | | | | | | | | | This commit adds a common test hook along with the cth_readable stuff whose role is to track failing test cases, and create a test specification out of them. The test specification is dumped on disk at _build/<profile>/logs/retry.spec and can be accessed by calling 'rebar3 ct --retry'. This will auto-load the spec file if it can be found and re-run the failing cases. If any other argument is found on the list specifying tests, the '--retry' argument is ignored. All code for this is marked as experimental in case we end up (keeping and then) dropping the feature.
* Back to git-based versioningFred Hebert2017-11-221-1/+1
|
* Bump to 3.4.7Fred Hebert2017-11-223-3/+3
|
* Merge pull request #1665 from ferd/bump-cth_readable-1.3.2Fred Hebert2017-11-222-3/+3
|\ | | | | Bump cth_readable to 1.3.2
| * Bump cth_readable to 1.3.2Fred Hebert2017-11-202-3/+3
| | | | | | | | Eliminates a lager warning due to config format deprecation
* | Merge pull request #1668 from ferd/fix-make_vsn-custom-resourcesFred Hebert2017-11-221-1/+12
|\ \ | | | | | | Fix compilation for custom resources dynamic vsn
| * | Fix compilation for custom resources dynamic vsnFred Hebert2017-11-221-1/+12
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Erlang compiler runs based on a global state built from currently loaded libraries and the configured code path that is available. For this reason, the rebar3 compiler job unloads all plugin paths before calling the Erlang compiler. However, this causes a problem when an application uses a custom resource handler with a dynamic version in their .app.src file since the plugin that can be used to find the version has been unloaded. Fortunately, the compile phase that runs the version handling is distinct from the phase that uses the Erlang compiler. This patch fixes the problem by re-loading the plugins' paths in memory before generating the .app file, and before unloading them afterwards. It appears that unloading them is unnecessary because the hooks after that will re-load them, but it is likely better to play it safe with that global state and clean up after ourselves. It offers better protection for future changes. Fixes #1657
* | Merge pull request #1667 from ferd/lrascao-profile_dep_countertestFred Hebert2017-11-211-1/+18
|\ \ | | | | | | Fix broken tests
| * | Fix test mocking for profile overridesFred Hebert2017-11-211-2/+4
| | |
| * | Merge branch 'profile_dep_countertest' of https://github.com/lrascao/rebar3 ↵Fred Hebert2017-11-211-0/+15
| |\ \ |/ / / | | | | | | into lrascao-profile_dep_countertest
| * | Profile deps counter testLuis Rascao2017-10-161-0/+15
| | |
* | | Merge pull request #1666 from tsloughter/relx-3.24.3Fred Hebert2017-11-212-3/+3
|\ \ \ | | | | | | | | upgrade relx to 3.24.3
| * | | upgrade relx to 3.24.3Tristan Sloughter2017-11-212-3/+3
|/ / /
* | | Merge pull request #1656 from ferd/unconfuse-debug_infoFred Hebert2017-11-212-6/+60
|\ \ \ | | | | | | | | Make debug_info rules clear
| * | | Make debug_info rules clearFred Hebert2017-11-202-6/+60
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #1664 from liamjjmcnamara/quiet_dep_skippingFred Hebert2017-11-201-2/+7
|\ \ \ | |_|/ |/| | Allow silencing skip warnings when fetching deps
| * | Allow silencing skip warnings when fetching depsLiam McNamara2017-11-201-2/+7
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When fetching deps, if this is a clean repo there will be extensive messages warning that dependencies which have already been fetched are being skipped. For large projects being built and tested in a clean environment this significantly increases the noise level of the build. This modification adds an additional rebar option (deps_warning_on_conflict) that will allow disabling these warning messages. If deps_error_on_conflict is set, an error will still be thrown. This will not change default behaviour of rebar. There is a similar outstanding issue: https://github.com/erlang/rebar3/issues/1105 However this seems to be a push for not outputting warnings when the dep version is the same, rather than disabling warnings altogether.
* | Back to git-based versioningFred Hebert2017-11-171-1/+1
| |
* | Bump to 3.4.6Fred Hebert2017-11-172-2/+2
| | | | | | | | Updates relx (windows fixes) and erlware commons (strings)
* | Merge pull request #1662 from tsloughter/up-ec-1.0.4Fred Hebert2017-11-172-6/+6
|\ \ | | | | | | upgrade relx and erlware commons
| * | upgrade relx and erlware commonsTristan Sloughter2017-11-172-6/+6
|/ /
* | Return to git-based versioningFred Hebert2017-11-171-1/+1
| |
* | Bump to 3.4.5Fred Hebert2017-11-172-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - OTP-21 readiness, Full Unicode support, massive dep upgrade - fixed handling of proxy username and password when fetching registry - git versions from tag made consistent and all strip 'v' prefix - Prevent hard crash on duplicate plugin paths - Fix include paths in profile multiapp edge case - Fix unlock state carry, which broke do sequences with unlock in them. - Avoid guessing on utf8 decoding of app files - Various fixes related to .app files - Warn user when an unsupported local git or hg resource is used - Corrects a fix to src_dir values - Update eunit_formatters to latest version - Changes in wording of warnings for more accuracy
* | Merge pull request #1660 from ferd/otp-21-preparednessFred Hebert2017-11-1629-86/+143
|\ \ | | | | | | OTP-21 readiness, Full Unicode support
| * | OTP-21 readiness, Full Unicode supportFred Hebert2017-11-1629-86/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #1658 from ferd/fix-install-readmeFred Hebert2017-11-161-1/+2
|\ \ \ | | | | | | | | We no longer build the nightlies, just stables
| * | | We no longer build the nightlies, just stablesFred Hebert2017-11-161-1/+2
|/ / /
* | | Merge pull request #1655 from kanyukaaa/masterFred Hebert2017-11-051-1/+2
|\ \ \ | |/ / |/| | fixed handling of proxy username and password when fetching registry
| * | added http option {relaxed, true} when fetching registryAndrey Kanyuka2017-11-051-1/+1
| | |
| * | fixed handling of proxy username and password when fetching registryAndrey Kanyuka2017-11-031-1/+2
|/ /
* | Merge pull request #1654 from tsloughter/strip-vFred Hebert2017-11-021-0/+3
|\ \ | | | | | | git vsn from tag both strip 'v' prefix
| * | git vsn from tag both strip 'v' prefixTristan Sloughter2017-11-021-0/+3
|/ /
* | Merge pull request #1650 from ferd/prevent-crash-on-dup-plugin-pathsFred Hebert2017-11-022-1/+2
|\ \ | | | | | | Prevent hard crash on duplicate plugin paths
| * | Prevent hard crash on duplicate plugin pathsFred Hebert2017-10-202-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a global plugin is used both locally and within the project, there are cases when the rebar3 program will hard crash (killed in do_boot). This has been traced to plugin-handling in compilation, where the same code path may be purged twice in a row without further reloading for the compile operation. This of course yields the result where the code handling on the VM kills all processes holding references to the module in memory, in this case the rebar3 process itself. By deduplicating the paths first, we ensure at most one purge before reloading plugins and paths, and this prevents a hard crash.
* | Merge pull request #1652 from ferd/fix-multiapp-incl-edge-caseFred Hebert2017-11-022-3/+51
|\ \ | |/ |/| Fix include paths in profile multiapp edge case
| * Fix include paths in profile multiapp edge caseFred Hebert2017-10-232-3/+51
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compiling of OTP applications is done by first topographically sorting them according to their dependencies, deps-first. This allows all compilation to take place in order. In the current code, the same logic extends to top-level applications in an umbrella project. Unfortunately, there are cases where this is not going to be true: when an application has extra_src_dirs entries (or additional directories or files) to conditionally compile under some profiles, it may start depending on another top-level application dedicated to that profile for include files. However, such an app will never make it to production and neither will the compilation artifacts that create the dependency. Under that scenario, current rebar3 is unusable. This patch makes it so that the compilation provider instead changes the logic for top-level apps: rather than copying their directories one by one and compiling them in order, it: 1. copies all top-level apps to the build directory so the files are in their proper locations 2. adds the top-level apps to the path (after the global hooks have run, so the existing scope and env has not changed) 3. runs the compilation as usual. Fixes #1651
* Merge pull request #1647 from ferd/fix-unlock-state-carryFred Hebert2017-10-132-7/+13
|\ | | | | Fix unlock state carry, which broke `do` sequences with `unlock` in them.
| * Add tests for unlock state passthroughFred Hebert2017-10-131-2/+5
| |
| * Fixing the carry of unlocksFred Hebert2017-10-131-5/+8
| | | | | | | | | | When composed with 'do', not carrying the unlocks in state may create problems.
* | Merge pull request #1646 from ferd/fix-unicode-app-filesalisdair sullivan2017-10-132-9/+14
|\ \ | |/ |/| Avoid guessing on utf8 decoding of app files
| * Avoid guessing on utf8 decoding of app filesFred Hebert2017-10-132-9/+14
|/ | | | | | | | | Rather than trying one method and then the other, allow the caller to specify the encoding of the expected file. All other schemes are risky and won't work well. Rollback the function's default interface to the binary format in case any plugin used it for non-unicode content, preserving backwards compat.
* Merge pull request #1640 from ferd/app-src-fixesFred Hebert2017-10-084-6/+28
|\ | | | | Various fixes related to .app files
| * Bundle in debug for weak testFred Hebert2017-10-041-0/+3
| | | | | | | | Getting real tired of that nondeterministic set of runs on OSX CI
| * Add a description in compiled app file if undefFred Hebert2017-10-041-1/+13
| | | | | | | | | | Same default value as used in relx and other environments, but as reported in #979 some tools don't like having no description available.