]> _ Git - alire.git/log
alire.git
4 years agoReinstante `alr with --pin` (#758)
Alejandro R Mosteo [Sat, 26 Jun 2021 13:27:29 +0000 (15:27 +0200)]
Reinstante `alr with --pin` (#758)

* Implement temporary root copies

* Preparations for manifest modification via Roots

This way, alr with/alr pin become mere proxies for the Alire.Roots functions,
which is as it should have been from the start.

* User_Pins: programmatic creation and TOML oneliner

* Roots manifest editor procedures

* Moved root edition to Alire.Roots.Editable

* Reinstated `alr with [crate] --use`

* Narrowing-down of dependencies without pin

* Tweaks for existing `with` tests

* Re-enabled tests depending on `alr with --use`

* Tweaks found during self-review

* Attempt to fix error in older GNATs

4 years agoDetect circularities in link pins (#755)
Alejandro R Mosteo [Fri, 25 Jun 2021 10:16:08 +0000 (12:16 +0200)]
Detect circularities in link pins (#755)

* Detect circularities in link pins

* Test for self-pinning and circularities

* Fix platform-dependent path on Windows

4 years agoPins to remote branches (#754)
Alejandro R Mosteo [Fri, 25 Jun 2021 09:28:24 +0000 (11:28 +0200)]
Pins to remote branches (#754)

* Accept "branch" in remote pins

* Refactor pin loader for clarity

* Load/Store branch in lockfile

* Do use branches for pin checkouts/updates

* Use pin branch for showing solution differences

* New test for conflicting link pins

* New test for detecting pin path changes

* Document new branch pins

* New test specific for branch pins

* Fixes found during self-review

* Fixes caught by testsuite on Windows

* More fixes during self-review

* Fixes requested during review

4 years agoFixes/tests for recursive link pins (#751)
Alejandro R Mosteo [Wed, 23 Jun 2021 10:15:18 +0000 (12:15 +0200)]
Fixes/tests for recursive link pins (#751)

* Fixes for recursive link pins

* Use link relative paths in output

Internally absolute paths are used, which allows to remove some complex logic.

* Bypass dangling reference warning in some gnat versions

* Fixes for absolute paths on Windows

* Cosmetic fix for `alr pin`

* Ensure user pins in memory use absolute paths

This simplifies internals when referring to recursive pins. Paths in the
lockfile and displayed to the user are still shown as relative to the root.

* New improved remote pin management

* Remove some redundant info output

* Remove Externals.Softlinks in favor of User_Pins

* Found cause & workaround of CE2021 path corruption bug

* Testcase minor fix

* Fix spellcheck CI

I broke it inadvertently when disabling spelling for the lockfile

* New tests for recursive pins and more

* Clarifications and tweaks during self-review

* Backport VCSs.Git changes

* Update pins in alire.toml for self-build

* Fixes found by the testsuite on Windows

* Cosmetic fixes found during self-review

4 years agoPins in the manifest (#743)
Alejandro R Mosteo [Tue, 22 Jun 2021 15:55:12 +0000 (17:55 +0200)]
Pins in the manifest (#743)

* Added data structures

* Pins may appear in manifest, being ignored

* Loading of user pins complete

* Pins are downloaded or skipped as needed

* Pins are properly pruned, and info displayed

Minor testsuite tweak for a change in logging format

* Added new-format pins to alire.toml for self-build

* Allow selective update of pins as for regular deps

* Local pins work with new manifest syntax

* Fixed bug in which version pins were not used

* Make version explicit key in user pin

* Fix bug about confirming empty updates

* Roots: Conflated dep updating into single Sync

We had two confusing Update_Dependencies and Update_And_Deploy_Dependencies
that were in practice doing almost the same. There is now a single
Sync_Dependencies.

* Disable tests that rely on `alr pin`

For now, these cannot work as we are going to remove the ability to edit pins
via `alr with`/`alr pin`. This functionality could be reintroduced at a later
time.

* More tests temporarily disabled

Most of those should be reimplemented in their manual edition alternative

* Disable code for pin edition in command-line

* Changes to allow pins to non-dependencies

This is purely for user comfort and will probably result in dependencies having
to be added at publish time. However, if we manage to restore command-line
pinning, we can remove that pain by adding missing dependencies at that time.

* Tests in tests/pin using new pins

Some tests are not easily portable without support from `alr with --use`. Since
that should be easy to implement later, they are disabled for now and will be
enabled in a subsequent patch.

* Documentation on new pins

* Fix for testcase on Windows using path separators

* Spelling fixes, and exclude lockfiles from check

* New test for various invalid pin entries in manifest

Also the required code changes to pass the test

* Fixes from code self-review

* Fixes suggested during code review

* Fix for missed update when there is no lockfile

We were creating an empty lockfile, which was newer than the manifest, and thus
not triggering the expected automatic update.

* Test to check pins are applied with no prior lockfile

This was a bug detected and corrected in the previous commit

4 years agoUpdate msys installer to latest stable release (#756)
Alejandro R Mosteo [Tue, 22 Jun 2021 14:12:31 +0000 (16:12 +0200)]
Update msys installer to latest stable release (#756)

* Update msys installer to latest stable release

* Alr.Platforms.Windows: new msys2 installer doesn't need extra script

Co-authored-by: Fabien Chouteau <chouteau@adacore.com>
4 years agoShow bad tag in error message (#749)
Alejandro R Mosteo [Wed, 16 Jun 2021 14:41:58 +0000 (16:41 +0200)]
Show bad tag in error message (#749)

4 years agoFix new warnings in CE2021 (#746)
Alejandro R Mosteo [Mon, 14 Jun 2021 10:15:01 +0000 (12:15 +0200)]
Fix new warnings in CE2021 (#746)

* Initial fixes for CE2021

* Resolve conflicts with CE2020

* Update CI scripts to use CE2021

* Revert CE version for macOS CI tests

* Remove conflicting Append_Vector

* Remove unused entities in Windows

* Fix bug uncovered by CE2021

* Fix timestamps compare when mixing G.OS_Lib/A.Dirs

* Update pins for self-build

* Disable self-build, that uses CE2021

It cannot succeed until the patches in this very PR are merged, as it is
attempting to build the old code with the new compiler in the setup-alire
action.

* More fixes for relative paths in softlinks

* Remove unused entities in Windows build

4 years agoalr-commands-init.adb: add config/ in .gitignore (#744)
Fabien Chouteau [Sat, 29 May 2021 09:14:14 +0000 (11:14 +0200)]
alr-commands-init.adb: add config/ in .gitignore (#744)

The crate configuration is always generated by alr and should not be checked-in.

4 years agoCrate Configuration: add options to control the generators (#740)
Fabien Chouteau [Sat, 22 May 2021 09:26:58 +0000 (11:26 +0200)]
Crate Configuration: add options to control the generators (#740)

* Crate Configuration: add options to control the generators

* Move the auto-gpr-with feature to the crate configuration

* Fix review comments

4 years agoCheck_Absolute_Path on Windows should also accept lowercase drive letters (#741)
Fabien Chouteau [Thu, 20 May 2021 08:12:00 +0000 (10:12 +0200)]
Check_Absolute_Path on Windows should also accept lowercase drive letters (#741)

#739

4 years agoTweaks to README and Gitpod badge (#742)
Alejandro R Mosteo [Thu, 20 May 2021 08:11:02 +0000 (10:11 +0200)]
Tweaks to README and Gitpod badge (#742)

4 years agoSynchronize alire metadata and git submodules (#720)
Alejandro R Mosteo [Sat, 15 May 2021 22:28:48 +0000 (00:28 +0200)]
Synchronize alire metadata and git submodules (#720)

* Sync submodules and alire metadata

* Reenable self-build in all platforms

* Feedback about build

* Disable macOS

Somehow apt-get ends being called. To be diagnosed.

* Fix environment settings in manifest

This should fix the problem with the macOS build

* Identified and fixed issue with macOS build

The problem is that the native package in the lockfile was being blindly used.
This is a further hint that lockfiles require work to work better
cross-platform.

* Fix issue with indirect dependencies in test

The self-build test has uncovered an issue already reported, and this commit
also fixes minor differences in output for linked dependencies, depending on
whether they contain alire metadata or not (the same information can be
presented regardless)

Also, disabled version printing on setup-alire, and moved here

4 years agoAdd gitpod-enabling files (#735)
Alejandro R Mosteo [Fri, 14 May 2021 11:22:11 +0000 (13:22 +0200)]
Add gitpod-enabling files (#735)

* Files to provide GNAT on Gitpod

* Add alr to path

* Add VSCode task to run the testsuite

* Set explicit project file in VSCode so ALS works

* Add task to just compile current file

4 years agoInitial tasks.json file for VSCode (#734)
Alejandro R Mosteo [Thu, 13 May 2021 15:45:54 +0000 (17:45 +0200)]
Initial tasks.json file for VSCode (#734)

4 years agoWorkround for issue #729 (#731)
Simon Wright [Mon, 10 May 2021 13:36:14 +0000 (14:36 +0100)]
Workround for issue #729 (#731)

Updated rules in 3.10.2 and 6.4.1(6) caused the use of
Constant_Reference, which takes the Container as an aliased parameter,
to trip over its use on a container passed as an un-aliased parameter.

  * src/alire/alire-conditional_trees.ads (Root): replace
      Constant_Reference by Element.
  * src/alire/alire-dependencies-states.adb ("="): likewise.
  * src/alire/alire-conditional_trees.adb (To_YAML (1)): likewise.
    (Image_One_Line): likewise.
    (Iterate): replace Constant_Reference.Element.all by just Element.

4 years agoAllow named references to identify the commit for a remote pin (#718)
Alejandro R Mosteo [Fri, 26 Mar 2021 11:34:10 +0000 (12:34 +0100)]
Allow named references to identify the commit for a remote pin (#718)

* Allow using named commits for remote pinning

* Update pin/with help for general references

* Update build in version

4 years agoHighlight switches in help text (#717)
Alejandro R Mosteo [Fri, 26 Mar 2021 11:22:59 +0000 (12:22 +0100)]
Highlight switches in help text (#717)

4 years agoComplete/rename the set of feedback procedures with icon prefix (#716)
Alejandro R Mosteo [Fri, 26 Mar 2021 11:20:54 +0000 (12:20 +0100)]
Complete/rename the set of feedback procedures with icon prefix (#716)

* Complete and rename the feedback one-liners

* Use Put_Info to report HEAD commit when pinning remote

* Tag version with commit

4 years agoUse of git repositories as pin remotes (#715)
Alejandro R Mosteo [Thu, 25 Mar 2021 17:29:36 +0000 (18:29 +0100)]
Use of git repositories as pin remotes (#715)

* Skeleton function and calls from Commands.*

* Use a remote commit for a local pin

* Ensure remote pins are in place for build

* Show info for remote pins

* Fix url section separator @ -> #

* Generalize transitive links for remote links

* Display remote source in `alr pin`

* Refactor a few paths for reuse

* New test for pinned remote

* Document new feature

* Fix help for affected commands

* Tweaks during self-review

* Fix test for Windows

* Ensure cache is deletable on Windows

4 years agoDead/duplicated code cleanup (allowed milestones, manual hashing) (#714)
Alejandro R Mosteo [Wed, 24 Mar 2021 11:01:52 +0000 (12:01 +0100)]
Dead/duplicated code cleanup (allowed milestones, manual hashing) (#714)

* Remove dead code obsolescent since `alr publish`

* Remove Alire.Milestones.Allowed_Milestones

This was redundant, being in essence the same thing as a dependency.

4 years agoTransitively add pinned dirs (#713)
Alejandro R Mosteo [Wed, 24 Mar 2021 10:22:58 +0000 (11:22 +0100)]
Transitively add pinned dirs (#713)

* Store relative pins when given as such

* Ensure pinned dirs use portable paths when relative

* Adjustments in testsuite for new relative links

* Recursively add links when linking crates

* Compound relative paths when adding links

* Restore inadvertently removed comment

* Relax too restrictive checks

In the case of linked releases, it doesn't matter if these contain expressions
as we don't write them to disk. As for the spurious warning during loading of
links, we may be transitively loading and the assumption on the current
directory is faulty in that case. The check must be performed elsewhere.

* Require approval for links to non-existent dirs

* Show broken links in dependency image

* Testsuite: new test and minimal tweaks

* Code review fixes

* Softlinks: report absolute project paths

4 years agoStore relative pins as such (#711)
Alejandro R Mosteo [Tue, 23 Mar 2021 14:53:33 +0000 (15:53 +0100)]
Store relative pins as such (#711)

* Store relative pins when given as such

* Ensure pinned dirs use portable paths when relative

* Adjustments in testsuite for new relative links

4 years agoUse remote of local branch for publishing (#712)
Alejandro R Mosteo [Mon, 22 Mar 2021 14:38:45 +0000 (15:38 +0100)]
Use remote of local branch for publishing (#712)

4 years agoFix compilation with older versions of GNAT (#710)
onox [Fri, 12 Mar 2021 08:09:56 +0000 (09:09 +0100)]
Fix compilation with older versions of GNAT (#710)

4 years agoError scopes (#706)
Alejandro R Mosteo [Wed, 10 Mar 2021 17:32:45 +0000 (18:32 +0100)]
Error scopes (#706)

* Initial implementation of error scopes

As long as errors are stored with Errors.Set, they will preserve any enclosing
error scopes, even when not using a TOML_Adapters.Key_Queue

* Fix unreferenced parameters

4 years agoRefactor the expression loader (#702)
Alejandro R Mosteo [Tue, 9 Mar 2021 18:36:29 +0000 (19:36 +0100)]
Refactor the expression loader (#702)

* Pseudotypes specs

* Preparations to replace the generics mesh

* Buildable with the new design, still unimplemented

Only stub bodies

* New expression loader complete, pending ptypes

* Renamed packages Pseudotypes.* to Expressions.*

* Alire.Expressions.* implementation complete

* All functionality complete, tests missing

* System externals now reuse dynamic loaders

* Fixes found by the testsuite, and output tweaks

There is a functional difference that affects the output for some tests:
before, all enum cases received a value, even if it came from an "others"
clause. This meant that all cases were explicitly listed. Now, the "others" is
stored as is, and the output reproduces the contents of the TOML structure. A
few tests had to be adjusted for this.

* Fixes found testing the current stable index

* Remove obsolete documentation

* Implement and test 'x|y' expressions

* Improve output of `alr show` for system packages

* Fixes found during self-review: comments, dead code

* Fix for system externals report

* Alternative implementation for older GNATs

4 years agoFix broken link, mention autocompletion (#705)
Alejandro R Mosteo [Tue, 9 Mar 2021 18:36:06 +0000 (19:36 +0100)]
Fix broken link, mention autocompletion (#705)

4 years agoSubprocesses: Better error if unable to create tmp file (#703)
Alejandro R Mosteo [Mon, 8 Mar 2021 16:27:17 +0000 (17:27 +0100)]
Subprocesses: Better error if unable to create tmp file (#703)

4 years agoRemove Alire.Requisites and Alire.Boolean_Trees (#701)
Alejandro R Mosteo [Fri, 5 Mar 2021 15:52:04 +0000 (16:52 +0100)]
Remove Alire.Requisites and Alire.Boolean_Trees (#701)

* Availability as conditional tree

* Refactor up to Alire.Releases

* It builds for all of Alire.*

* It completely builds

* Testsuite passing, minor cosmetic fixes

There is a minor improvement for trees in which a vector with a single value is
promoted to the single value itself. As vectors are delimited by '(' ')', there
are a few test outputs that required eliminating these former extra
parentheses.

* Dead code removal related to old Ada index

* Case exprs excised from Requisites

This allows more dead code removal and some further internal simplifications.

* Removed Requisites and all related dead code

No longer needed, Requisites were useful in the old index for general
expressions, but not anymore in our case-restricted index. Some quite obscure
portions of Alire code can be thus removed.

* Bring gnatelim up to date

It bugboxes anyway, so it's not currently usable

* Stetic tweaks found during selfreview

4 years agoCache lockfiles, remove Root global, and related refactorings (#690)
Alejandro R Mosteo [Fri, 5 Mar 2021 14:46:56 +0000 (15:46 +0100)]
Cache lockfiles, remove Root global, and related refactorings (#690)

* Changes up to Alire.Roots

* Finished migrating from Workspace

* Root is stored in Alr.Commands.Command for reuse

This way the global Root is no longer reloaded many times, and modifications
are properly encapsulated via the Alire.Roots.Root type. This removes one of
the outstanding code smells in Alire.

* Speed-ups related to lockfile checks

There were a number of overkill checks that furthermore were expensive, loading
the lockfile many times. This became quite noticeable for large lockfiles (once
there is a decent number of dependencies).

* Minor tweaks to comments

* Tweaks after merging from master

Two big PRs were merged from upstream that created some friction with these
changes, requiring minor tweaks.

* Temporarily disable `alr build` CI check

To allow merging with changes in dependencies, temporarily disable the
aforementioned check.

4 years agoAdd `alr publish --manifest <path/to/file.toml>` variant (#635)
Alejandro R Mosteo [Wed, 3 Mar 2021 15:54:48 +0000 (16:54 +0100)]
Add `alr publish --manifest <path/to/file.toml>` variant (#635)

* alire.ads: bump version to 1.1.0-dev

* user-changes.md: add header for 1.1

* Publish: --manifest working for git remotes

* Publish: --manifest working for --tar releases

* Testsuite: publish --manifest variants

* Updated documentation

* CI-found fixes

* Rebase tweaks and bumped version

* user-changes.md: move log entry to 1.1 section

* publishing.md: Reword explanation of --manifest

4 years agoConfiguration feature extras (#700)
Alejandro R Mosteo [Wed, 3 Mar 2021 15:41:34 +0000 (16:41 +0100)]
Configuration feature extras (#700)

* [configuration] as top-level table in manifests

[config_vars] and [config_settings] are now [configuration.variables] and
[configuration.settings]

* Replace stderr warnings with regular ones

* Fix YAML output

* Rename `configuration.settings` to `@.values`

This is under the rationale that `settings` makes more sense for configuring
how Alire deals with the configuration.

* Update documentation for new config tables

* Fix obsolete comment

4 years agoStart support for crate configuration (#673)
Fabien Chouteau [Wed, 3 Mar 2021 15:18:34 +0000 (07:18 -0800)]
Start support for crate configuration (#673)

This is the possibility for crates to define configuration variables
that will then generate Ada, C, or GPR files based on the values set by
depending crates.

For embedded projects where compile optimization and static memory usage
are important, it is possible to define sizes of cache buffers or
maximum amount of some resources.

It allows to enable or disable features at compile time, such as debug
logging.

4 years agoBump version to 1.1.0-dev (#697)
Alejandro R Mosteo [Tue, 2 Mar 2021 11:59:13 +0000 (12:59 +0100)]
Bump version to 1.1.0-dev (#697)

* alire.ads: bump version to 1.1.0-dev

* user-changes.md: add header for 1.1

4 years agouser-changes.md: fix format that breaks GH pages rendering (#696)
Fabien Chouteau [Wed, 24 Feb 2021 15:44:30 +0000 (07:44 -0800)]
user-changes.md: fix format that breaks GH pages rendering (#696)

4 years agoBump version to 1.0 (#693)
Alejandro R Mosteo [Wed, 24 Feb 2021 14:40:02 +0000 (15:40 +0100)]
Bump version to 1.0 (#693)

4 years agoFix bash completion after help formatting changes (#694)
Alejandro R Mosteo [Wed, 24 Feb 2021 14:39:21 +0000 (15:39 +0100)]
Fix bash completion after help formatting changes (#694)

4 years agoBumped version to 1.0 RC 3
Alejandro R. Mosteo [Tue, 16 Feb 2021 12:23:58 +0000 (13:23 +0100)]
Bumped version to 1.0 RC 3

4 years agoHelp output formatting (#688)
onox [Tue, 16 Feb 2021 12:21:31 +0000 (13:21 +0100)]
Help output formatting (#688)

* Color commands in alr [help] and display in groups

* Prevent Getopt from intercepting -h and --help

* Change formatting of command and global options help

* Fix test equivalent_help

* Only print title if there are more than zero options

4 years agoFix problem when temp file doesn't exist (#686)
Alejandro R Mosteo [Mon, 8 Feb 2021 11:52:38 +0000 (12:52 +0100)]
Fix problem when temp file doesn't exist (#686)

4 years agouser-changes.md: document SPDX license expressions (#683)
Fabien Chouteau [Sat, 6 Feb 2021 15:55:48 +0000 (16:55 +0100)]
user-changes.md: document SPDX license expressions (#683)

* user-changes.md: document SPDX license expressions

* Typo

* Another typo

Co-authored-by: Alejandro R. Mosteo <amosteo@unizar.es>
4 years agouser-changes.md: Add markers for releases (#684)
Fabien Chouteau [Fri, 5 Feb 2021 10:53:30 +0000 (11:53 +0100)]
user-changes.md: Add markers for releases (#684)

This will help users identify what is new since the last release.

4 years agoMove to stable index version, bump rc version (#682)
Alejandro R Mosteo [Fri, 5 Feb 2021 10:25:46 +0000 (11:25 +0100)]
Move to stable index version, bump rc version (#682)

4 years agoalire.ads: Bump version to 1.0-rc1
Alejandro R. Mosteo [Thu, 4 Feb 2021 12:03:40 +0000 (13:03 +0100)]
alire.ads: Bump version to 1.0-rc1

4 years agoAutomatically narrow down dependencies given as "any" (#675)
Alejandro R Mosteo [Wed, 3 Feb 2021 10:55:10 +0000 (11:55 +0100)]
Automatically narrow down dependencies given as "any" (#675)

* Implement narrowing down of new "any" dependencies

Instead of adding just a foo* dependency, check how it was solved and use that
version to add a more precise (and usually wanted) dependency; e.g., foo^1.2,
foo~0.1

* Fix case of dependency removal

* New test and fixed other tests to new behavior

Many tests explicitly check the added dependencies, so this is extra assurance
about this change.

* Recognize the wildcard as "any" version

* Document user-visible changes

* Add option to disable new behavior

4 years agoalr-platforms-windows.adb: use a specific version of the msys2 auto install script...
Fabien Chouteau [Wed, 3 Feb 2021 10:48:09 +0000 (11:48 +0100)]
alr-platforms-windows.adb: use a specific version of the msys2 auto install script (#678)

Use a fixed version instead of latest on master branch of msys2-installer.
Changes in the master branch can break our installation code.

4 years agoFix problem with temporaries in Windows (#674)
Alejandro R Mosteo [Tue, 2 Feb 2021 18:17:51 +0000 (19:17 +0100)]
Fix problem with temporaries in Windows (#674)

* Attempt fix at windows temporaries

* Remove now superfluous exception handler

* Review fix

4 years agoWarn about ^0.x dependencies (#669)
Alejandro R Mosteo [Tue, 2 Feb 2021 18:00:13 +0000 (19:00 +0100)]
Warn about ^0.x dependencies (#669)

* Update documentation

* Warn when adding a ^0.x dependency

* Warn on suspicious caret use

This warning is shown at most once per run, and is an optional blocker during
`alr with` and `alr publish`.

A new `Alire.Warnings` package allows simple emission of warnings only once.

* Improve comment wording

* Document user-visible changes

* Rebase fixes

* Make the Warning Id its own type

4 years agoalr-platforms-windows.adb: msys2 install command line changed (#677)
Fabien Chouteau [Tue, 2 Feb 2021 17:42:05 +0000 (18:42 +0100)]
alr-platforms-windows.adb: msys2 install command line changed (#677)

https://github.com/msys2/msys2-installer/pull/20 changed the name of the argument for installation prefix of the msys2 installer.
All previous versions are impacted and won't be able to install msys2 at the correct location.

4 years agoRename `alr list` to `alr crates` (#671)
Alejandro R Mosteo [Mon, 1 Feb 2021 09:53:04 +0000 (10:53 +0100)]
Rename `alr list` to `alr crates` (#671)

* Rename `alr list` to `alr crates`

This way there is less confusion about the purposes of `alr crates` and `alr
search`; the former operates on crates and the latter on releases.

* Fix bash completion

* Document user-visible changes

* Remove `crates` command, move to `search --crates`

* Update bash completion for new situation

* Update user-facing document

* Updated testsuite

4 years agoClarify current behavior of actions (#672)
Alejandro R Mosteo [Fri, 29 Jan 2021 09:37:25 +0000 (10:37 +0100)]
Clarify current behavior of actions (#672)

* Remove old references to [general] section

* Clarify running moments of actions

4 years agoSeparate non-preelaborable parts of Config (#670)
Alejandro R Mosteo [Fri, 29 Jan 2021 09:36:57 +0000 (10:36 +0100)]
Separate non-preelaborable parts of Config (#670)

* Separate non-preelaborable parts of Config

These parts are now in Alire.Config.Edit

* Fixes for Windows-specific sources

4 years agoNarrow check for deprecated Alire metadata (#668)
Alejandro R Mosteo [Thu, 28 Jan 2021 09:37:10 +0000 (10:37 +0100)]
Narrow check for deprecated Alire metadata (#668)

This should exclude false positives for actual alire sources in a child folder.

4 years agoRemove use of build/clean relocations (#667)
Alejandro R Mosteo [Thu, 28 Jan 2021 09:36:55 +0000 (10:36 +0100)]
Remove use of build/clean relocations (#667)

* Remove use of build/clean relocations

* Document user-facing visible changes

4 years agoalr-commands-init.adb: fix generated gpr file (#665)
Fabien Chouteau [Mon, 25 Jan 2021 12:02:54 +0000 (13:02 +0100)]
alr-commands-init.adb: fix generated gpr file (#665)

#664

4 years agoAlire.Properties.Licenses: Add support of SPDX expression (#629)
Fabien Chouteau [Wed, 13 Jan 2021 13:11:11 +0000 (14:11 +0100)]
Alire.Properties.Licenses: Add support of SPDX expression  (#629)

* Alire.Properties.Licenses: Add support of SPDX expression

The legacy license support is still available but will trigger warning
messages.

* Update catalog-format-spec.md

* Add support for custom license ID

* Update catalog-format-spec.md

* Update alire.toml

* tests/index/bad-license-too-long: fix index version

4 years agoAllow unknown enum values in index manifests and new `index --check` (#656)
Alejandro R Mosteo [Mon, 4 Jan 2021 18:14:46 +0000 (19:14 +0100)]
Allow unknown enum values in index manifests and new `index --check` (#656)

* Detect wrong enum values only in local manifests

This allows backwards compatibility for the index, but catches user mistakes.

* New `alr index --check`, check unknown enum values

* Testsuite: proper behavior of enum checks

* Document user-facing changes

4 years agoAdd handling of CentOS, Fedora, Red Hat and their package manager (#20) (#601)
Christophe Gouiran [Wed, 30 Dec 2020 17:31:59 +0000 (18:31 +0100)]
Add handling of CentOS, Fedora, Red Hat and their package manager (#20) (#601)

* Add handling of CentOS, Fedora, Red Hat and their package manager (#20)

* Transform Redhat version scheme into semver one (#20)

* RPM: Take epochs into account for versions

Co-authored-by: Alejandro R. Mosteo <amosteo@unizar.es>
4 years agoUpdated dependencies for Windows publishing (#655)
Alejandro R Mosteo [Wed, 30 Dec 2020 00:07:15 +0000 (01:07 +0100)]
Updated dependencies for Windows publishing (#655)

4 years agopacman: Remove unneeded -e flag (#654)
Alejandro R Mosteo [Wed, 30 Dec 2020 00:06:43 +0000 (01:06 +0100)]
pacman: Remove unneeded -e flag (#654)

This flag filters out packages installed indirectly (as dependencies), causing
our detection of such a package to fail. -Q by design already only works on
installed packages, so that's all we need.

4 years agoalr init: disable warnings for No_Exception_Propagation (#649)
Fabien Chouteau [Wed, 30 Dec 2020 00:06:05 +0000 (01:06 +0100)]
alr init: disable warnings for No_Exception_Propagation (#649)

For embedded ZFP run-time this warning will pop everywhere.

4 years agoFix pacman pkg version detection to consider epochs (#652)
Alejandro R Mosteo [Wed, 23 Dec 2020 16:53:35 +0000 (17:53 +0100)]
Fix pacman pkg version detection to consider epochs (#652)

* Fix pacman pkg detection to consider epochs

* Relaxed parsing for Pacman versions

4 years agoBump index version to devel-0.5 (#651)
Alejandro R Mosteo [Tue, 22 Dec 2020 10:07:26 +0000 (11:07 +0100)]
Bump index version to devel-0.5 (#651)

* Bump index version to devel-0.5

The addition of more enum values to support other distributions is a
breaking change. This raises the question of whether we should simply drop
unknown enum values, as this could well work. But then, using an improper value
would silently fail. Perhaps the warning could be disabled for normal use and
re-enabled for publish?

* Fix python formatting (missing empty lines)

5 years agoAlr.Commands.Withing: Be able to compose paths with nested components (#637)
Alejandro R Mosteo [Fri, 18 Dec 2020 09:37:47 +0000 (10:37 +0100)]
Alr.Commands.Withing: Be able to compose paths with nested components (#637)

* Alr.Commands.Withing: Be able to compose paths

* Testsuite: test for the bugfix

5 years agoEnable verbose spawn only if -v is in effect (#648)
Alejandro R Mosteo [Fri, 18 Dec 2020 09:37:21 +0000 (10:37 +0100)]
Enable verbose spawn only if -v is in effect (#648)

5 years agoEnable fedora-latest docker image for testing (#619)
Alejandro R Mosteo [Tue, 1 Dec 2020 17:19:10 +0000 (18:19 +0100)]
Enable fedora-latest docker image for testing (#619)

5 years agoBetter feedback on malformed hash in index (#636)
Alejandro R Mosteo [Tue, 1 Dec 2020 16:00:49 +0000 (17:00 +0100)]
Better feedback on malformed hash in index (#636)

* Better feedback on malformed hash in index

Fix .gitignore so only the root /alire is ignored

* Fix for breaking change in used action

5 years agoSeparate workflow to test unsupported package manager platform (#623)
Alejandro R Mosteo [Mon, 30 Nov 2020 12:21:15 +0000 (13:21 +0100)]
Separate workflow to test unsupported package manager platform (#623)

* Workflow to test with unsupported package manager

* Add config option to disable distro detection

With test

* Fixes for circular elaboration

* Fix test for slight change in behavior

Before the last changes to break circularities, we tried to load the manifest
as part of the config loading process. Now we are satisfied with finding a
properly named file at the expected place. This causes one test to not detect
invalid TOML, since the manifest contents aren't really needed for the test.

5 years agoSolver: Speed-up for impossible dependencies (#620)
Alejandro R Mosteo [Fri, 20 Nov 2020 14:20:49 +0000 (15:20 +0100)]
Solver: Speed-up for impossible dependencies (#620)

* Solver: Speed-up for impossible dependencies

Whenever a solution is incomplete we keep looking for solutions. But if the
reason for incompleteness is an impossible request (non-existent crate or
version), this resulted on finding all combinations for the rest of crates that
do have satisfiable dependencies.

With this patch, impossible situations are considered part of the "complete"
solution (as there cannot be a more complete one), which allows the solver to
use complete the search much more quickly, as no pointless attempts for more
solutions are made.

* Fixes for problems caught by the test suite

The optimization was too aggressive, as it took place before detecting
externals. Also, it should only apply to direct unavoidable dependencies, as
indirect impossibilities can be avoided by other solutions.

5 years agoDo not raise if /etc/os-release doesn't exist (#621)
Alejandro R Mosteo [Thu, 19 Nov 2020 08:45:00 +0000 (09:45 +0100)]
Do not raise if /etc/os-release doesn't exist (#621)

Simply return distro unknown

5 years agoci-windows.yml: replace add-path command (#622)
Fabien Chouteau [Wed, 18 Nov 2020 17:41:24 +0000 (18:41 +0100)]
ci-windows.yml: replace add-path command (#622)

* ci-windows.yml: replace add-path command

see https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

* ci-windows,yml: use bash shell

5 years agoFeedback line when non-empty alire.lock created (#617)
Alejandro R Mosteo [Mon, 16 Nov 2020 15:04:40 +0000 (16:04 +0100)]
Feedback line when non-empty alire.lock created (#617)

Otherwise the changes are listed without context and it's a bit confusing.

5 years agoFix: on `publish --tar`, allow git without remote (#614)
Alejandro R Mosteo [Mon, 9 Nov 2020 08:39:20 +0000 (09:39 +0100)]
Fix: on `publish --tar`, allow git without remote (#614)

If we are only using git to generate the archive, we do not need the remote as
it won't be referenced by the origin.

5 years agoAdd handling of Arch and Arch-based distributions (#600)
Christophe Gouiran [Sat, 7 Nov 2020 14:01:06 +0000 (15:01 +0100)]
Add handling of Arch and Arch-based distributions (#600)

* Add handling of arch and arch based distributions

* Update src/alire/os_linux/alire-platform.adb

Co-authored-by: Alejandro R Mosteo <amosteo@unizar.es>
* Improve former Arch based Linux distributions detection (#600)

* Check first id then id_like key (#600)

* Update alire-platform.adb

Add a debug trace when falling back to id_like key

* Fix line too long style error (#600)

* Handle the case when id_like is a space separated items list (#600)

* More robust regular expression (#600)

* Simplify processing of id and id_key values (#600)

* Easy_Graph is not available in Official Arch repositories (#600)

Co-authored-by: Alejandro R Mosteo <amosteo@unizar.es>
5 years agoAdded alire.toml so alr can build/edit itself (#575)
Alejandro R Mosteo [Fri, 6 Nov 2020 14:28:19 +0000 (15:28 +0100)]
Added alire.toml so alr can build/edit itself (#575)

* Added alire.toml so alr can build/edit itself

Also bumped the patch number, as code changes from now own should appear in a
future release, and 0.7-dev means pre-0.7 according to semantic versioning.

* Code review fixes

* New workflow to check that `alr build` succeeds

5 years agoAdd arch-rolling docker image to CI (#613)
Alejandro R Mosteo [Fri, 6 Nov 2020 14:27:33 +0000 (15:27 +0100)]
Add arch-rolling docker image to CI (#613)

5 years agoAlr.Commands.Edit: add support for custom editor (#611)
Fabien Chouteau [Thu, 5 Nov 2020 17:55:43 +0000 (18:55 +0100)]
Alr.Commands.Edit: add support for custom editor (#611)

* Alr.Commands.Edit: add support for custom editor

The editor can be changed with:
$ alr config --set --global editor.cmd "emacs ${GPR_FILE}

* Update user-changes.md

* Typo

* Typo

5 years agoBump version on master branch to 0.8.0-dev (#564)
Fabien Chouteau [Thu, 5 Nov 2020 12:24:18 +0000 (13:24 +0100)]
Bump version on master branch to 0.8.0-dev (#564)

5 years agoRefactor update logic from Alr into Alire (#609)
Alejandro R Mosteo [Thu, 5 Nov 2020 11:25:27 +0000 (12:25 +0100)]
Refactor update logic from Alr into Alire (#609)

Also add and use a flag to prevent autoupdates.

5 years agoAlire.Environment: load env context from the platform (#608)
Fabien Chouteau [Wed, 4 Nov 2020 20:32:52 +0000 (21:32 +0100)]
Alire.Environment: load env context from the platform  (#608)

* Alire.Environment: sort env list for predictable output

* Alire.Environment: load env context from the platform

For the moment this is only used on Windows for msys2. Before this patch the msys2 env was not included in `alr print` which means that the context was not complete.

* Alr.Platforms.Windows: do not install msys2 if pacman already in PATH

This makes alr usable when the user is already in an msys2 context.
And it alse makes possible to have an alire package in msys2.

5 years agoAlire.Utils.Yaml: fix string escape (#604)
Fabien Chouteau [Wed, 4 Nov 2020 15:43:44 +0000 (16:43 +0100)]
Alire.Utils.Yaml: fix string escape (#604)

We use double-quote strings so single-quotes should not be escaped.

5 years agoReport underlying error during publishing for an unloadable manifest (#602)
Alejandro R Mosteo [Wed, 4 Nov 2020 10:17:44 +0000 (11:17 +0100)]
Report underlying error during publishing for an unloadable manifest (#602)

* Publish: report error causing unloadable manifest

* Testsuite: add test checking proper error output

5 years agoAvoid unneeded requests to approve changes after editing the manifest (#591)
Alejandro R Mosteo [Thu, 29 Oct 2020 10:26:59 +0000 (11:26 +0100)]
Avoid unneeded requests to approve changes after editing the manifest (#591)

* Avoid unneeded requests to update when no changes

Changes in solutions were being spuriously detected, in situations in which
there were no changes. Also, when manual changes didn't affect dependencies,
the situation was not corrected either by manual update or automatic check.

* New test to check the bugfix

5 years agoAlr.Commands.Init: warnings instead of fails for existing files (#599)
Fabien Chouteau [Wed, 28 Oct 2020 19:27:46 +0000 (20:27 +0100)]
Alr.Commands.Init: warnings instead of fails for existing files (#599)

To make this command more usable when converting an existing Ada project
to Alire, existing source or gpr files are now reported as a warning
instead of an error.

5 years agopolicies.md: add best practices (#597)
Fabien Chouteau [Wed, 28 Oct 2020 17:43:03 +0000 (18:43 +0100)]
policies.md: add best practices (#597)

* policies.md: add best practices

* Update policies.md

5 years agoMigration of an existing Ada/SPARK project to Alire (#598)
Fabien Chouteau [Wed, 28 Oct 2020 17:32:23 +0000 (18:32 +0100)]
Migration of an existing Ada/SPARK project to Alire (#598)

* Update getting-started.md

* Update getting-started.md

* Typo

5 years agoGit: Use remote branch when checking remote status (#596)
Alejandro R Mosteo [Tue, 27 Oct 2020 13:58:58 +0000 (14:58 +0100)]
Git: Use remote branch when checking remote status (#596)

Otherwise it seems git defaults to the main branch, which manifested as
spurious "ahead" status, or ambiguous references in local remotes.

5 years agoPublish: Detect missing manifest in remote sources (#595)
Alejandro R Mosteo [Tue, 27 Oct 2020 11:45:31 +0000 (12:45 +0100)]
Publish: Detect missing manifest in remote sources (#595)

This could escape our checks when the alire.toml file was in .gitignore, for
example, so we didn't detect the discrepancy between local and remote sources.

5 years agoChange Windows installer icon (#589)
Fabien Chouteau [Sat, 24 Oct 2020 09:44:48 +0000 (11:44 +0200)]
Change Windows installer icon (#589)

This new version has a white layer for dark background desktop.

5 years agoDo not show an error when no command is given (#588)
Alejandro R Mosteo [Thu, 22 Oct 2020 14:41:31 +0000 (16:41 +0200)]
Do not show an error when no command is given (#588)

5 years agoFix typo when asking for sudo authorization (#586)
Fabien Chouteau [Thu, 22 Oct 2020 08:32:10 +0000 (10:32 +0200)]
Fix typo when asking for sudo authorization (#586)

Fixes #582

5 years agoMore informative error for missing gprbuild (#583)
Alejandro R Mosteo [Thu, 22 Oct 2020 07:55:13 +0000 (09:55 +0200)]
More informative error for missing gprbuild (#583)

5 years agoFix the `depends-on` example in the catalog spec (#581)
Alejandro R Mosteo [Tue, 20 Oct 2020 16:01:21 +0000 (18:01 +0200)]
Fix the `depends-on` example in the catalog spec (#581)

It was using the old table notation.

5 years agoEnvironment: allow to set var twice to the same value (#580)
Alejandro R Mosteo [Tue, 20 Oct 2020 11:11:30 +0000 (13:11 +0200)]
Environment: allow to set var twice to the same value (#580)

This was already intended to work like this, but was buggy.

5 years agodoc/getting-started.md: replace "setenv" with "printenv" (#576)
Pierre-Marie de Rodat [Fri, 16 Oct 2020 18:13:02 +0000 (20:13 +0200)]
doc/getting-started.md: replace "setenv" with "printenv" (#576)

Update after #534

5 years agoAdded paragraph about adding an ALR badge (#574)
Vinzent "Jellix" Saranen [Thu, 15 Oct 2020 14:56:17 +0000 (16:56 +0200)]
Added paragraph about adding an ALR badge (#574)

* Added paragraph about adding an ALR badge

* Incorporated review comments

* Clarified that the website is updated once daily
* Use 'crate' instead of 'project' where appropriate to avoid confusion
* Minor wording changes.

5 years agoSaner defaults for the dependency solver (#573)
Alejandro R Mosteo [Thu, 15 Oct 2020 11:03:18 +0000 (13:03 +0200)]
Saner defaults for the dependency solver (#573)

We were needlessly exploring the whole solution space, even when the best
complete solution had been already found.

5 years agocatalog-format-spec.md: fix gpr-set-externals description (#572)
Fabien Chouteau [Wed, 14 Oct 2020 09:11:36 +0000 (11:11 +0200)]
catalog-format-spec.md: fix gpr-set-externals description (#572)

It should not be used to specify default values.

5 years agoci-windows.yml: fix zip release (#567)
Fabien Chouteau [Tue, 13 Oct 2020 11:58:15 +0000 (13:58 +0200)]
ci-windows.yml: fix zip release (#567)