summaryrefslogtreecommitdiff
path: root/src/rebar_prv_install_deps.erl
Commit message (Collapse)AuthorAgeFilesLines
* only print skip warning if version is different (#1886)Tristan Sloughter2018-09-171-6/+18
|
* support for hex v2, multiple repository fetching, private organizations (#1884)Tristan Sloughter2018-09-131-44/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * update to hex_core for hex-v2 repo support (#1865) * update to hex_core for hex-v2 repo support This patch adds only single repo hex-v2 support through hex_core. Packages no longer filtered out by buildtool metadata and the package index is updated per-package instead of fetched as one large ets dump. * tell travis to also build hex_core branch * support list of repos for hex packages (#1866) * support list of repos for hex packages repos are defined under the hex key in rebar configs. They can be defined at the top level of a project or globally, but not in profiles and the repos configured in dependencies are also ignored. Searching for packages involves first checking for a match in the local repo index cache, in the order repos are defined. If not found each repo is checked through the hex api for any known versions of the package and the first repo with a version that fits the constraint is used. * add {repos, replace, []} for overriding the global & default repos * add hex auth handling for repos (#1874) auth token are kept in a hex.config file that is modified by the rebar3 hex plugin. Repo names that have a : separating a parent and child are considered organizations. The parent repo's auth will be included with the child. So an organization named hexpm:rebar3_test will include any hexpm auth tokens found in the rebar3_test organization's configuration. * move packages to top level of of hexpm cache dir (#1876) * move packages to top level of of hexpm cache dir * append organization name to parent's repo_url when parsing repos * only eval config scripts and apply overrides once per app (#1879) * only eval config scripts and apply overrides once per app * move new resource behaviour to rebar_resource_v2 and keep v1 * cleanup use of rebar_resource module and unused functions * cleanup error messages and unused code * when discovering apps support mix packages as unbuilt apps (#1882) * use hex_core tarball unpacking support in pkg resource (#1883) * use hex_core tarball unpacking support in pkg resource * ignore etag if package doesn't exist and delete if checksum fails * add back tests for bad package checksums * improve bad registry checksum error message
* 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.
* Merge pull request #1596 from ferd/local-apps-override-depsFred Hebert2017-08-091-6/+20
|\ | | | | Allow top-level apps to take precedence over deps
| * Allow top-level apps to take precedence over depsFred Hebert2017-08-051-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-061-13/+13
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge pull request #1391 from ferd/doc-and-typesFred Hebert2016-12-231-1/+8
|\ | | | | Type specifications and edocs improvements
| * Type specifications and edocs improvementsFred Hebert2016-11-271-1/+8
| | | | | | | | | | | | Includes improvments and function documentation for all modules (in alphabetical order) up to rebar_core, and may have included more in other modules as I saw fit to dig and understand more of the internals.
* | Replace unprocessed ~n linebreaksFred Hebert2016-11-281-2/+2
|/ | | | Fixes #1392
* Hide the expected hash on fetch outputFred Hebert2016-05-251-1/+5
|
* break up do/1 function in install_deps to make upgrade less confusingTristan Sloughter2016-02-191-2/+6
|
* only apply default and prod profile to dependenciesTristan Sloughter2016-01-091-3/+2
|
* include source the app is being ugpraded to, like with fetching, in infoTristan Sloughter2015-09-201-1/+1
|
* fix dialyzer warningsTristan Sloughter2015-09-091-1/+1
|
* hooks/artifacts are always run/resolved from an app unless at top of umbrellaTristan Sloughter2015-09-061-1/+1
|
* move otp version verification to a single app_info functionTristan Sloughter2015-09-011-2/+2
|
* remove overrides element from state recordTristan Sloughter2015-09-011-2/+2
|
* more cleanupTristan Sloughter2015-08-311-5/+6
|
* fixes for overrides of depsTristan Sloughter2015-08-311-4/+3
|
* update use of hooks and plugins with state in app_infoTristan Sloughter2015-08-311-3/+3
|
* build on already created AppInfo instead of having to do copyTristan Sloughter2015-08-311-33/+10
|
* remove state record from app_info recordTristan Sloughter2015-08-311-3/+3
|
* wip: move state into app_infoTristan Sloughter2015-08-311-16/+17
|
* Merge pull request #748 from tsloughter/pkg_attributeFred Hebert2015-08-271-16/+10
|\ | | | | support pkg attribute on dep to declare package name different from app name
| * simplify package dep parsing and handlingTristan Sloughter2015-08-251-16/+10
| |
| * support pkg attribute on dep to declare package name different from app nameTristan Sloughter2015-08-231-2/+2
| |
* | add error message for dependency that doesn't contain single app dirTristan Sloughter2015-08-231-10/+16
|/
* improve error messages for packages by checking its existance before fetchingTristan Sloughter2015-08-231-0/+2
|
* replace use of dict of packages and registry with single ets tableTristan Sloughter2015-08-211-23/+16
|
* this patch treats pkg and src deps as equals, so level decides winnerTristan Sloughter2015-08-211-310/+85
| | | | | | | | Instead fetching and resolving src deps (which could depend on pkg deps) and then pkg deps this patch combines the two into a single set of iterations by level. The only difference between src and pkg deps in this new install_deps is how their deps list is found -- from the config or lock file for src deps and from the neighbors of the vertex for pkg.
* fix leaking hex_registry tablepvmart2015-08-191-2/+3
|
* properly update locks for deps and ignore skip messages for locksTristan Sloughter2015-08-171-29/+16
|
* remove commented out codeTristan Sloughter2015-08-171-3/+0
|
* use correct rebar_state for a dep, not the top level stateTristan Sloughter2015-08-161-10/+1
|
* handle new tests for mix package types (git/pkg)Tristan Sloughter2015-08-161-2/+5
|
* track the parent of umbrella app dependenciesTristan Sloughter2015-08-161-5/+17
|
* track parent app of deps and add tree provider to display the relationsTristan Sloughter2015-08-151-48/+63
|
* install package deps in same level/profile order as src depsTristan Sloughter2015-08-131-45/+40
|
* fix dialyzer warnings, except 'no local return' warningsTristan Sloughter2015-08-081-23/+9
|
* add tree option to deps command that prints pkg deps treeTristan Sloughter2015-08-031-2/+2
|
* keep correct Level for pkg deps of scm depsTristan Sloughter2015-08-011-8/+9
|
* Merge pull request #655 from pvmart/masterTristan Sloughter2015-07-261-3/+0
|\ | | | | Fix duplicate function clause in rebar_prv_install_deps:parse_dep/5
| * Fix duplicate function clause in rebar_prv_install_deps:parse_dep/5pvmart2015-07-261-3/+0
| |
* | add support for old format otp versionsTristan Sloughter2015-07-251-0/+3
|/
* Tidy up "Linking.." messages during compileRichard Jones2015-07-221-5/+17
| | | | | | | | | | | | Linking message will only be printed the first time the link or copy actually happens. Note: rebar_file_utils:symlink_or_copy will now return 'exists' instead of ok, if it did nothing because the link exists. Nothing was checking the return value yet, so seemed reasonable.
* do not install profile deps of depsTristan Sloughter2015-07-181-1/+1
|
* pass failing upgrade case where levels are increasedTristan Sloughter2015-07-081-29/+16
|
* Minor refactorsFred Hebert2015-07-021-23/+37
|
* wip: deps install refactorFred Hebert2015-07-021-93/+75
|
* expand plugins for profile after applying profilesTristan Sloughter2015-06-261-4/+3
|