Closed jpluscplusm closed 1 month ago
- An indication of the explicit problem with the module name chosen
- Guidance about how to move forward with a correct module name
Agreed - we can do better here, perhaps indeed pointing people towards https://cuelang.org/docs/reference/modules/#module-path
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest stable release?
Yes, 0.8.1.
What did you do?
I opened https://github.com/cue-lang/cue/issues/3021 because I didn't know that module paths now need to be lower case, and nothing outside the experimentally-scoped documentation at https://cuelang.org/docs/reference/modules/ mentions this.
When attempting to initialise a module with a path that contains upper case letters, this is the current DX:
This is confusing, especially as the only guidance I can recall us giving around module names is that they should generally reflect domains under the user's control or (on shared domains) paths under the user's control. The user "MyUserName", above, doesn't explicitly control the namespace
github.com/myusername/
. In this error message we should give them clear guidance about what's wrong with their proposed module name; and in the case of it being a case issue we should link to guidance about when it's safe to fold case. I.e. there will be services out there where userMyUserName
does not controlservice.example/myusername/
, and we should be cautious in not providing blanket "just lower case the path" guidance.What did you expect to see?
What did you see instead?