]> _ Git - alire.git/log
alire.git
18 months agoBetter documentation for binary origins (#1546)
Alejandro R Mosteo [Fri, 16 Feb 2024 12:18:51 +0000 (13:18 +0100)]
Better documentation for binary origins (#1546)

* Document binary origins

* Test for explicit binary origin

18 months agoReport detected system package manager in `alr version` (#1565)
Alejandro R Mosteo [Fri, 16 Feb 2024 10:56:15 +0000 (11:56 +0100)]
Report detected system package manager in `alr version` (#1565)

* Report the system package manager in `alr version`

* Also report distro detection disabling

* Use a separate system deployer in unknown systems

Instead of defaulting to apt.

* Distinguish undetected exec from unknown exec name

18 months agoExplicitly check GCC versions (#1562)
Alejandro R Mosteo [Thu, 15 Feb 2024 17:04:19 +0000 (18:04 +0100)]
Explicitly check GCC versions (#1562)

* Explicitly check all GCC versions we want

* Remove unneeded `aliased`

* Try to use safer reference

* Workaround for GNAT 13 troubles with expr. funcs.

* Fix test index to use deterministic external gnat version

18 months agoRemove build warnings in si_units on Windows (#1564)
Alejandro R Mosteo [Thu, 15 Feb 2024 12:45:51 +0000 (13:45 +0100)]
Remove build warnings in si_units on Windows (#1564)

18 months agoTest for full publishing workflow (#1538)
Alejandro R Mosteo [Thu, 15 Feb 2024 10:18:42 +0000 (11:18 +0100)]
Test for full publishing workflow (#1538)

* Test for automated publishing

This test is dependent on a remote repo (`test-index`) on which a PR is opened
during testing, so we better run this one sporadically and locally, or in a
single selected CI configuration.

* Self-review

* Use `ALIRE_TESTSUITE_*` for testsuite env variables

18 months agoFix bugs related to tmp file creation in corner cases (#1561)
Alejandro R Mosteo [Wed, 14 Feb 2024 09:40:11 +0000 (10:40 +0100)]
Fix bugs related to tmp file creation in corner cases (#1561)

* fix: tmp dir being defined but not existing

* Improved log message for temp file creation

* Prevent deleting a tmp folder not created by us

18 months agoShow default temp folder in `alr version` (#1560)
Alejandro R Mosteo [Wed, 14 Feb 2024 09:35:45 +0000 (10:35 +0100)]
Show default temp folder in `alr version` (#1560)

18 months agoAdd bug report template (#1559)
Alejandro R Mosteo [Tue, 13 Feb 2024 13:10:59 +0000 (14:10 +0100)]
Add bug report template (#1559)

18 months agoRefactor return expression causing trouble with GNAT 13 (#1557)
Alejandro R Mosteo [Fri, 9 Feb 2024 11:33:50 +0000 (12:33 +0100)]
Refactor return expression causing trouble with GNAT 13 (#1557)

18 months agoRemove blue background setting from Windows shortcut (#1555)
Fabien Chouteau [Thu, 8 Feb 2024 18:03:25 +0000 (19:03 +0100)]
Remove blue background setting from Windows shortcut (#1555)

The shortcut from the Windows installer was setting a background color for PowerShell command prompt. The idea was to match the look of the PowerShell you would normally start, and avoid confusion with the CMD prompt which has a black background. But that didn't work very well as the background color just disappeared when running commands. Also it seems like Windows now uses a black background for the PowerShell anyway.

18 months agoFix bugs causing spurious diffs on updates without changes (#1550)
Alejandro R Mosteo [Wed, 31 Jan 2024 17:24:10 +0000 (18:24 +0100)]
Fix bugs causing spurious diffs on updates without changes (#1550)

* Fix bugs causing spurious diffs on update

Solutions were the same, but some types internally where using pointers instead
of pointed objects for comparison.

WIP

* Separate style checking from experimental Ada switches

18 months agoBugfix: exception when trying to select a tool without the assistant while the config...
Alejandro R Mosteo [Tue, 30 Jan 2024 10:16:51 +0000 (11:16 +0100)]
Bugfix: exception when trying to select a tool without the assistant while the configured one is missing (#1551)

* Fix exception when trying to select a toolchain

This problem arised only if trying to select a toolchain with --select <tool>
while the configured tool was missing on disk.

* Test for fix

18 months agoDocumentation about upgrading to alr 2.x (#1547)
Alejandro R Mosteo [Mon, 29 Jan 2024 11:15:57 +0000 (12:15 +0100)]
Documentation about upgrading to alr 2.x (#1547)

18 months agoFix regex for version detection of Fedora externals (#1545)
Alejandro R Mosteo [Mon, 29 Jan 2024 11:09:03 +0000 (12:09 +0100)]
Fix regex for version detection of Fedora externals (#1545)

* Fix improper regex in rpm-based detector

* Test for bugfix

* Document pending breaking changes

These require an `alr` or index version bump

* Self-review

18 months agoDon't fail fast in toolchain matrix CI checks
Alejandro R. Mosteo [Fri, 26 Jan 2024 16:35:05 +0000 (17:35 +0100)]
Don't fail fast in toolchain matrix CI checks

18 months agoRemove benign warning during toolchain discovery (#1540)
Alejandro R Mosteo [Wed, 24 Jan 2024 20:29:48 +0000 (21:29 +0100)]
Remove benign warning during toolchain discovery (#1540)

18 months agoUse e3 facilities for test skipping (#1537)
Alejandro R Mosteo [Tue, 23 Jan 2024 12:50:20 +0000 (13:50 +0100)]
Use e3 facilities for test skipping (#1537)

18 months agoMove To_Portable to body and make it a regular function (#1541)
Daly Brown [Tue, 23 Jan 2024 09:36:35 +0000 (04:36 -0500)]
Move To_Portable to body and make it a regular function (#1541)

18 months agoStreamline index forking (#1535)
Alejandro R Mosteo [Mon, 22 Jan 2024 19:19:38 +0000 (20:19 +0100)]
Streamline index forking (#1535)

18 months agoHarmonize and document test modifier variables (#1536)
Alejandro R Mosteo [Mon, 22 Jan 2024 19:18:54 +0000 (20:18 +0100)]
Harmonize and document test modifier variables (#1536)

18 months agoFix deployment over pre-existing dependency dir (#1542)
Alejandro R Mosteo [Mon, 22 Jan 2024 19:18:22 +0000 (20:18 +0100)]
Fix deployment over pre-existing dependency dir (#1542)

19 months agoFix redeploying of toolchains (#1533)
Alejandro R Mosteo [Fri, 19 Jan 2024 17:38:30 +0000 (18:38 +0100)]
Fix redeploying of toolchains (#1533)

* Test that fails prior to bugfix

* Fix for cache invalidation

An unrelated bug is fixed that happened when not using an actual binary crate
for a compiler in the testsuite.

19 months agoBetter location for large downloads (#1528)
Alejandro R Mosteo [Tue, 16 Jan 2024 10:43:55 +0000 (11:43 +0100)]
Better location for large downloads (#1528)

Discard $XDG_CACHE_HOME in favor of $XDG_DATA_HOME, as some distro guidelines
erroneously propose to mount the cache on tmpfs.

19 months agoDocument PAT creation and hint in `alr publish` help (#1529)
Alejandro R Mosteo [Tue, 16 Jan 2024 10:40:06 +0000 (11:40 +0100)]
Document PAT creation and hint in `alr publish` help (#1529)

19 months agoAdd missing with statements for Ada.Directories (#1525)
Rowan Walshe [Mon, 15 Jan 2024 15:51:37 +0000 (15:51 +0000)]
Add missing with statements for Ada.Directories (#1525)

19 months agoReport the name of an unreadable directory (#1523)
Simon Wright [Mon, 15 Jan 2024 13:15:55 +0000 (13:15 +0000)]
Report the name of an unreadable directory (#1523)

* Report the name of an unreadable directory.

  * src/alire/alire-index_on_disk.adb (New_Handler.Process_Local_Index):
      If the Path isn't a readable directory (e.g. because it doesn't
      exist), add it to the message in Outcome_Failure.
  * testsuite/tests/index/local-index-not-found/test.py: updated for
      new 'not a readable directory' report format.

* Handle Windows separator doubling.

20 months agoBuild appImage with GNAT 10 on Ubuntu 20.04 (#1519)
John Serock [Mon, 18 Dec 2023 18:09:38 +0000 (13:09 -0500)]
Build appImage with GNAT 10 on Ubuntu 20.04 (#1519)

20 months agoUpdate list of supported platforms in index spec (#1513)
John Serock [Mon, 11 Dec 2023 17:43:39 +0000 (12:43 -0500)]
Update list of supported platforms in index spec (#1513)

20 months agoMerge pull request #1514 from atalii/doc-chdir
Fabien Chouteau [Wed, 6 Dec 2023 13:53:37 +0000 (14:53 +0100)]
Merge pull request #1514 from atalii/doc-chdir

Document --chdir in user-changes

20 months agoDocument --chdir in user-changes
Tali Auster [Tue, 5 Dec 2023 15:43:16 +0000 (08:43 -0700)]
Document --chdir in user-changes

21 months agoOffer uninstalled compiler as fallback with warning (#1508)
Alejandro R Mosteo [Tue, 21 Nov 2023 10:13:56 +0000 (11:13 +0100)]
Offer uninstalled compiler as fallback with warning (#1508)

* Allow solving with unistalled tools as fallback

* Fix precedence of installed compiler over remote ones

* Add warning in solution diff about toolchain download

* Fallback on installed compiler over uninstalled one

This is after checking that the preferred compiler cannot fulfill the compiler
dependency.

* Tweaks to restore former behaviors

* Fix test that inadvertently used virtual crate

It should have been real all along without alternatives

* Rebase tweaks

* Reword information message

21 months agoBump version post-beta1
Alejandro R. Mosteo [Thu, 16 Nov 2023 08:34:20 +0000 (09:34 +0100)]
Bump version post-beta1

21 months agoLoad configuration earlier from proper location (#1501)
Alejandro R Mosteo [Thu, 16 Nov 2023 06:23:22 +0000 (07:23 +0100)]
Load configuration earlier from proper location (#1501)

* Move configuration loading earlier

Also make sure it's impossible to use configuration before the proper path is
set.

* New test

* Better encapsulation

* Windows fix

21 months agoFilter out Unicode in SI_Unit conversion (#1506)
Alejandro R Mosteo [Wed, 15 Nov 2023 13:48:32 +0000 (14:48 +0100)]
Filter out Unicode in SI_Unit conversion (#1506)

21 months agoNew warning when external GNAT selected but another compiler version is needed (...
Alejandro R Mosteo [Wed, 15 Nov 2023 13:47:52 +0000 (14:47 +0100)]
New warning when external GNAT selected but another compiler version is needed (#1500)

* New warning for externally selected gnat

* New test

21 months agoFix regression when `alr with`ing a virtual crate without actual releases (#1507)
Alejandro R Mosteo [Wed, 15 Nov 2023 13:47:26 +0000 (14:47 +0100)]
Fix regression when `alr with`ing a virtual crate without actual releases (#1507)

* Do not report a virtual crate as inexistent

* Test to avoid future regression

21 months agoUse Ada quotes in test skeletons
Alejandro R. Mosteo [Tue, 14 Nov 2023 16:40:14 +0000 (17:40 +0100)]
Use Ada quotes in test skeletons

21 months agoAmend style switches (expand -gnatyg). (#1497)
Simon Wright [Tue, 14 Nov 2023 13:05:36 +0000 (13:05 +0000)]
Amend style switches (expand -gnatyg). (#1497)

-gnatyg is "check standard GNAT style rules, same as ydISux", but in
GCC 14 it will include a new switch, -gnatyz (check parentheses not
required by operator precedence rules) which will mean that use of
extra parens to clarify intent without deep knowledge of the rules
will trigger fatal warnings; for example in alire-conditional_trees.adb

   function Contains_ORs (This : Tree) return Boolean is
      ((not This.Is_Empty) and then This.Root.Contains_ORs);
       ^

Refer GCC Bugzilla PR 112446.

  * alire_common.gpr (Style_Check_Switches): Remove -gnatyg and replace
    by the pre-GCC 14 equivalent.

21 months agoFix unwanted stack trace on `alr publish --tar` with broken manifest (#1499)
Alejandro R Mosteo [Tue, 14 Nov 2023 06:42:03 +0000 (07:42 +0100)]
Fix unwanted stack trace on `alr publish --tar` with broken manifest (#1499)

* Avoid unhandled exception in `alr publish --tar`

Fixes #1214

Also unify a couple of error messages

* Update test to check this fix

* Self-review

21 months agoFix bug for interactive crate descr ending with `"` (#1495)
Alejandro R Mosteo [Thu, 9 Nov 2023 13:49:31 +0000 (14:49 +0100)]
Fix bug for interactive crate descr ending with `"` (#1495)

21 months agoAdd Savannah GNU repository to trusted remotes
Alejandro R. Mosteo [Wed, 8 Nov 2023 12:21:23 +0000 (13:21 +0100)]
Add Savannah GNU repository to trusted remotes

21 months agoDiagnose missing executable when running an action (#1493)
Alejandro R Mosteo [Wed, 8 Nov 2023 11:38:29 +0000 (12:38 +0100)]
Diagnose missing executable when running an action (#1493)

* Fix command not found in actions

* New test

21 months agoDon't trigger `alr` help on `alr exec -- command --help` (#1491)
Alejandro R Mosteo [Wed, 8 Nov 2023 10:58:34 +0000 (11:58 +0100)]
Don't trigger `alr` help on `alr exec -- command --help` (#1491)

* Fix "-h/--help" being catched after "--"

* Bump clic dependency

* Fix test on Windows

21 months agoSimpler error on `alr with` for unknown crates (#1489)
Alejandro R Mosteo [Mon, 6 Nov 2023 10:28:14 +0000 (11:28 +0100)]
Simpler error on `alr with` for unknown crates (#1489)

21 months agoGenerate loadable project during `alr init` (#1486)
Alejandro R Mosteo [Mon, 6 Nov 2023 10:15:17 +0000 (11:15 +0100)]
Generate loadable project during `alr init` (#1486)

21 months agoFix list of default licenses (#1490)
Alejandro R Mosteo [Mon, 6 Nov 2023 10:14:55 +0000 (11:14 +0100)]
Fix list of default licenses (#1490)

* Remove duplication in error message output

* Early detect bad license among choices

* Fix bad license

* Fix error deduplication

* New test for default licenses

21 months agoRename AppImage workflow job
Alejandro R. Mosteo [Fri, 27 Oct 2023 12:34:11 +0000 (14:34 +0200)]
Rename AppImage workflow job

21 months agoimplement -C/--chdir flag (#1479)
tali auster [Fri, 27 Oct 2023 09:25:52 +0000 (03:25 -0600)]
implement -C/--chdir flag (#1479)

* implement -C/--chdir flag

* use `alr` instead of Alire in help text.

* test --chdir flag

* clean up with-chdir test

21 months agoFix documented default prefix for install (#1482)
Manuel [Thu, 26 Oct 2023 16:19:16 +0000 (18:19 +0200)]
Fix documented default prefix for install (#1482)

See comments in issue #1481

21 months agoHonor the NO_COLOR environment variable (#1480)
Manuel [Mon, 23 Oct 2023 12:18:33 +0000 (14:18 +0200)]
Honor the NO_COLOR environment variable (#1480)

According to https://no-color.org/

22 months agoremove duplicate section of user-changes.md (#1477)
tali auster [Fri, 20 Oct 2023 07:26:16 +0000 (01:26 -0600)]
remove duplicate section of user-changes.md (#1477)

"Enable shared dependencies by default" was in there twice.

22 months agoSeparate AppImage to own workflow (#1475)
Alejandro R Mosteo [Thu, 19 Oct 2023 15:04:21 +0000 (17:04 +0200)]
Separate AppImage to own workflow (#1475)

22 months agoMerge remote-tracking branch 'alire/release/2.0'
Alejandro R. Mosteo [Thu, 19 Oct 2023 13:33:12 +0000 (15:33 +0200)]
Merge remote-tracking branch 'alire/release/2.0'

22 months agoBump version to 2.0-beta1
Alejandro R. Mosteo [Tue, 17 Oct 2023 09:51:16 +0000 (11:51 +0200)]
Bump version to 2.0-beta1

22 months agoBetter triggers for actions on release creation
Alejandro R. Mosteo [Tue, 17 Oct 2023 09:38:12 +0000 (11:38 +0200)]
Better triggers for actions on release creation

22 months agoBetter triggers for actions on release creation
Alejandro R. Mosteo [Tue, 17 Oct 2023 09:38:12 +0000 (11:38 +0200)]
Better triggers for actions on release creation

22 months agoMerge remote-tracking branch 'alire/master' into release/2.0
Alejandro R. Mosteo [Tue, 17 Oct 2023 09:24:31 +0000 (11:24 +0200)]
Merge remote-tracking branch 'alire/master' into release/2.0

22 months agoEnable shared dependencies by default (#1449)
Alejandro R Mosteo [Tue, 17 Oct 2023 09:23:57 +0000 (11:23 +0200)]
Enable shared dependencies by default (#1449)

* Set shared dependencies as the default

* user-changes.md: Explain shared builds

22 months agobugfix: the wrong folder was searched for nested crates (#1473)
Alejandro R Mosteo [Sat, 14 Oct 2023 20:02:31 +0000 (22:02 +0200)]
bugfix: the wrong folder was searched for nested crates (#1473)

We were attempting to enter a folder that not always will exist.

22 months agoBetter collision avoidance for tmp filenames (#1469)
Alejandro R Mosteo [Fri, 6 Oct 2023 16:00:56 +0000 (18:00 +0200)]
Better collision avoidance for tmp filenames (#1469)

22 months agoMerge remote-tracking branch 'alire/master' into release/2.0
Alejandro R. Mosteo [Wed, 4 Oct 2023 09:05:00 +0000 (11:05 +0200)]
Merge remote-tracking branch 'alire/master' into release/2.0

22 months agoAuto-update index periodically (#1447)
Alejandro R Mosteo [Wed, 4 Oct 2023 09:01:52 +0000 (11:01 +0200)]
Auto-update index periodically (#1447)

* Auto-refresh indexes after some time (default 24h)

* ask user on first autoupdate

* User changes

* Test behavior on network failure

22 months agoNew `alr printenv --last-build` (#1444)
Alejandro R Mosteo [Tue, 3 Oct 2023 16:30:58 +0000 (18:30 +0200)]
New `alr printenv --last-build` (#1444)

* New `alr printenv --last-build`

This may be useful when no direct editing of manifests is convenient, as
otherwise `printenv` will always use the manifest's configuration.

* make new behavior the default with fallback

* CI fixes

22 months agoMerge remote-tracking branch 'alire/master' into release/2.0
Alejandro R. Mosteo [Wed, 27 Sep 2023 14:47:53 +0000 (16:47 +0200)]
Merge remote-tracking branch 'alire/master' into release/2.0

22 months agoComprehensive shared builds tests and related tweaks (#1459)
Alejandro R Mosteo [Wed, 27 Sep 2023 14:46:09 +0000 (16:46 +0200)]
Comprehensive shared builds tests and related tweaks (#1459)

* Added `shared-build` driver

* Added `build_mode` key to the Python driver

* Fix config generation in `alr update` in shared mode

* Remove need for compiler in absence of dependencies

* Fixed monorepo tests and base dir

* Delay config generation in sandboxed mode too

* Include explicit switches in build hash inputs

This is necessary because for shared builds we're never regenerating the
configuration, so changes in switches went undetected

* Require complete config for sandboxed build

* Self-review

* Update new tests

22 months agoRemove ".git" after cloning, with option to disable (#1463)
Alejandro R Mosteo [Mon, 25 Sep 2023 18:40:57 +0000 (20:40 +0200)]
Remove ".git" after cloning, with option to disable (#1463)

* Remove ".git" after cloning, with option to disable

Also make clones shallow (they already were for pins)

* Fix test

22 months agoFix corner case related to git+file:// URLs (#1465)
Alejandro R Mosteo [Mon, 25 Sep 2023 17:16:51 +0000 (19:16 +0200)]
Fix corner case related to git+file:// URLs (#1465)

22 months agoOmit global switches in subcommand-specific help (#1462)
Alejandro R Mosteo [Mon, 25 Sep 2023 14:09:51 +0000 (16:09 +0200)]
Omit global switches in subcommand-specific help (#1462)

* Omit global switches in subcmd-specific help

* Update clic dependency

22 months agoRemove ".git" after cloning, with option to disable (#1463)
Alejandro R Mosteo [Mon, 25 Sep 2023 18:40:57 +0000 (20:40 +0200)]
Remove ".git" after cloning, with option to disable (#1463)

* Remove ".git" after cloning, with option to disable

Also make clones shallow (they already were for pins)

* Fix test

22 months agoFix corner case related to git+file:// URLs (#1465)
Alejandro R Mosteo [Mon, 25 Sep 2023 17:16:51 +0000 (19:16 +0200)]
Fix corner case related to git+file:// URLs (#1465)

22 months agoOmit global switches in subcommand-specific help (#1462)
Alejandro R Mosteo [Mon, 25 Sep 2023 14:09:51 +0000 (16:09 +0200)]
Omit global switches in subcommand-specific help (#1462)

* Omit global switches in subcmd-specific help

* Update clic dependency

22 months agoFix location of default install prefix (#1461)
Alejandro R Mosteo [Mon, 25 Sep 2023 10:46:17 +0000 (12:46 +0200)]
Fix location of default install prefix (#1461)

23 months agoFix location of default install prefix
Alejandro R. Mosteo [Thu, 21 Sep 2023 15:41:49 +0000 (17:41 +0200)]
Fix location of default install prefix

23 months agoSet shared dependencies as the default
Alejandro R. Mosteo [Sun, 10 Sep 2023 20:59:17 +0000 (22:59 +0200)]
Set shared dependencies as the default

user-changes.md: Explain shared builds

23 months agoComprehensive tests for shared builds
Alejandro R. Mosteo [Fri, 15 Sep 2023 11:27:48 +0000 (13:27 +0200)]
Comprehensive tests for shared builds

Added `shared-build` driver

Added `build_mode` key to the Python driver

Fix config generation in `alr update` in shared mode

Remove need for compiler in absence of dependencies

Fixed monorepo tests and base dir

Delay config generation in sandboxed mode too

Include explicit switches in build hash inputs

This is necessary because for shared builds we're never regenerating the
configuration, so changes in switches went undetected

Require complete config for sandboxed build

Self-review

23 months agoPrint UTF-8 strings using `GNAT.IO` in `Alr.Commands` subsystem (#1458)
Manuel [Tue, 19 Sep 2023 09:46:13 +0000 (11:46 +0200)]
Print UTF-8 strings using `GNAT.IO` in `Alr.Commands` subsystem (#1458)

Supersedes #1457

Fixes #1456

23 months agoRemove spurious -g (#1454)
Alejandro R Mosteo [Mon, 18 Sep 2023 08:22:01 +0000 (10:22 +0200)]
Remove spurious -g (#1454)

23 months agoFix bugs for corner cases with shared dependencies (#1453)
Alejandro R Mosteo [Fri, 15 Sep 2023 07:19:28 +0000 (09:19 +0200)]
Fix bugs for corner cases with shared dependencies (#1453)

* Fix a couple of bugs related to new build system

* Test for the fixed bug

* Self-review

23 months agoCleanup after shared releases impl (#1448)
Alejandro R Mosteo [Wed, 13 Sep 2023 15:29:02 +0000 (17:29 +0200)]
Cleanup after shared releases impl (#1448)

* Omit default mention in shared deps help

* Remove Export_Env arguments all-around

Now that we delay all actions to build time, we can set environment just at
that time and avoid complications.

* Debug workflow and dependency hashes

* Self-review

23 months agoCosmetic change to binary origin image when unavailable (#1446)
Alejandro R Mosteo [Wed, 13 Sep 2023 13:01:38 +0000 (15:01 +0200)]
Cosmetic change to binary origin image when unavailable (#1446)

23 months agoFix bug in dependency traversal order (#1445)
Alejandro R Mosteo [Wed, 13 Sep 2023 12:58:58 +0000 (14:58 +0200)]
Fix bug in dependency traversal order (#1445)

* Fix bug in solution traversal related to linked releases

* New test

* CI fixes

23 months agoRemove old release-sharing mechanism remnants (#1451)
Alejandro R Mosteo [Wed, 13 Sep 2023 09:59:22 +0000 (11:59 +0200)]
Remove old release-sharing mechanism remnants (#1451)

23 months agoUse the same Find function in "show" as in "show --jekyll" (#1452)
Manuel [Wed, 13 Sep 2023 07:58:59 +0000 (09:58 +0200)]
Use the same Find function in "show" as in "show --jekyll" (#1452)

This fixes #1402.

23 months agoNew `ALR_TRACEBACK_ENABLED` env. var. (#1450)
Alejandro R Mosteo [Tue, 12 Sep 2023 12:27:59 +0000 (14:27 +0200)]
New `ALR_TRACEBACK_ENABLED` env. var. (#1450)

* Add traceback enabling env var

* Test for new config var

23 months agoRun delayed post-fetch actions during build (#1441)
Alejandro R Mosteo [Mon, 4 Sep 2023 17:43:19 +0000 (19:43 +0200)]
Run delayed post-fetch actions during build (#1441)

* Refactored flags into new crate

* Delay post-fetch to first build (ensures complete env)

* Folderize flags

* Self-review

* Simpler flag use, better encapsulation

* Fix Windows-only test

23 months agoAdd some hardcoded externals to hash input (#1440)
Alejandro R Mosteo [Mon, 4 Sep 2023 16:53:53 +0000 (18:53 +0200)]
Add some hardcoded externals to hash input (#1440)

23 months agoInclude hash of dependencies in build hash (#1439)
Alejandro R Mosteo [Mon, 4 Sep 2023 16:26:15 +0000 (18:26 +0200)]
Include hash of dependencies in build hash (#1439)

Since a dependency may use different specs based on config values, environment
variables, GPR externals... we include the hash of dependencies in dependents'
hash inputs.

23 months agoReuse hashing mechanism to regen config in sandboxed mode (#1438)
Alejandro R Mosteo [Mon, 4 Sep 2023 15:49:53 +0000 (17:49 +0200)]
Reuse hashing mechanism to regen config in sandboxed mode (#1438)

* Regenerate configs on demand (sandboxed deps)

Leverage the new build hashing to make sure when a configuration needs
regenerating. This is pessimistic but safer than what we had, and more
future-proof.

* fix wrong switches generation

* test fixes

* New test, checking no unneeded rebuilds happen

* Fixes for CI-detected issues

23 months agoGenerate crate config on demand for shared dependencies (#1435)
Alejandro R Mosteo [Mon, 4 Sep 2023 12:14:12 +0000 (14:14 +0200)]
Generate crate config on demand for shared dependencies (#1435)

We needn't to generate it more than once, when the unique build folder is
created.

23 months agoAdd crate config variables to build hash (#1434)
Alejandro R Mosteo [Mon, 4 Sep 2023 11:33:01 +0000 (13:33 +0200)]
Add crate config variables to build hash (#1434)

* Add crate configuration values to build hash inputs

* Tests for configuration hashing

23 months agoDelay syncing shared build dir until the actual build (#1433)
Alejandro R Mosteo [Mon, 4 Sep 2023 10:57:28 +0000 (12:57 +0200)]
Delay syncing shared build dir until the actual build (#1433)

This is necessary because the build dir hash depends on the crate configuration
being complete, and this is only required at the time of building.

23 months agoAdd crate environment to build hash inputs (#1432)
Alejandro R Mosteo [Mon, 4 Sep 2023 10:02:37 +0000 (12:02 +0200)]
Add crate environment to build hash inputs (#1432)

* Add crate-modified env vars to hash input

* Test environment hashing

23 months agoRefactor config builtins (#1431)
Alejandro R Mosteo [Mon, 4 Sep 2023 09:29:07 +0000 (11:29 +0200)]
Refactor config builtins (#1431)

* Refactor configuration builtins

Gives them a tagged type that simplifies use and aglutinates default,
description, checks, which were previously not formally required or scattered.

* Colorize help output

23 months agoAdd compiler version to build hash (#1442)
Alejandro R Mosteo [Mon, 4 Sep 2023 08:56:25 +0000 (10:56 +0200)]
Add compiler version to build hash (#1442)

* Update pins and dependencies

* Include GPR externals in hash computation

* Avoid recursivity when loading environment

* Test of hashing externals

* Add compiler version to the build hash

* Tests for compiler in build hash input

* Improvements to test

23 months agoAdd GPR externals and env. vars. to build hash computation (#1428)
Alejandro R Mosteo [Mon, 4 Sep 2023 08:22:03 +0000 (10:22 +0200)]
Add GPR externals and env. vars. to build hash computation (#1428)

* Update pins and dependencies

* Include GPR externals in hash computation

* Avoid recursivity when loading environment

* Test of hashing externals

23 months agoFix use of canary file during `alr install` (#1429)
Alejandro R Mosteo [Thu, 24 Aug 2023 12:34:26 +0000 (14:34 +0200)]
Fix use of canary file during `alr install` (#1429)

23 months agoNew Force_Delete (#1426)
Alejandro R Mosteo [Thu, 24 Aug 2023 12:34:08 +0000 (14:34 +0200)]
New Force_Delete (#1426)

23 months agoReplace `rsync` with `GNATCOLL.VFS.Copy` (#1427)
Alejandro R Mosteo [Thu, 24 Aug 2023 12:33:30 +0000 (14:33 +0200)]
Replace `rsync` with `GNATCOLL.VFS.Copy` (#1427)

2 years agoMacOS; export PATH variables for includes and libraries. (#1420)
Simon Wright [Mon, 21 Aug 2023 15:14:46 +0000 (16:14 +0100)]
MacOS; export PATH variables for includes and libraries. (#1420)

* MacOS; export PATH variables for includes and libraries.

Homebrew and MacPorts install include files and libraries in places
where GCC won't look by default.

GCC will use these environment variables if set:

   C_INCLUDE_PATH     for C includes
   CPLUS_INCLUDE_PATH for C++ includes
   LIBRARY_PATH       for libraries

Both of the distribution managers place (symbolic links to) include
files in ${top_level}/include and libraries in ${top_level}/lib.

   For Homebrew on Intel silicon, top_level is normally /usr/local.
   For Homebrew on Apple silicon, top_level is normally /opt/homebrew.
   For MacPorts,                  top_level is normally /opt/local

  * src/alire/alire-platforms-current.ads (Load_Environment): add note
      on macOS use.
  * src/alire/os_macos/alire-platforms-current__macos.adb
    (context): added Alire.Environment (was limited), Ada.Directories.
    (Brew_Access): new.
    (Homebrew_Present): if Brew_Access is not null.
    (Detected_Distribution): made into an expression function.
    (Containing_Containing_Dir): new, used in Distribution_Root.
    (Distribution_Root): reworked.
    (Load_Environment): if either distribution is present, arrange to
      export the environment variables to suit.

* Update testsuite to match new macOS distribution detection.

  * testsuite/drivers/helpers.py (distribution): if on macOS, check whether
      the distribution management tool is on the PATH. We used to check for
      the environment variable HOMEBREW_PREFIX, but users don't have to
      arrange for this to be set in order to run Homebrew.

      First, if 'brew' is found, the distribution is Homebrew.
      If not and 'port' is found, the distribution is MacPorts.
      Otherwise, the distribution is unknown.

* In the macOS CI workflow, run the test script once only.

  * .github/workflows/ci-macos.yml (Run test script): remove the second
      call, which set up HOMEBREW_PREFIX (now no longer used by alr),
      and remove the note '(without Homebrew)' in the first.

2 years agoUse build profile in build hash (#1425)
Alejandro R Mosteo [Mon, 21 Aug 2023 14:12:45 +0000 (16:12 +0200)]
Use build profile in build hash (#1425)

* Compute hash using build profile

* Fix problem with multiple hashes in one run

Rooted in that default build profiles were used first and later the actual
profiles caused different folders to be used, in turn causing errors with the
conflicting CRATE_ALIRE_PREFIX variables.

* Write hash inputs to build dirs

* Testsuite additions and fixes

* Self-review

* Update pins and dependencies