-
Notifications
You must be signed in to change notification settings - Fork 294
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
cmd/cue: mod publish adds major version suffix to error message #3225
Comments
Would you think it's OK if the error message didn't explicitly mention the word "suffix"; something like this?
The reasoning being that |
Presumably we don't just drop what the actual declared module path is. I'm therefore unclear why there is that much effort involved. |
In many code paths, we are working with just dependencies and their versions in canonicalized form, and we don't necessarily have access to the original module path at that point. From that point of view, the original path is "dropped" in such a code path, even though it might be available elsewhere in the calling stack. Note: that's not necessarily the case for this particular error message though, just that I think that it might take a reasonable amount of work to thread this information through all the code in the aid of fixing all error messages that might mention the full module path. |
I've been investigating this, and I'm not entirely sure that the "expected" error message is good. One possibility for a fix would be to change the type of a module path in the code to be a struct For now, I'm inclined to change the error message to something like this:
WDYT @myitcv ? |
I should perhaps have been "softer" in my original description: "for some variation of the error message". The main thing I am suggesting we solve for here is that we report an error message in terms of what the user knows. In that regard:
I'm not clear that a (first-time) user of modules will be clear what to do in this instance, are you? |
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
What did you expect to see?
A passing test (modulo #3224)
What did you see instead?
Notice that the module.cue file does not contain a major version suffix. And yet the error message suggests there is one.
This lack of consistency from the user's perspective is confusing: the user will be confused.
The text was updated successfully, but these errors were encountered: