Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alr publish with remote source archive does not work #1804

Open
2 tasks done
damaki opened this issue Dec 1, 2024 · 1 comment
Open
2 tasks done

alr publish with remote source archive does not work #1804

damaki opened this issue Dec 1, 2024 · 1 comment

Comments

@damaki
Copy link

damaki commented Dec 1, 2024

Checklist

  • I've included the output of alr version.
  • I've included complete steps to reproduce my issue.

Describe the bug
I have a remote source archive (a .tar.gz file) in my project's release on GitHub and I'm trying to publish it with alr publish <URL> as per the documentation at https://alire.ada.dev/docs/#starting-with-a-remote-source-archive. The command does not work and produces an error message. It looks like Alire thinks its a VCS origin instead of a remote source archive.

To Reproduce
Steps to reproduce the behavior:

  1. Run alr publish https://github.com/damaki/nrf52-runtimes/releases/download/v14.0.0/light-nrf52832-14.0.0.tar.gz

The command produces the following error:

ERROR: Could not complete the publishing assistant:
ERROR:    A commit id is mandatory for a VCS origin

Expected Behavior
I expect Alire to detect that it's a remote source archive for publishing, not a VCS origin, and continue with the publishing process.

alr version

APPLICATION
alr version:               2.0.2+9b80158
libalire version:          2.0.2+9b80158
compilation date:          2024-10-09 17:02:15
compiled with version:     14.2.0

CONFIGURATION
settings folder:           C:\Users\Dan\AppData\Local\alire\settings
cache folder:              C:\Users\Dan\AppData\Local\alire\cache
vault folder:              C:\Users\Dan\AppData\Local\alire\cache\releases
build folder:              C:\Users\Dan\AppData\Local\alire\cache\builds
temp folder:               C:\Users\Dan\AppData\Local\Temp
force flag:                FALSE
non-interactive flag:      FALSE
community index branch:    stable-1.3.0
compatible index versions: ^1.1 & <=1.3.0
indexes folder:            C:\Users\Dan\AppData\Local\alire\settings\indexes
indexes metadata:          OK
index #1:                  (community) git+https://github.com/alire-project/alire-index#stable-1.3.0
toolchain folder:          C:\Users\Dan\AppData\Local\alire\cache\toolchains
toolchain assistant:       disabled
tool #1 gnat:              gnat_arm_elf=14.2.1
tool #2 gprbuild:          gprbuild=22.0.1
system package manager:    not found: unknown package manager
distro detection disabled: FALSE

WORKSPACE
root status:               OUTSIDE
root release:              N/A
root load error:           N/A
root folder:               N/A
current folder:            C:\Users\Dan

SYSTEM
distribution:              DISTRIBUTION_UNKNOWN
host-arch:                 X86_64
os:                        WINDOWS
target:                    NATIVE
toolchain:                 USER
word-size:                 BITS_64

alr logs

$ alr -vv -d publish https://github.com/damaki/nrf52-runtimes/releases/download/v14.0.0/light-nrf52832-14.0.0.tar.gz
-->> Load config key: 'index.auto_update_asked' = 'TOML_BOOLEAN'
-->> Load config key: 'index.last_update' = 'TOML_INTEGER'
-->> Load config key: 'toolchain.assistant' = 'TOML_BOOLEAN'
-->> Load config key: 'toolchain.external.gnat' = 'TOML_BOOLEAN'
-->> Load config key: 'toolchain.external.gprbuild' = 'TOML_BOOLEAN'
-->> Load config key: 'toolchain.use.gnat' = 'TOML_STRING'
-->> Load config key: 'toolchain.use.gprbuild' = 'TOML_STRING'
-->> Load config key: 'user.email' = 'TOML_STRING'
-->> Load config key: 'user.github_login' = 'TOML_STRING'
-->> Load config key: 'user.name' = 'TOML_STRING'
-->> Looking for alire metadata at: C:\Users\Dan
-->> Looking for alire metadata at: C:\Users
-->> Looking for alire metadata at: C:\
-->> Root directory reached without finding alire metadata
-> Using default value for configuration 'distribution.disable_detection': 'FALSE'
-->> Registering variable for expressions: distribution
-->> Registering variable for expressions: os
-->> Registering variable for expressions: toolchain
-->> Registering variable for expressions: word-size
-->> Registering variable for expressions: host-arch
-->> alr platform configured
-->> Begin command line:
-->>    Arg 0 (len 34): C:\Program Files\Alire\bin\alr.exe
-->>    Arg 1 (len 3): -vv
-->>    Arg 2 (len 2): -d
-->>    Arg 3 (len 7): publish
-->>    Arg 4 (len 95): https://github.com/damaki/nrf52-runtimes/releases/download/v14.0.0/light-nrf52832-14.0.0.tar.gz
-->> End command line.
-->> Setenv PATH=C:\Users\Dan\AppData\Local\alire\cache\msys64\usr\bin;C:\Users\Dan\AppData\Local\alire\cache\msys64\usr\local\bin;C:\Users\Dan\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Dan\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Alire\bin;C:\Program Files\CMake\bin;C:\Coq\bin;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files\Git\cmd;C:\Program Files\Mullvad VPN\resources;D:\GNATSTUDIO\bin;C:\Users\Dan\.cargo\bin;C:\Ruby31-x64\bin;C:\Users\Dan\AppData\Local\Programs\Python\Python312\Scripts;C:\Users\Dan\AppData\Local\Programs\Python\Python312;C:\Users\Dan\AppData\Local\Microsoft\WindowsApps;C:\Users\Dan\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
-->> Platform-specific initialization done.
-->> Looking for indexes at C:\Users\Dan\AppData\Local\alire\settings\indexes
-> Found 1 indexes
-->> Index auto-refresh not needed: 1h of 24h elapsed
-->> ---8<--- Exception dump begin ---8<---
-->> ALIRE.CHECKED_ERROR
-->> A commit id is mandatory for a VCS origin
-->> raised ALIRE.CHECKED_ERROR : A commit id is mandatory for a VCS origin
[C:\Program Files\Alire\bin\alr.exe]
0x7ff74900bc64 Semantic_Versioning.Basic.Restrictions.First_Index at alire-publish.adb:1234
0x7ff7488a42b2 Semantic_Versioning.Basic.Restrictions.First_Index at alr-commands-publish.adb:128
0x7ff7488a4550 Semantic_Versioning.Basic.Restrictions.First_Index at alr-commands-publish.adb:23
0x7ff748921628 Semantic_Versioning.Basic.Restrictions.First_Index at clic-subcommand-instance.adb:749
0x7ff74892deeb Semantic_Versioning.Basic.Restrictions.First_Index at alr-commands.adb:561
0x7ff7488016a0 Alr.Main at alr-main.adb:13
0x7ff748804f2e Main at b__alr-main.adb:2306
0x7ff74880133e __tmainCRTStartup at ???
0x7ff748801144 mainCRTStartup at ???
[C:\Windows\System32\KERNEL32.DLL]
0x7ff890907372
[C:\Windows\SYSTEM32\ntdll.dll]
0x7ff891b9cc8f

-->> --->8--- Exception dump end ----->8---
stderr: ALIRE.CHECKED_ERROR
stderr: A commit id is mandatory for a VCS origin
stderr: raised ALIRE.CHECKED_ERROR : A commit id is mandatory for a VCS origin
[C:\Program Files\Alire\bin\alr.exe]
0x7ff74900bc64 Semantic_Versioning.Basic.Restrictions.First_Index at alire-publish.adb:1234
0x7ff7488a42b2 Semantic_Versioning.Basic.Restrictions.First_Index at alr-commands-publish.adb:128
0x7ff7488a4550 Semantic_Versioning.Basic.Restrictions.First_Index at alr-commands-publish.adb:23
0x7ff748921628 Semantic_Versioning.Basic.Restrictions.First_Index at clic-subcommand-instance.adb:749
0x7ff74892deeb Semantic_Versioning.Basic.Restrictions.First_Index at alr-commands.adb:561
0x7ff7488016a0 Alr.Main at alr-main.adb:13
0x7ff748804f2e Main at b__alr-main.adb:2306
0x7ff74880133e __tmainCRTStartup at ???
0x7ff748801144 mainCRTStartup at ???
[C:\Windows\System32\KERNEL32.DLL]
0x7ff890907372
[C:\Windows\SYSTEM32\ntdll.dll]
0x7ff891b9cc8f

stderr: Could not complete the publishing assistant
A commit id is mandatory for a VCS origin
ERROR: Could not complete the publishing assistant:
ERROR:    A commit id is mandatory for a VCS origin
-->> ---8<--- Exception dump begin ---8<---
-->> ALIRE.CHECKED_ERROR
-->> Could not complete the publishing assistant
A commit id is mandatory for a VCS origin
-->> raised ALIRE.CHECKED_ERROR : alire-stored-error:1
[C:\Program Files\Alire\bin\alr.exe]
0x7ff7492cb6aa Semantic_Versioning.Basic.Restrictions.First_Index at alire.adb:284
0x7ff74900c851 Semantic_Versioning.Basic.Restrictions.First_Index at alire-publish.adb:1266
0x7ff7488a42b2 Semantic_Versioning.Basic.Restrictions.First_Index at alr-commands-publish.adb:128
0x7ff7488a4550 Semantic_Versioning.Basic.Restrictions.First_Index at alr-commands-publish.adb:23
0x7ff748921628 Semantic_Versioning.Basic.Restrictions.First_Index at clic-subcommand-instance.adb:749
0x7ff74892deeb Semantic_Versioning.Basic.Restrictions.First_Index at alr-commands.adb:561
0x7ff7488016a0 Alr.Main at alr-main.adb:13
0x7ff748804f2e Main at b__alr-main.adb:2306
0x7ff74880133e __tmainCRTStartup at ???
0x7ff748801144 mainCRTStartup at ???
[C:\Windows\System32\KERNEL32.DLL]
0x7ff890907372
[C:\Windows\SYSTEM32\ntdll.dll]
0x7ff891b9cc8f

-->> --->8--- Exception dump end ----->8---
stderr: ALIRE.CHECKED_ERROR
stderr: Could not complete the publishing assistant
A commit id is mandatory for a VCS origin
stderr: raised ALIRE.CHECKED_ERROR : alire-stored-error:1
[C:\Program Files\Alire\bin\alr.exe]
0x7ff7492cb6aa Semantic_Versioning.Basic.Restrictions.First_Index at alire.adb:284
0x7ff74900c851 Semantic_Versioning.Basic.Restrictions.First_Index at alire-publish.adb:1266
0x7ff7488a42b2 Semantic_Versioning.Basic.Restrictions.First_Index at alr-commands-publish.adb:128
0x7ff7488a4550 Semantic_Versioning.Basic.Restrictions.First_Index at alr-commands-publish.adb:23
0x7ff748921628 Semantic_Versioning.Basic.Restrictions.First_Index at clic-subcommand-instance.adb:749
0x7ff74892deeb Semantic_Versioning.Basic.Restrictions.First_Index at alr-commands.adb:561
0x7ff7488016a0 Alr.Main at alr-main.adb:13
0x7ff748804f2e Main at b__alr-main.adb:2306
0x7ff74880133e __tmainCRTStartup at ???
0x7ff748801144 mainCRTStartup at ???
[C:\Windows\System32\KERNEL32.DLL]
0x7ff890907372
[C:\Windows\SYSTEM32\ntdll.dll]
0x7ff891b9cc8f

ERROR: Could not complete the publishing assistant:
ERROR:    A commit id is mandatory for a VCS origin
ERROR: alr encountered an unexpected error, re-run with -d for details.
ERROR: error location: 0x7ff7492cb6aa Semantic_Versioning.Basic.Restrictions.First_Index at alire.adb:284
@Seb-MCaw
Copy link
Contributor

Seb-MCaw commented Dec 2, 2024

This is fixed by #1736, which didn't make it into 2.0.2. I presume it will be in 2.1.0, @mosteo?

In the meantime, you can use the latest build of the master branch, or publish a local copy of the archive with

alr --force publish --skip-submit file:C:\some\path\light-nrf52832-14.0.0.tar.gz

then manually replace the file path with the public URL in the resulting manifest and submit a pull request to the index as instructed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants