Description
What is the issue?
Context
as documented in push-package-on-repository
[...] you will directly be able to retrieve the personal package using the dagger project update url@tag command.
Consumers of the package can retrieve the package by the tag however the documentation does not specify any specific format of the tag when pushing the library to the repository.
Problem
as per the implementation, dagger will actually enforce the tag in a format that is compatible to the upstream cue-lang package versioning, to be clear this is v<tag>. Without this knowledge - it is pretty difficult to find out the reason without enabling the debug logs.
without debug logs
dagger project update -u
8:54AM INF system | updating all installed packages...
8:54AM ERR system | error installing/updating packages: repo doesn't have any tags matching the required version
with debug logs
dagger project update -u --log-level debug
10:51AM INF system | updating all installed packages...
10:51AM DBG system | updating module name=github.com/xxxx/[email protected]
10:51AM DBG system | checkout repo commit=4c9d7dbc5aa14389f3c5df2e551fd423f48d5b88 repository=github.com/xxxx/mylib version=0.0.1
10:51AM DBG system | tag version ignored, wrong format repository=github.com/xxxx/mylib tag=0.0.1 versionConstraint=
Solution
Option 1 - Be Explicit (preferred)
1 . Update the above mentioned documentation and include and explain the tag format and reason for enforcing this rule.
2. Add warn message that the tag mentioned during
dagger project update github.com/xxxx/mylib@tag
does not comply with the tag format.
Option 2 - Remove the enforcement of the tag format
The idea is not remove the tag format, until the package management of cuelang is finalized.
Activity
helderco commentedon Jun 1, 2022
Thanks for reporting. We'll improve the documentation and CLI output. You're welcome to contribute it, of course 🙂
mircubed commentedon Jun 1, 2022
@helderco as we work on improving docs, could I assign this issue to you to update the docs or should we make a separate issue?
helderco commentedon Jun 2, 2022
This does seem like it requires two PRs (docs and cli), but they can go into one: "Clarify git tag format for versions". So I think it's ok to use this one.
mircubed commentedon Jun 17, 2022
@helderco sounds good! I created an issue to track the error message improvements in #2671
helderco commentedon Jun 17, 2022
Not thinking about adding a warning on install because I imagine using branches should be supported, it's just the way we store that and update that needs fixing.