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

Incorrect locator generated for //DEPS links to GitHub repos #1817

Closed
holly-cummins opened this issue Jul 4, 2024 · 0 comments · Fixed by #1843
Closed

Incorrect locator generated for //DEPS links to GitHub repos #1817

holly-cummins opened this issue Jul 4, 2024 · 0 comments · Fixed by #1843
Labels
bug Something isn't working

Comments

@holly-cummins
Copy link

https://www.jbang.dev/documentation/guide/latest/dependencies.html#using-links-to-git-sources

says that https://github.com/jbangdev/jbang is converted to the locator com.github.jbangdev:jbang:HEAD-SNAPSHOT. I'm seeing it being converted to a jbang:-SNAPSHOT locator, which can't resolve.

I wondered about just dropping the line in the docs, but it's possibly almost as easy to correct the locator generation to do what the docs say.

For example,

//DEPS https://github.com/holly-cummins/github-api/

gives

Run jbangdev/jbang-action@v0.111.0
...
[jbang] Resolving dependencies...
[jbang]    com.github.holly-cummins:github-api:-SNAPSHOT
[jbang]    info.picocli:picocli:4.2.0
Error:  [ERROR] Could not resolve dependencies: Could not find artifact com.github.holly-cummins:github-api:jar:-SNAPSHOT 
...

I see the same thing locally with jbang 0.92.2

Tree references with an explicit commit, like //DEPS https://github.com/holly-cummins/github-api/tree/gg287262 do generate a correct locator. If I add a tree reference to head, it works, as long as SNAPSHOT is mentioned explicitly:

//DEPS https://github.com/holly-cummins/github-api/tree/main#:SNAPSHOT

Without the SNAPSHOT, it doesn't work:

//DEPS https://github.com/holly-cummins/github-api/tree/main

gives a locator of com.github.holly-cummins:github-api:jar:main, which isn't valid. (That's maybe ok, because the docs don't say it should work, I was just trying it as a workaround.)

@holly-cummins holly-cummins added the bug Something isn't working label Jul 4, 2024
@holly-cummins holly-cummins changed the title Incorrect locator generated for //deps links to GitHub repos Incorrect locator generated for /deps links to GitHub repos Jul 9, 2024
@holly-cummins holly-cummins changed the title Incorrect locator generated for /deps links to GitHub repos Incorrect locator generated for //DEPS links to GitHub repos Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant