summaryrefslogtreecommitdiff
path: root/src/rebar_packages.erl
Commit message (Collapse)AuthorAgeFilesLines
* support for hex v2, multiple repository fetching, private organizations (#1884)Tristan Sloughter2018-09-131-140/+340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Display warnings when cache dirs are read-onlyFred Hebert2018-04-271-1/+6
| | | | | | | This should provide more help to users directly and avoid having them go through opening tickets for help. Fixes #1767
* don't attempt retry of missing packages when updating indexTristan Sloughter2018-02-271-0/+1
|
* rebar_package: do not return first package version for constraint with no matchTristan Sloughter2018-02-261-5/+10
|
* 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.
* Unicode support in all the placesFred Hebert2017-08-061-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* change package version warning to debugTristan Sloughter2017-03-021-2/+2
|
* expect the `missing_package` error to have arity 2 or 3Nathaniel Waisbrot2016-11-231-1/+1
|
* Support package hashes in structure and lockfileFred Hebert2016-05-241-1/+1
| | | | | | | | | - the internal representation for package locks moves from `{Name, {pkg, PkgName, Vsn}, Lvl}` to `{Name, {pkg, PkgName, Vsn, Hash}, Lvl}` - the internal representation for packages moves from `{pkg, PkgName, Vsn}` to `{pkg, PkgName, Vsn, Hash}` - the hash can be `undefined`, meaning no check will be done - no checking is done yet.
* fix auto-registry update to work even when not a locked pkg-vsnTristan Sloughter2016-02-281-7/+32
|
* Add more hex rules so they don't throw errorsHeinz N. Gies2016-02-221-11/+29
| | | | | | | | | | Add more version constraints Allow for any number of whitespaces after compairison opperator Improve updating and error printing Fix failing tests
* support temporary cdn change with HEX_CDN os varTristan Sloughter2015-12-191-12/+21
|
* auto-update the registry if a pkg isn't found, fail if it still isn't foundTristan Sloughter2015-11-291-4/+28
|
* fix typo of guarantee. h/t evanTristan Sloughter2015-11-121-1/+1
|
* hooks/artifacts are always run/resolved from an app unless at top of umbrellaTristan Sloughter2015-09-061-1/+1
|
* Revert "Revert "only load packages when needed""Fred Hebert2015-09-021-4/+5
|
* Revert "only load packages when needed"Fred Hebert2015-09-021-5/+4
|
* only load packages when neededTristan Sloughter2015-09-021-4/+5
|
* Merge pull request #742 from tsloughter/pkg_checkTristan Sloughter2015-08-231-4/+4
|\ | | | | improve error messages for packages by checking its existance before fetch
| * improve error messages for packages by checking its existance before fetchingTristan Sloughter2015-08-231-4/+4
| |
* | use 'default' for default hex repo path in cache and include in info messagesTristan Sloughter2015-08-221-7/+20
|/
* replace use of dict of packages and registry with single ets tableTristan Sloughter2015-08-211-88/+80
|
* this patch treats pkg and src deps as equals, so level decides winnerTristan Sloughter2015-08-211-7/+19
| | | | | | | | 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-4/+7
|
* Proper custom pkg index support, some testsFred Hebert2015-05-131-4/+14
| | | | | | | | | | - The rebar package index files have been moved off the default path and will require a new `rebar3 update` - Caching of downloaded packages automatically takes place in a path relative to the CDN used - The cache path is not shared with hex as we now write and modify data in there arbitrarily - Basic tests plus the working set for more of them is included
* verify checksums of hex packagesTristan Sloughter2015-05-121-0/+10
|
* check registry for missing package that may exist for mixTristan Sloughter2015-05-091-0/+13
|
* handle missing package in registry by skippingTristan Sloughter2015-05-041-4/+7
|
* add test for single atom pkg dep picking the highest availableTristan Sloughter2015-04-111-1/+1
|
* support single atoms for pkg deps, fetch highest version availableTristan Sloughter2015-04-111-1/+54
|
* follow xdg standard. fixes #122Tristan Sloughter2015-02-191-1/+1
|
* print error message suggesting to run rebar3 update if missing package indexTristan Sloughter2015-02-171-0/+1
|
* replace package management with hex.pmTristan Sloughter2015-02-171-5/+13
|
* Fix error message to point to rebar3Fred Hebert2014-12-151-1/+1
|
* move dir functions from utils to new module rebar_dirTristan Sloughter2014-12-011-1/+1
|
* global plugins install to global config directoryTristan Sloughter2014-11-291-2/+1
|
* replace rlx_depsolver types with new package typesTristan Sloughter2014-11-221-15/+4
|
* replace rlx_depsolver use with new rebar_digraphTristan Sloughter2014-11-221-2/+19
|
* new dep graph workingTristan Sloughter2014-11-221-3/+3
|
* use CONFIG_DIR of rebar3 for config directoriesTristan Sloughter2014-11-101-1/+2
|
* dialyzer fixesTristan Sloughter2014-10-181-5/+5
|
* fix namespaced types for pre-17 otpTristan Sloughter2014-09-251-1/+1
|
* down to last 2 dialyzer errorsTristan Sloughter2014-09-211-1/+1
|
* more dialyzer fun. no likey opaque typesTristan Sloughter2014-09-211-1/+2
|
* fix for wrong function call to depsolver new for empty graphTristan Sloughter2014-09-201-2/+2
|
* improved dep handling and add package list taskTristan Sloughter2014-08-241-0/+23