alire-project / alire

Command-line tool from the Alire project and supporting library
GNU General Public License v3.0
288 stars 49 forks source link

Deploying a dependency fails the first time #1517

Closed simonjwright closed 9 months ago

simonjwright commented 11 months ago

(dependencies.shared set to false because of existing issue #1512)

After determining the dependencies, alr starts deploying them; for each, the below happens; so you try again, and that one succeeds, but the next one fails in the same way.

info: ⓘ Deploying libgpr=23.0.0...
debug: Creating folder: /Users/simon/Developer/libadalang2xml/alire/cache/dependencies/alr-hcki.tmp
detail: Downloading file: https://github.com/AdaCore/gprbuild/archive/v23.0.0/gprbuild-23.0.0.zip
detail: Spawning: ["curl", "https://github.com/AdaCore/gprbuild/archive/v23.0.0/gprbuild-23.0.0.zip", "--location", "--progress-bar", "--output", "/Users/simon/Developer/libadalang2xml/alire/cache/dependencies/alr-hcki.tmp/gprbuild-23.0.0.zip"]
  #=#=- #   #                                                                  
detail: Verifying integrity...
debug: Computing SHA512...
detail: Deploying source archive gprbuild-23.0.0.zip into /Users/simon/Developer/libadalang2xml/alire/cache/dependencies/alr-hcki.tmp...
detail: Spawning: ["unzip", "-q", "/Users/simon/Developer/libadalang2xml/alire/cache/dependencies/alr-hcki.tmp/gprbuild-23.0.0.zip", "-d", "/Users/simon/Developer/libadalang2xml/alire/cache/dependencies/alr-hcki.tmp"]
debug: Deleting source archive: /Users/simon/Developer/libadalang2xml/alire/cache/dependencies/alr-hcki.tmp/gprbuild-23.0.0.zip
debug: Unpacked crate root detected as: gprbuild-23.0.0
debug: Renaming into place /Users/simon/Developer/libadalang2xml/alire/cache/dependencies/alr-hcki.tmp as /Users/simon/Developer/libadalang2xml/alire/cache/dependencies/libgpr_23.0.0_34e332b9
debug: ---8<--- Exception dump begin ---8<---
debug: ADA.IO_EXCEPTIONS.USE_ERROR
debug: new name "/Users/simon/Developer/libadalang2xml/alire/cache/dependencies/libgpr_23.0.0_34e332b9" designates a file that already exists
debug: raised ADA.IO_EXCEPTIONS.USE_ERROR : new name "/Users/simon/Developer/libadalang2xml/alire/cache/dependencies/libgpr_23.0.0_34e332b9" designates a file that already exists
Load address: 0x1022a8000
Call stack traceback locations:
0x102ee1958 0x102876b94 0x102877c78 0x102ab2394 0x102af10f8 0x102b09c6c 0x102b54a40 0x102b53508 0x102b09d64 0x102b09f88 0x102af13a0 0x102af160c 0x102b04ed8 0x102b0518c 0x1023be4e0 0x102317eb0 0x1023180fc 0x1023b4a18 0x1023c0434 0x1022aba3c 0x1022b02bc

This is the stack trace:

alire__assert (in alr) (alire.adb:146)
alire__releases__deploy (in alr) (alire-releases.adb:322)
alire__roots__deploy_dependencies___wrapped_statements__deploy_release.99 (in alr) (alire-roots.adb:754)
alire__roots__traverse___wrapped_statements__traverse_wrap.238 (in alr) (alire-roots.adb:1982)
alire__solutions__traverse__visit.206 (in alr) (alire-solutions.adb:1482)
alire__solutions__traverse (in alr) (alire-solutions.adb:1549)
alire__roots__traverse___wrapped_statements.237 (in alr) (alire-roots.adb:1986)
alire__roots__traverse (in alr) (alire-roots.adb:1966)
alire__roots__deploy_dependencies___wrapped_statements.98 (in alr) (alire-roots.adb:785)
alire__roots__deploy_dependencies (in alr) (alire-roots.adb:708)
alire__roots__sync_from_manifest___wrapped_statements.202 (in alr) (alire-roots.adb:1685)
alire__roots__sync_from_manifest (in alr) (alire-roots.adb:1628)
alr__commands__requires_workspace (in alr) (alr-commands.adb:369)
alr__commands__build__execute___wrapped_statements.4 (in alr) (alr-commands-build.adb:65)
alr__commands__build__execute (in alr) (alr-commands-build.adb:51)
alr__commands__sub_cmd__execute (in alr) (clic-subcommand-instance.adb:749)
alr__commands__execute (in alr) (alr-commands.adb:522)
_ada_alr__main (in alr) (alr-main.adb:10)
main (in alr) (b__alr-main.adb:2195)
mosteo commented 11 months ago

I have seen this sporadically but not fully reproducible. Is it so for you? The backtrace should be enough to get rid of it though.