summaryrefslogtreecommitdiff
path: root/src/rebar_app_info.erl
Commit message (Collapse)AuthorAgeFilesLines
* fix for mix projects that don't have app.src files (#1964)Tristan Sloughter2018-11-301-1/+4
|
* fix resolving versions from vcs (#1915)Tristan Sloughter2018-10-141-5/+5
| | | | | | app_info was turning any vsn into a binary which the vcs_vsn function interprets as being an actual version and not something like <<"git">>. original_vsn shouldn't be converted as it is then not longer "original".
* compiler behaviour (#1893)Tristan Sloughter2018-10-051-6/+37
| | | | | | | | | | | | | | | | * add compile type for dynamic project compilation * new rebar_compiler abstraction for running multiple compilers rebar_compiler is a new behaviour that a plugin can implement to be called on any ues of the compile provider to compile source files and keep track of their dependencies. * fix check that modules in .app modules list are from src_dirs * use project_type to find module for building projects * allow plugins to add project builders and compilers
* properly support top level app erl_opts from REBAR_CONFIG os var (#1889)Tristan Sloughter2018-09-211-3/+11
| | | | | | When REBAR_CONFIG was set it would not effect the top level app's configuration because app_discover was rereading the top level rebar.config which ignored REBAR_CONFIG. Instead this patch has it use the existing configuration from REBAR_CONFIG.
* support for hex v2, multiple repository fetching, private organizations (#1884)Tristan Sloughter2018-09-131-28/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Fix various Dialyzer warningsFred Hebert2018-04-201-1/+1
| | | | | | | | | Some still remain from erl_type calls from Dialyzer, but most of them are handled. Decided to just ignore rebar_alias since playing with the type specs of abstract code format is just a nightmare and hard to do cross-versions I guess.
* 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.
* Unicode support in all the placesFred Hebert2017-08-061-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix default .app.src file for rebar_app_infoFred Hebert2017-02-241-7/+6
| | | | | | | The finding of the file was done based on an assumed 'src' path which may not be correct. This patch instead replaces the value with a lookup in configured paths and returns the first that matches to an existing file.
* Type specifications and edocs improvementsFred Hebert2016-11-271-16/+115
| | | | | | 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.
* Fix rebar3 dialyzer warningsFred Hebert2016-11-191-3/+3
| | | | Some tricky changes in there but should be okay
* Make lock files future-proofFred Hebert2016-02-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Changes to how hex or packages may work in the future will necessarily bring changes to the format of lock files. This commit adds an optional framing for future lock files of the form: {Version, LockList}. <Whatever consultable attributes> This format is supported such as the LockList is the current lockfile contents, and will never have more information than it currently does. Attributes can be whatever and are currently undefined. Rebar copies will be able to: - Keep using the core locklist (which avoids breaking the last year or so of community libraries using rebar3) - Warn when it runs an outdated copy in comparison to the lock file - Automatically rewrite lock files in the format it supports - Augment or parse files in a version-specific manner. This changes the usage interface slightly, but is backwards *and* forwards compatible.
* Plugin templates enabledFred Hebert2015-12-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets a plugin define templates to be loaded: $ rebar3 new ... proper (plugin): A basic PropEr suite for an OTP application ... $ rebar3 new help proper proper: plugin template (...) Description: A basic PropEr suite for an OTP application Variables: name="suite" (...) ... → rebar3 new proper fakesuite ===> Writing test/prop_fakesuite.erl In this case, proper is a fake template file I've put by hand in _build/default/plugins/rebar3_proper/priv/<somename>/, meaning it will only work as far as it's called from the project's root. The priority order of plugins is now .config > plugin > built-in, such that someone could ensure plugins do not crush their own private templates, but also that custom or plugin templates do overtake built-in ones. It used to be Built-in > .config only. Templates are searched for recursively in the priv/ directory of plugins.
* fix dialyzer warningsTristan Sloughter2015-09-271-3/+3
|
* handle case that upgraded app no longer has .app.src fileTristan Sloughter2015-09-201-0/+4
|
* hooks/artifacts are always run/resolved from an app unless at top of umbrellaTristan Sloughter2015-09-061-7/+11
|
* move otp version verification to a single app_info functionTristan Sloughter2015-09-011-0/+5
|
* move opts functions to new module rebar_optsTristan Sloughter2015-09-011-4/+4
|
* update use of hooks and plugins with state in app_infoTristan Sloughter2015-08-311-96/+9
|
* build on already created AppInfo instead of having to do copyTristan Sloughter2015-08-311-1/+6
|
* remove state record from app_info recordTristan Sloughter2015-08-311-31/+0
|
* wip: move state into app_infoTristan Sloughter2015-08-311-3/+237
|
* simplify package dep parsing and handlingTristan Sloughter2015-08-251-2/+14
|
* this patch treats pkg and src deps as equals, so level decides winnerTristan Sloughter2015-08-211-1/+12
| | | | | | | | 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.
* track parent app of deps and add tree provider to display the relationsTristan Sloughter2015-08-151-0/+10
|
* include app.src.script in app discover and always use if availableTristan Sloughter2015-07-261-0/+19
|
* add config option artifactsTristan Sloughter2015-06-021-2/+3
|
* move handling of undefined app state to functionTristan Sloughter2015-05-221-0/+9
|
* have .app.src take precedence over .app fileTristan Sloughter2015-05-221-7/+15
|
* print and format error message for bad .app files and all bad configsTristan Sloughter2015-05-221-6/+1
|
* only update, when not in explicit upgrade, locks if out of dateTristan Sloughter2015-05-211-15/+26
|
* read in application details into app_info after fetchTristan Sloughter2015-04-241-0/+13
|
* support for 18.0+Tristan Sloughter2015-04-231-1/+1
|
* Merge pull request #283 from fishcakez/dial_warnsFred Hebert2015-03-251-1/+1
|\ | | | | Fix some dialyzer warnings
| * Fix dialyzer warningsJames Fish2015-03-181-1/+1
| |
* | treat _checkouts as deps that are always compiledTristan Sloughter2015-03-211-0/+11
|/
* copy project apps to deps output dir for compilationTristan Sloughter2015-02-281-4/+20
|
* consolidate app validation and exist checksTristan Sloughter2015-02-221-1/+1
|
* replace package management with hex.pmTristan Sloughter2015-02-171-3/+3
|
* fix find_apps when searching for invalid appsTristan Sloughter2015-02-021-4/+4
|
* app_info:valid needs to return a boolean and not throw an exceptionTristan Sloughter2015-01-271-1/+6
|
* replace single profile atom in providers with list of profilesTristan Sloughter2015-01-111-9/+9
|
* overrides working except for transitive dep inheritance with lock fileTristan Sloughter2014-12-301-0/+11
|
* rewrite profilesTristan Sloughter2014-12-161-0/+11
|
* add applications field to app_info to track all deps of an applicationTristan Sloughter2014-11-191-0/+11
|
* wip: upgrade pkg depsTristan Sloughter2014-11-021-1/+1
|
* dialyzer fixesTristan Sloughter2014-10-181-11/+6
|
* fixed up a few unknown typesTristan Sloughter2014-09-211-11/+11
|
* down to last 2 dialyzer errorsTristan Sloughter2014-09-211-3/+3
|
* more dialyzer fun. no likey opaque typesTristan Sloughter2014-09-211-2/+2
|