summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Bump to 3.4.6Fred Hebert2017-11-171-1/+1
| | | | Updates relx (windows fixes) and erlware commons (strings)
* Return to git-based versioningFred Hebert2017-11-171-1/+1
|
* Bump to 3.4.5Fred Hebert2017-11-171-1/+1
| | | | | | | | | | | | | | | - 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-1620-46/+89
|\ | | | | OTP-21 readiness, Full Unicode support
| * OTP-21 readiness, Full Unicode supportFred Hebert2017-11-1620-46/+89
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | 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
|/
* 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.
* | Fix include paths in profile multiapp edge caseFred Hebert2017-10-231-3/+16
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-131-5/+8
|\ | | | | Fix unlock state carry, which broke `do` sequences with `unlock` in them.
| * Fixing the carry of unlocksFred Hebert2017-10-131-5/+8
| | | | | | | | | | When composed with 'do', not carrying the unlocks in state may create problems.
* | 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-083-6/+25
|\ | | | | Various fixes related to .app files
| * 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.
| * Normalize return values of app_info dataFred Hebert2017-10-041-4/+11
| | | | | | | | | | | | | | The parsing functions were used inconsistently, and the returned values were bad in some clauses; things only worked because they are never used within rebar3. This ensures the return types are consistent on all clauses.
| * Fix messed up rollback to git versioningFred Hebert2017-10-041-1/+1
| | | | | | | | was still hardcoded to 3.4.4
* | Warn user when a local git or hg resource is usedFred Hebert2017-10-052-0/+28
|/ | | | Those aren't supported and so a warning should be output. Fixes #1003
* Corrects a fix to src_dir valuesFred Hebert2017-09-271-1/+3
| | | | | | | | | | The previous patch at #7c959cc fixed the usage of duplicate values for directories through relative paths, but mistakenly went overboard and dropped the `./` path, which is still fairly common. Similarly for `../". The code is modified to special-case such values and keep the code working.
* Changes word 'transient' to 'transitive' which is what it is supposed to sayJimmy Zöger2017-09-141-1/+1
|
* Bump to 3.4.4Fred Hebert2017-09-101-1/+1
| | | | | | | | - fix sys config merging - Fix relative src_dir specifications to avoid double .app.src file detection - Recompile when include files change in non-default directories
* Merge pull request #1625 from tsloughter/ct-sys-config-mergingFred Hebert2017-09-011-2/+3
|\ | | | | fix sys config merging
| * fix sys config mergingTristan Sloughter2017-09-011-2/+3
| |
* | Merge pull request #1624 from ferd/fix-rel-srcdirsFred Hebert2017-09-011-2/+9
|\ \ | |/ |/| Fix relative src_dir specifications to avoid double .app.src file detection
| * Fix relative src dir specificationsFred Hebert2017-08-301-2/+9
| | | | | | | | | | | | | | | | When fetching src_dir values, some relative paths can be inserted. When deduplicating the paths on the fetch, this fact means that logically duplicate (but literally different) directories can be returned at once. By normalizing the names, duplication bugs can be resolved.
* | Recompile when include files changesuexcxine2017-08-291-2/+3
|/
* Back to git-based versionningFred Hebert2017-08-211-1/+1
|
* Bump to 3.4.3Fred Hebert2017-08-211-1/+1
|
* fix `rebar3 shell` when relx section of rebar.config contains releases with ↵patrick cieplak2017-08-171-0/+3
| | | | independent configurations
* Merge pull request #1603 from ferd/win32-non-ntfs-supportFred Hebert2017-08-171-7/+35
|\ | | | | Support Windows with non-NTFS filesystems
| * Support Windows with non-NTFS filesystemsWilliam H2017-08-101-7/+35
| | | | | | | | | | | | | | | | | | | | | | The code for symlink handling failed whenever a win32 platform with no symlink capability would be detected. This patch is provided by William H from the support ticket at http://www.rebar3.org/v3/discuss/598225c90365bb00144bc07f, which adds detection of failures in non-NTFS scenarios on Win32, and then copies files instead of bailing out. The end result should be appropriate support for such a platform.
* | Merge pull request #1610 from ferd/fix-relx-overlayingFred Hebert2017-08-161-1/+5
|\ \ | | | | | | Fix ordering of overlays and overlay vars in Relx
| * | Fix ordering of overlays and overlay vars in RelxFred Hebert2017-08-151-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically, this impacts profiles. It appears that relx as a whole requires its configuration to be merged in one tuple order (New takes precedence over Old), whereas the overlays require the opposite (Old takes precedence over New) since the operation order on disk is important to work well. This patch reorders overlay values such that the overlay of a profile takes place *after* the basic overlay, ensuring that the profile actions take place after the basic ones; this allows profiles to properly overwrite files as expected (see #1609) This is done while adequately maintaining the order of operations that were required as part of #1563 Overlay vars of profiles are also checked to be working fine, along with a test. This fixes #1247 and #1609
* | | Merge pull request #1605 from ferd/escript-drop-dupe-ebinsFred Hebert2017-08-151-1/+1
|\ \ \ | | | | | | | | Remove duplicate ebins from escripts
| * | | Remove duplicate ebins from escriptsFred Hebert2017-08-101-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the building of escripts, multiple passes are done. Two of them may end up duplicating content: one that gathers all of the beam files that will be needed for the app to work, and a second one that goes over the ebin/ directory of the root application to grab all the stuff in there, prior to the run. This allows to grab whatever could be required for runtime without breaking the rest (or so I think), and sticks them at the front of the archive, where it needs to sit for things to work fine. Whenever the ebin/ directory contains a pre-compile .beam file, it gets fetched both from the first pass described and the latter one. This results in duplicate entries in the resulting zip files used for the escript and makes the executable larger than it needs to be. The patch is a simple 1:1 removal of duplicate values. Since large pre-populated ebin/ directories are pretty rare, this should not be too costly for the vast majority of users. Fixes #1577
* | | Merge pull request #1604 from vitorenesduarte/total_coveragealisdair sullivan2017-08-151-26/+18
|\ \ \ | |_|/ |/| | Fix total coverage
| * | Fix coverage percentage on modules with 0 lines to be coveredVitor Enes Duarte2017-08-101-1/+1
| | |
| * | Fix total coverageVitor Enes Duarte2017-08-101-26/+18
| |/
* | Clarify function to normalise profile pairsFred Hebert2017-08-131-13/+25
| |
* | Fix recursive profile merging in umbrella appsFred Hebert2017-08-112-3/+19
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge pull request #1596 from ferd/local-apps-override-depsFred Hebert2017-08-092-7/+29
|\ | | | | Allow top-level apps to take precedence over deps
| * Allow top-level apps to take precedence over depsFred Hebert2017-08-052-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use case has been described in issue #1478 where a local application can exist while being declared as a dependency as well. This allows, for example, to work on a release where all applications may require to be published independently, or to provide some form of 'vendoring' with a local app. The fix is done by decoupling the dependency source resolution form the dependency parsing. The reason for this being that the discovery phase needs to parse apps for their top-level deps, and dep installation needs to resolve the packages with accuracy. In the current implementation, both code paths call to the same function. This patch splits up the precise discovery and makes it happen *only* when installing dependencies, and only if a top-level app does not already define the application needing resolving. One weakness of this fix is that it necessarily breaks cycle detection in dependencies that involve a root application depending on itself since its own version as a dep will not be expanded. There appears to be no possible way to prevent this, but should be rare enough to be worth the tradeoff for the common case.
* | Unicode support in all the placesFred Hebert2017-08-0647-413/+433
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done through 3 main change groups: - replacing `~s` by `~ts` in format strings, so that strings that contain unicode are properly printed rather than crashing - adding the `unicode` argument to all function of the `re` module to ensure transformations on strings containing unicode data are valid instead of crashing (see issue #1302) - replacing `ec_cnv:to_binary/1` and `ec_cnv:to_list/1` with matching functions in `rebar_utils`. The last point has been done, rather than modifying and updating erlware commons, because binary and list conversions can be a contentious subject. For example, if what is being handled is actually bytes from a given binary stream, then forcing a byte-oriented interpretation of the data can corrupt it. As such, it does not appear safe to modify erlware commons' conversion functions since it may not be safe for all its users. Instead, rebar3 reimplements a subset of them (only converting atoms and chardata, ignoring numbers) with the explicit purpose of handling unicode string data. Tests were left as unchanged as possible. This may impact the ability to run rebar3's own suites in a unicode path, but respects a principle of least change for such a large patch.
* | Don't crash when determining the source of undefined functions in stripped ↵Guilherme Andrade2017-08-051-4/+13
|/ | | | | | | | | | modules This can be reproduced by running xref analysis against a rebar3 plugin project which doesn't list rebar3 as an explicit dependency -- calls to certain bundled modules ('rebar_state', 'rebar_api', 'ec_cnv', ...) will result in a failed pattern match as these modules appear to have had their abstract code stripped.
* Fix cleanup_code_path for xref compile hookMikhail Kalashnikov2017-07-261-1/+2
|
* [#149002995] fix flipped variablesSam Sawan2017-07-171-5/+6
|
* [#149002995] stop eating edoc path configSam Sawan2017-07-171-6/+5
| | | | | | be a little smarter when generating edocs; loof for some sort of doc path and then replace w/e was there with the updated doc paths
* Back to git-based versioningFred Hebert2017-07-141-1/+1
|
* Bump to 3.4.2Fred Hebert2017-07-141-1/+1
|