]> _ Git - alire.git/log
alire.git
3 years agoFix identifier typo. (#908)
Paul Jarrett [Sat, 8 Jan 2022 17:06:06 +0000 (12:06 -0500)]
Fix identifier typo. (#908)

3 years agoBugfix for nested empty tables in manifest (#906)
Alejandro R Mosteo [Tue, 4 Jan 2022 11:45:57 +0000 (12:45 +0100)]
Bugfix for nested empty tables in manifest (#906)

* Test for bug

* Fix bug in which a flattened tree may be empty

* Update test with bugfix URL

3 years agoReplace invalid option --skip-compile with --skip-build in alr clean (#903)
onox [Mon, 3 Jan 2022 12:22:32 +0000 (13:22 +0100)]
Replace invalid option --skip-compile with --skip-build in alr clean (#903)

3 years agoFix space typo in trace for unknown distribution (#901)
Jesper Quorning [Fri, 31 Dec 2021 11:27:42 +0000 (12:27 +0100)]
Fix space typo in trace for unknown distribution (#901)

3 years agoBuild profiles and swtiches continued (#896)
Fabien Chouteau [Tue, 21 Dec 2021 12:36:07 +0000 (13:36 +0100)]
Build profiles and swtiches continued (#896)

* Alire.Properties.Build_Profiles: renames build-profile to build-profiles

* Alr.Commands.Build: add build profile switches

* Alire.Utils.Switches: add ffunction-sections and fdata-sections to all optim

* Document build profiles and switches

* Typo

* Typo

4 years agoBuild profiles and switches system (#895)
Fabien Chouteau [Mon, 13 Dec 2021 17:31:15 +0000 (18:31 +0100)]
Build profiles and switches system (#895)

* Build profiles prototype

* Build_profile in manifest

* First version of build_switches support

* Alire.Properties.Build_Switches: migrate code from Alire.Utils

* Alr.Commands.Init: don't generate lockfile and config files

These files are difficult to write "by hand" as the features evolve.
They will be generated as soon as the users builds/update/with the crate.

* testsuite: add tests for the build profile system

* Alr.Commands.Init: change object dir based on build profile

* Rename build profile TOML keys

* Alire.Utils.Switches: remove style switch not available in GNAT 9

4 years agoAlire.Crate_Configuration: Generate Pure and Preelaborate Ada package (#894)
Fabien Chouteau [Fri, 10 Dec 2021 13:16:13 +0000 (14:16 +0100)]
Alire.Crate_Configuration: Generate Pure and Preelaborate Ada package (#894)

* Alire.Crate_Configuration: Genrate Pure and Preelaborate Ada package

So the config package can be withed by any other package.

* Update alire-crate_configuration.adb

4 years agoDon't err when unsetting a non-existing config key (#884)
Alejandro R Mosteo [Tue, 26 Oct 2021 08:59:53 +0000 (10:59 +0200)]
Don't err when unsetting a non-existing config key (#884)

4 years agoFix unintended side-effect of latest merge
Alejandro R. Mosteo [Fri, 15 Oct 2021 10:53:53 +0000 (12:53 +0200)]
Fix unintended side-effect of latest merge

4 years agoMerge branch 'alire/release/1.1' into master
Alejandro R. Mosteo [Wed, 13 Oct 2021 13:40:24 +0000 (15:40 +0200)]
Merge branch 'alire/release/1.1' into master

4 years agoTest case for bug #875 (virtual crate environment) (#878)
Alejandro R Mosteo [Tue, 12 Oct 2021 09:13:34 +0000 (11:13 +0200)]
Test case for bug #875 (virtual crate environment) (#878)

* Test case for bug #875 (virtual crate environment)

* Fix for test on Windows

4 years agoAlr.Commands.Init: fix .gitignore for bin crates (#877)
Fabien Chouteau [Wed, 6 Oct 2021 17:45:19 +0000 (19:45 +0200)]
Alr.Commands.Init: fix .gitignore for bin crates (#877)

* Alr.Commands.Init: fix .gitignore for bin crates

* Alr.Commands.Init: fix .gitignore directory patterns

We only want to mach directories at the same level as .gitignore.

4 years agoDo not exit with error on external failed detection (#876)
Alejandro R Mosteo [Tue, 5 Oct 2021 10:10:06 +0000 (12:10 +0200)]
Do not exit with error on external failed detection (#876)

4 years agoMerge 'alire/release/1.1' into 'master'
Alejandro R. Mosteo [Mon, 4 Oct 2021 12:23:13 +0000 (14:23 +0200)]
Merge 'alire/release/1.1' into 'master'

4 years agoBugfix for improper check related to virtual crates (#875)
Alejandro R Mosteo [Mon, 4 Oct 2021 12:15:35 +0000 (14:15 +0200)]
Bugfix for improper check related to virtual crates (#875)

4 years agoAlire.Releases: fix dependencies in YAML output (#867)
Fabien Chouteau [Thu, 30 Sep 2021 15:14:24 +0000 (17:14 +0200)]
Alire.Releases: fix dependencies in YAML output (#867)

4 years agoNew command exec and support of aliases (#853)
Fabien Chouteau [Thu, 30 Sep 2021 15:13:16 +0000 (17:13 +0200)]
New command exec and support of aliases (#853)

* Alr.Commands.Exec: new command to run executables/scripts in the Alire context

* Alr.Commands: add support for aliases

* Alr.Commands: Use CLIC parse before -- option

4 years agoReorder global switches in Default_Test (#871)
Jesper Quorning [Wed, 29 Sep 2021 11:56:24 +0000 (13:56 +0200)]
Reorder global switches in Default_Test (#871)

Global switches must come before command. (#850) (369c7ec).

4 years agoUse Stopwatch for elapsed time image (#870)
Jesper Quorning [Wed, 29 Sep 2021 11:27:07 +0000 (13:27 +0200)]
Use Stopwatch for elapsed time image (#870)

4 years agoEnable and update self-build (#798)
Alejandro R Mosteo [Tue, 28 Sep 2021 16:24:14 +0000 (18:24 +0200)]
Enable and update self-build (#798)

* CI workflow using Alire toolchain and `alr build`

* Sync pins of aaa, clic to match submodules

4 years agoUpdate CLIC dependency to avoid build failure on older GNAT versions (#872)
Fabien Chouteau [Tue, 28 Sep 2021 14:49:40 +0000 (16:49 +0200)]
Update CLIC dependency to avoid build failure on older GNAT versions (#872)

* Update CLIC dependency to avoid build failure on older GNAT versions

* Alr.Commands.Run: remove useless "use all type"

4 years agoBugfix when there is external gnat but not gprbuild (#866)
Alejandro R Mosteo [Wed, 22 Sep 2021 16:05:07 +0000 (18:05 +0200)]
Bugfix when there is external gnat but not gprbuild (#866)

4 years agoBugfix when there is external gnat but not gprbuild (#866)
Alejandro R Mosteo [Wed, 22 Sep 2021 16:05:07 +0000 (18:05 +0200)]
Bugfix when there is external gnat but not gprbuild (#866)

4 years agoDisable assistant on --select <release> (#862)
Alejandro R Mosteo [Tue, 21 Sep 2021 09:17:15 +0000 (11:17 +0200)]
Disable assistant on --select <release> (#862)

4 years agoDisable assistant on --select <release> (#862)
Alejandro R Mosteo [Tue, 21 Sep 2021 09:17:15 +0000 (11:17 +0200)]
Disable assistant on --select <release> (#862)

4 years agoBump version to the next devel version
Alejandro R. Mosteo [Thu, 16 Sep 2021 15:56:31 +0000 (17:56 +0200)]
Bump version to the next devel version

4 years agoMerge remote-tracking branch 'alire/next'
Alejandro R. Mosteo [Thu, 16 Sep 2021 15:48:34 +0000 (17:48 +0200)]
Merge remote-tracking branch 'alire/next'

4 years agoMerge branch 'release/1.1'
Alejandro R. Mosteo [Thu, 16 Sep 2021 15:44:53 +0000 (17:44 +0200)]
Merge branch 'release/1.1'

4 years agoMove the 1.1 marker up to the top of changes
Alejandro R. Mosteo [Thu, 16 Sep 2021 15:02:37 +0000 (17:02 +0200)]
Move the 1.1 marker up to the top of changes

4 years agoBump version for 1.1 release (#856)
Alejandro R Mosteo [Thu, 16 Sep 2021 15:00:14 +0000 (17:00 +0200)]
Bump version for 1.1 release (#856)

* Bump version for 1.1 release

* Switch index branch to stable-1.1

4 years agoMerge up to On_Demand action into release/1.1
Alejandro R. Mosteo [Thu, 16 Sep 2021 14:05:13 +0000 (16:05 +0200)]
Merge up to On_Demand action into release/1.1

4 years agoFix 1.1 Is_TTY (#855)
Fabien Chouteau [Thu, 16 Sep 2021 13:58:45 +0000 (15:58 +0200)]
Fix 1.1 Is_TTY (#855)

* Update CLIC to v0.1.1

* Alr.Commands: use CLIC.TTY selection/detection of Is_TTY for the Trace package

4 years agoRevamped `alr version` output (#852)
Alejandro R Mosteo [Thu, 16 Sep 2021 13:41:10 +0000 (15:41 +0200)]
Revamped `alr version` output (#852)

* Revamped `alr version` output

* New test to verify basic `alr version` operation

* Cosmetic tweaks

* Tweaks for old tests

4 years agoMerge remote-tracking branch 'alire/master' into next
Alejandro R. Mosteo [Thu, 16 Sep 2021 11:31:55 +0000 (13:31 +0200)]
Merge remote-tracking branch 'alire/master' into next

4 years agoMerge changes from master since last sync
Alejandro R. Mosteo [Thu, 16 Sep 2021 11:26:09 +0000 (13:26 +0200)]
Merge changes from master since last sync

commit 81d28cdbb9ea9f128658754a7ca008f3949ea070
Author: Alejandro R. Mosteo <amosteo@unizar.es>
Date:   Wed Sep 15 17:50:45 2021 +0200

    Fix regression in migration to CLIC.Config

commit ede072fcfe0a44e2f09e5ecc5272c29cb7120ad5
Merge: 7e01a362 ff02df63
Author: Alejandro R. Mosteo <amosteo@unizar.es>
Date:   Wed Sep 15 17:22:44 2021 +0200

    Merge #847

commit 7e01a3627f52820251249161bc2af86f904bd393
Merge: d9b14be6 b9239853
Author: Alejandro R. Mosteo <amosteo@unizar.es>
Date:   Wed Sep 15 17:19:42 2021 +0200

    Merge #848

commit d9b14be69af23313974051bc9a7bbf5fbd29ac80
Merge: 74a40736 954135ad
Author: Alejandro R. Mosteo <amosteo@unizar.es>
Date:   Wed Sep 15 17:18:31 2021 +0200

    Merge #846

commit 74a4073606843f18798503444f5f0a058e347e36
Merge: cb50222d b86d79dc
Author: Alejandro R. Mosteo <amosteo@unizar.es>
Date:   Wed Sep 15 17:09:24 2021 +0200

    Merge #844

commit cb50222dfa01774a256dc91d6256dc92fb595e88
Merge: 4c86b8d8 e921ea3b
Author: Alejandro R. Mosteo <amosteo@unizar.es>
Date:   Wed Sep 15 17:08:53 2021 +0200

    Merge #845

commit ff02df63dc7878edce1ed2bdddd8137be88eb707
Author: Alejandro R Mosteo <alejandro@mosteo.com>
Date:   Wed Sep 15 13:44:03 2021 +0200

    New On_Demand action type (#847)

    * New On_Demand action for future-proofing

    * Test for on-demand actions

commit b923985324431f867ae576e9dd3676fa743fac2f
Author: Fabien Chouteau <Fabien-Chouteau@users.noreply.github.com>
Date:   Tue Sep 14 15:58:16 2021 +0200

    Alire.Config.Edit: fix for --config with relative path (#848)

commit 954135ad24577d3afcb2a92d671a9b53b61c9277
Author: Alejandro R Mosteo <alejandro@mosteo.com>
Date:   Tue Sep 14 10:04:43 2021 +0200

    Checks on compatibility of tools given via `--select <release>` (#846)

    * Don't present incompatible tools in the assistant

    * Sort gnats by version in the assistant

    Rather than by name

    * Detect origin conflicts in `alr toolchain --select <>`

    * Use already configured tool origin as filter

    * New test for checks on --select <releases>

    * Self-review tweaks

commit b86d79dcaabf3081a7c1548b8792fe33aa54e024
Author: Alejandro R Mosteo <alejandro@mosteo.com>
Date:   Tue Sep 14 10:03:54 2021 +0200

    Don't present incompatible tools in the assistant (#844)

commit e921ea3bcacef728f849ac7e33881ada19031c17
Author: Alejandro R Mosteo <alejandro@mosteo.com>
Date:   Tue Sep 14 10:00:38 2021 +0200

    Sort GNATs by version in the assistant (#845)

    Rather than by name

4 years agoAlr.Commands.Build: forward subcommand args to gprbuild (#850)
Fabien Chouteau [Thu, 16 Sep 2021 11:23:25 +0000 (13:23 +0200)]
Alr.Commands.Build: forward subcommand args to gprbuild (#850)

* Update CLIC deps: Global switches are now only accepted before the subcommand

* Alr.Commands.Build: forward subcommand args to gprbuild

This will allow for instance:
$ alr build -f               # force build
$ alr build -cargs -g        # compile with an extra switch
$ alr build -f -u atomic.adb # only compile atomic.adb

This is exposing more of the gprbuild interface in an Alire workflow.
But I see this as a convenient development trick, and the standard "alr
build" command without extra args should always be enough to build a
crate.

https://github.com/alire-project/alire/issues/698

* Alr.Commands.Clean: fix -X switch handling

The variable Alr.commands.Scenario was hidden by
Alr.Commands.Clean.Scenario.

* Document changes

* scripts/ci-github.sh: move alr global switches

* Alire.Spawn: typo

4 years agoNew On_Demand action type (#847)
Alejandro R Mosteo [Wed, 15 Sep 2021 11:44:03 +0000 (13:44 +0200)]
New On_Demand action type (#847)

* New On_Demand action for future-proofing

* Test for on-demand actions

4 years agoAlire.Config.Edit: fix for --config with relative path (#848)
Fabien Chouteau [Tue, 14 Sep 2021 13:58:16 +0000 (15:58 +0200)]
Alire.Config.Edit: fix for --config with relative path (#848)

4 years agoChecks on compatibility of tools given via `--select <release>` (#846)
Alejandro R Mosteo [Tue, 14 Sep 2021 08:04:43 +0000 (10:04 +0200)]
Checks on compatibility of tools given via `--select <release>` (#846)

* Don't present incompatible tools in the assistant

* Sort gnats by version in the assistant

Rather than by name

* Detect origin conflicts in `alr toolchain --select <>`

* Use already configured tool origin as filter

* New test for checks on --select <releases>

* Self-review tweaks

4 years agoDon't present incompatible tools in the assistant (#844)
Alejandro R Mosteo [Tue, 14 Sep 2021 08:03:54 +0000 (10:03 +0200)]
Don't present incompatible tools in the assistant (#844)

4 years agoSort GNATs by version in the assistant (#845)
Alejandro R Mosteo [Tue, 14 Sep 2021 08:00:38 +0000 (10:00 +0200)]
Sort GNATs by version in the assistant (#845)

Rather than by name

4 years agoMerge remote-tracking branch 'alire/master' into next
Alejandro R. Mosteo [Mon, 13 Sep 2021 19:06:45 +0000 (21:06 +0200)]
Merge remote-tracking branch 'alire/master' into next

4 years agoPort to `ada_toml` for TOML 1.0 (#836)
Alejandro R Mosteo [Fri, 10 Sep 2021 12:07:35 +0000 (14:07 +0200)]
Port to `ada_toml` for TOML 1.0 (#836)

* Port to `ada_toml` for TOML 1.0

* Better check in scenario loader

4 years agoAlire.Config: replace with CLIC.Config (#841)
Fabien Chouteau [Fri, 10 Sep 2021 12:05:07 +0000 (14:05 +0200)]
Alire.Config: replace with CLIC.Config (#841)

4 years agoMerge changes since rc2 into 1.1 branch for rc3
Alejandro R Mosteo [Fri, 10 Sep 2021 11:14:58 +0000 (13:14 +0200)]
Merge changes since rc2 into 1.1 branch for rc3

Merge changes since rc2 into 1.1 branch for rc3

4 years agoBump version for 1.1 rc3 (#838)
Alejandro R Mosteo [Fri, 10 Sep 2021 11:12:41 +0000 (13:12 +0200)]
Bump version for 1.1 rc3 (#838)

4 years agoRefactoring: remove string subprograms from Alire.Utils/Alr.Utils and use AAA.Strings...
Fabien Chouteau [Fri, 10 Sep 2021 10:52:30 +0000 (12:52 +0200)]
Refactoring: remove string subprograms from Alire.Utils/Alr.Utils and use AAA.Strings (#837)

* Refactoring: remove string subprograms from Alire.Utils/Alr.Utils and use AAA.Strings

* Refactoring: AAA.Strings on Windows code

4 years agoFix missing action triggers (#835)
Alejandro R Mosteo [Fri, 10 Sep 2021 09:23:03 +0000 (11:23 +0200)]
Fix missing action triggers (#835)

* Run post-fetch for the root crate and linked deps

* Update actions test

* A.Prop.Actions: Documentation on action triggers

* New test for action triggers in dependencies

* Document new action "lifecycle"

* Fix double-post-fetch for the root crate in `alr get`

4 years agoMerge remote-tracking branch 'alire/master' into next
Alejandro R. Mosteo [Thu, 9 Sep 2021 15:49:51 +0000 (17:49 +0200)]
Merge remote-tracking branch 'alire/master' into next

4 years agoIncremental building of dependencies (#832)
Alejandro R Mosteo [Thu, 9 Sep 2021 15:45:51 +0000 (17:45 +0200)]
Incremental building of dependencies (#832)

* Move build to Roots and incrementally do it

* Prebuild only crates declaring executables

* Test for new incremental build

* Self-review fixes

* Fix for differing error code on Windows

And minor bug in which the code as improperly assumed to be positive

4 years agoAlr.Commands.Toolchain: tweak for multiple components and install dir (#822)
Fabien Chouteau [Thu, 9 Sep 2021 10:31:42 +0000 (12:31 +0200)]
Alr.Commands.Toolchain: tweak for multiple components and install dir (#822)

* Alr.Commands.Toolchain: tweak for multiple components and install dir

This patch adds support of multiple components and allow
--disable-assistant with all commands so that it is possible to
configure all the toolchain stuff in one command:
$ alr toolchain --select gnat_native gprbuild --disable-assistant

The patch also introduces a --install-dir switch to allow installation
in any directory. This can be useful for people willing to use the Alire
toolchain outside of an Alire workflow. It would be better if the root
dir of the archive (e.g. gprbuild_21.0.0_349f6f95) was skipped so that
all the tools would be available from <INSTALL_DIR>/bin/.

* tests: increase gnat_native version in fixture index and add more tests

* Alr.Commands.Toolchain: print list only when no command is specified

* tests/toolchain/custom_install_dir: fix paths for Windows and second dir

* Fix PR comments

4 years agoAlr.Commands: disable simple_logging TTY (#827)
Fabien Chouteau [Mon, 6 Sep 2021 09:37:16 +0000 (11:37 +0200)]
Alr.Commands: disable simple_logging TTY (#827)

Fix #823

4 years agoFix typo in generated project file in init alire.toml (#824)
Paul Jarrett [Mon, 6 Sep 2021 08:15:02 +0000 (04:15 -0400)]
Fix typo in generated project file in init alire.toml (#824)

4 years agoMark binaries with the x86_64 arch (#821)
Alejandro R Mosteo [Thu, 2 Sep 2021 14:52:25 +0000 (16:52 +0200)]
Mark binaries with the x86_64 arch (#821)

4 years agoMerge remote-tracking branch 'alire/master' into release/1.1
Alejandro R. Mosteo [Thu, 2 Sep 2021 08:25:39 +0000 (10:25 +0200)]
Merge remote-tracking branch 'alire/master' into release/1.1

4 years agoMove version out of root package (#818)
Alejandro R Mosteo [Thu, 2 Sep 2021 08:21:56 +0000 (10:21 +0200)]
Move version out of root package (#818)

This way changing it does not require recompiling absolutely everything.

4 years agoFix bug when $XDG_CONFIG_HOME is defined (#816)
Alejandro R Mosteo [Thu, 2 Sep 2021 07:14:57 +0000 (09:14 +0200)]
Fix bug when $XDG_CONFIG_HOME is defined (#816)

4 years agoExtract sub-command handling (alr <command>) (#806)
Fabien Chouteau [Wed, 1 Sep 2021 08:52:41 +0000 (10:52 +0200)]
Extract sub-command handling (alr <command>) (#806)

* Extract sub-command handling (alr <command>)

The goal of this big refactoring is to extract the handling of
sub-commands to make it available for other projects.

The SubCommander packages (name open to changes) can be extracted to a
dedicated crate or to AAA.

There is at least one regression which is the support of -X for alr
build.

* Alr.Commands.Toolchain: Fix comparison typo from refactoring

* Alr.Commands|SubCommander: Fix exception raise and handling

* Typo

* Address review comments and minor changes

* Another big refactoring on command line handling

The switches are not parsed several times like before.  The global
switches parsing is done once, the command specific switch parsing is
done only on the command arguments.

Handling of -X scenario variable switches is now done with regular
GNAT.Command_Line switch handling.

There is a issue with command arguments that contain spaces, it looks
like they are split in multiple arguments. I don't know why.

* Fix args filtering

The concatenation of arguments and re-splitting with
GNAT.OS_Lib.Argument_String_To_List breaks when arguments have
whitespaces: 'alr' 'show' 'a b c' becomes 'alr 'show' 'a' 'b' 'c'.

* Wrap the GNAT Commnand_Line_Configuration to add required features

This was previously done with a GNAT.Command_Line.Extra package that
exploited the internals of GNAT.Command_Line.

This is more portable because less exposed to changes in the internals
of GNAT.Command_Line.

* Rename SubCommander to CLIC.Subcommander and move it to alire/

* Move Alire.Utils.User_Input and Alire.Utils.TTY to CLIC

* Alr.Platforms.Windows: Fix builds

* Import CLIC as submodule

4 years agoSeparate dependency recursion from deployment (#815)
Alejandro R Mosteo [Wed, 1 Sep 2021 08:25:22 +0000 (10:25 +0200)]
Separate dependency recursion from deployment (#815)

* Bump aaa to latest version

* Provide a safe traversal proc for dependencies

Migrate deployment of releases to this call

4 years agoSolver timeout to prevent runaway situations (#813)
Alejandro R Mosteo [Mon, 30 Aug 2021 15:25:51 +0000 (17:25 +0200)]
Solver timeout to prevent runaway situations (#813)

4 years agoAlire.Crate_Configuration: generate a constant with the version of the crate (#810)
Fabien Chouteau [Mon, 30 Aug 2021 09:08:54 +0000 (11:08 +0200)]
Alire.Crate_Configuration: generate a constant with the version of the crate (#810)

With this addition users only have to worry about the version in
alire.toml and it will be propagated to code and gpr files.

4 years agoMore thorough error on index version mismatch (#809)
Alejandro R Mosteo [Fri, 27 Aug 2021 07:45:09 +0000 (09:45 +0200)]
More thorough error on index version mismatch (#809)

4 years agoNon-interactive toolchain selection with `alr toolchain --select <release>` (#804)
Alejandro R Mosteo [Thu, 26 Aug 2021 09:14:43 +0000 (11:14 +0200)]
Non-interactive toolchain selection with `alr toolchain --select <release>` (#804)

* Allow to select toolchain non-interactively

* Enhance toolchain selection test

Now we test the non-interactive selection, and the local selection

4 years agoMake `alr index` default to --list and cosmetic retouching (#808)
Alejandro R Mosteo [Thu, 26 Aug 2021 08:14:23 +0000 (10:14 +0200)]
Make `alr index` default to --list and cosmetic retouching (#808)

* Make `alr index` default to `--list`

* list indexes with same header format as elsewhere

4 years agoFix iteration with cursors in search command (#807)
Alejandro R Mosteo [Wed, 25 Aug 2021 09:58:02 +0000 (11:58 +0200)]
Fix iteration with cursors in search command (#807)

4 years agoHide alr-deployed releases from external detection (#805)
Alejandro R Mosteo [Wed, 25 Aug 2021 09:57:46 +0000 (11:57 +0200)]
Hide alr-deployed releases from external detection (#805)

This is done so when a regular compiler from Alire is put in the path, it won't
be doubly available as a regular release and as an external release, which may
be confusing.

4 years agoImplement `alr toolchain --disable-assistant` (#803)
Alejandro R Mosteo [Mon, 23 Aug 2021 11:57:01 +0000 (13:57 +0200)]
Implement `alr toolchain --disable-assistant` (#803)

* Implement `alr toolchain --disable-assistant`

* Disable the assistant in testsuite using new swithc

4 years agoImprovements to cleanup of temp files (#799)
Alejandro R Mosteo [Mon, 23 Aug 2021 08:25:54 +0000 (10:25 +0200)]
Improvements to cleanup of temp files (#799)

* Clean temporaries in config cache too

* Show size of freed temporary files

* Track and delete temp files on Ctrl-C

* CI fix

* Ensure all paths are absolute

4 years agoUpdate README to reflect current build situation (#797)
Alejandro R Mosteo [Thu, 19 Aug 2021 12:36:44 +0000 (14:36 +0200)]
Update README to reflect current build situation (#797)

4 years agoFix compilation with GNAT FSF 7.5 (#793)
onox [Thu, 19 Aug 2021 07:45:29 +0000 (09:45 +0200)]
Fix compilation with GNAT FSF 7.5 (#793)

4 years agoMove the lockfile inside `$crate/alire` (#789)
Alejandro R Mosteo [Thu, 19 Aug 2021 07:44:58 +0000 (09:44 +0200)]
Move the lockfile inside `$crate/alire` (#789)

* Lockfile silently migrated to $crate/alire

* testsuite: new test for the silent migration

* testsuite: fixes for existing tests

* user-changes.md: document the new lock location

4 years agoAllow to configure toolchain locally (#788)
Alejandro R Mosteo [Wed, 18 Aug 2021 17:04:15 +0000 (19:04 +0200)]
Allow to configure toolchain locally (#788)

4 years agoBump version to 1.1.0-rc1
Alejandro R. Mosteo [Wed, 18 Aug 2021 11:35:29 +0000 (13:35 +0200)]
Bump version to 1.1.0-rc1

4 years agoMerge toolchain PRs into master
Alejandro R Mosteo [Wed, 18 Aug 2021 11:30:53 +0000 (13:30 +0200)]
Merge toolchain PRs into master

Toolchains-related PRs

4 years agoReinstate "forbids" property (#781)
Alejandro R Mosteo [Wed, 18 Aug 2021 11:11:06 +0000 (13:11 +0200)]
Reinstate "forbids" property (#781)

* Load "forbids" property, and test

* Update catalog spec document

* doc/user-changes.md: documented "forbids" property

4 years agoReleases providing the same 3rd crate no longer implicitly conflict (#780)
Alejandro R Mosteo [Wed, 18 Aug 2021 10:59:22 +0000 (12:59 +0200)]
Releases providing the same 3rd crate no longer implicitly conflict (#780)

* Crates that "provides" the same no longer conflict

This allows having several compilers in the same crate

* Remove assumptions derived from implicit conflicts

* Speed-ups in solver for the gnat dependency

* doc/toolchains.md: Update to reflect current status

* Typo

4 years agoBinary crates, toolchain management and use (#775)
Alejandro R Mosteo [Wed, 18 Aug 2021 10:28:45 +0000 (12:28 +0200)]
Binary crates, toolchain management and use (#775)

* Implement sha256 and hash use test (#765)

* Implement binary origins and their deployment

* `alr install` for shared installations

Essentially, we have a second location for dependencies at ${ALR_CONFIG}/cache.
In following PRs the releases therein will be available during dependency
resolution, to be reused.

`alr install` for manual crate installation

Installed crates are used by the solver

Autodiscover installed releases

Show differences due to changed install status

Install: implement release removal

* Toolchain configuration assistant

Menu for choosing among multiple options

Show actual compiler versions to the user

Install and remember the user choice

User_Input: Take a possible Ctrl-D into account

* Re-enable "provides" in index and use them in alr

New, more flexible provides type

WIP: going back to provides as list of deps

All but loading of "provides"

Loading of provides

Installed provides are used during solving

They're not yet used for regular dependencies

Display provider in the `alr with` variants

Prevent solving of conflicting dependencies

If two releases provide the same crate, they cannot be simultaneously in a
solution.

solver tweaks for provides + externals

Improvements to solution space by reusing releases

When adding a release to a solution, check whether other dependencies can be
satisfied by this same release. Not a big deal, could be disabled if too costly
in the future.

* Use toolchain in solve/build/environment

Insert explicit dependency on the configured gnat

Do not explicitly insert dependency on toolchain

Instead, we simply coerce when given a generic gnat dependency into the
configured one. This is less intrusive as the user does not see unexpected
dependencies on the compiler in the solution (unless explicitly requested).

Extra info in `alr install` list

Generalized assistant for all tools in toolchain

* Rename install command to toolchain

* Implement "provides" for external detectors

For now this is restricted to a single alternate crate name. By necessity, the
equivalence has to be to the same version, whereas provides for regular
releases are more general as they can rely on precise versions which are known
in advance.

* Tweaks for new GNAT crate names

* Solver: reuse known GNAT on generic gnat= dep

* Integrate external gnats in shared releases

This is logical because these are always available in all configurations. But
the important benefit is that the solver can use them in preference to a remote
native compiler.

* Documentation in doc/, `alr help`

* Fixed circularity, Config.Edit is now untangled

* Tweaks to pass existing tests

* Self-review fixes and clean-up

* New tests for toolchains and related features

* Windows-specific testsuite fixes

* Review fixes

In particular, the avoidance of downloading a compiler for a generic gnat
dependency. This is tested in testsuite/tests/solver/compiler-installed

4 years agoAlr.Commands.Init: config.gpr project should be abstract (#785)
Fabien Chouteau [Tue, 17 Aug 2021 10:38:14 +0000 (12:38 +0200)]
Alr.Commands.Init: config.gpr project should be abstract (#785)

4 years agoUnreferenced warnings building for macOS (#782)
Simon Wright [Tue, 17 Aug 2021 08:55:52 +0000 (09:55 +0100)]
Unreferenced warnings building for macOS (#782)

* src/alr/os_macos/alr-platforms-macos.adb: removed unreferenced unit
      Alire.Origins.Deployers.
  * src/alr/os_macos/alr-platforms-macos.ads: likewise, Alire.Origins.

4 years agoAlr.Commands.Init: change defaults for init project to release mode (#777)
Fabien Chouteau [Tue, 3 Aug 2021 15:39:38 +0000 (17:39 +0200)]
Alr.Commands.Init: change defaults for init project to release mode (#777)

I first decided to make the default better for developers (to catch as many errors as possible), but they end up in release crates which means that the performance is bad as well as the compatibility between compiler versions.

This patch set the defaults to max performance and compatibility.

This system is clearly not very user friendly, maybe we have too many options here.
Profiles like in Cargo could be better.

4 years agoDeploy dependencies atomically and related cleanup subcommand (#768)
Alejandro R Mosteo [Tue, 20 Jul 2021 16:08:18 +0000 (18:08 +0200)]
Deploy dependencies atomically and related cleanup subcommand (#768)

* Use a temporary to fetch & deploy releases

This is done to avoid an interrupted download (for example with Ctrl-C) to
mistake our deployer, which considers an existing directory as a successfully
deployed dependency.

* Cmd.Clean: implement --temp option

To remove any dangling temporaries

* Improve clean --cache to avoid useless downloads

* Test for `alr clean --temp`

4 years agoFix obsolete reference to `alr list` (#773)
Alejandro R Mosteo [Tue, 20 Jul 2021 14:51:53 +0000 (16:51 +0200)]
Fix obsolete reference to `alr list` (#773)

4 years agoFix corner case when pinning to a not available version (#767)
Alejandro R Mosteo [Fri, 2 Jul 2021 07:38:57 +0000 (09:38 +0200)]
Fix corner case when pinning to a not available version (#767)

* Less confusing user feedback for existing pin

* Typo in comment

* Fix for corner case in which no solution was found

The solution is impossible, but still an incomplete solution should be
returned. In essence, when the user requested an impossible situation by
applying a pin to a non-existent version for a crate already in the
dependencies, the solver reused the old version assuming it would succeed,
which was not the case if the pin is impossible.

* Better pin info separation

* Extra test case for pinning to unavailable version

4 years agoAllow loading manifests with broken pins (#766)
Alejandro R Mosteo [Fri, 2 Jul 2021 07:20:46 +0000 (09:20 +0200)]
Allow loading manifests with broken pins (#766)

4 years agoFixed cycle detection (#764)
Alejandro R Mosteo [Wed, 30 Jun 2021 07:16:31 +0000 (09:16 +0200)]
Fixed cycle detection (#764)

4 years agoMerge all pin-related recent PRs into master
Alejandro R Mosteo [Mon, 28 Jun 2021 15:43:07 +0000 (17:43 +0200)]
Merge all pin-related recent PRs into master

Merge all pin-related recent PRs into master

4 years agoFix pinning with explicit version (#762)
Alejandro R Mosteo [Mon, 28 Jun 2021 15:19:58 +0000 (17:19 +0200)]
Fix pinning with explicit version (#762)

* Fix validation of version pins

* Testsuite: test for more cases of version pins

4 years agoFix conversion of references to commits (#761)
Alejandro R Mosteo [Mon, 28 Jun 2021 14:20:45 +0000 (16:20 +0200)]
Fix conversion of references to commits (#761)

* Completed Roots.Editable commands for removal

* Completed Alr.Commands.Pin

* Reinstated all `alr pin` functionality

* Reinstated remaining disabled pin tests

* Reinstated remaining disabled tests

* Testsuite: fix platform-independent path on Windows

* Implement pin commands in alr driver

* Testsuite: Implement with command in alr driver

* Testsuite: equivalence between manual and cmd-line

* Fix git folder deletion on Windows

* Fix reference to commit mode

4 years agoImplement `--branch` in `alr with`, `alr pin` (#760)
Alejandro R Mosteo [Mon, 28 Jun 2021 14:07:05 +0000 (16:07 +0200)]
Implement `--branch` in `alr with`, `alr pin` (#760)

* Completed Roots.Editable commands for removal

* Completed Alr.Commands.Pin

* Reinstated all `alr pin` functionality

* Reinstated remaining disabled pin tests

* Reinstated remaining disabled tests

* Testsuite: fix platform-independent path on Windows

* Implement pin commands in alr driver

* Testsuite: Implement with command in alr driver

* Testsuite: equivalence between manual and cmd-line

* Fix git folder deletion on Windows

4 years agoRe-enable pin removal option and related tests (#759)
Alejandro R Mosteo [Mon, 28 Jun 2021 13:21:46 +0000 (15:21 +0200)]
Re-enable pin removal option and related tests (#759)

* Completed Roots.Editable commands for removal

* Completed Alr.Commands.Pin

* Reinstated all `alr pin` functionality

* Reinstated remaining disabled pin tests

* Reinstated remaining disabled tests

* Testsuite: fix platform-independent path on Windows

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