-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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/go: reject leading dot in module name #66954
Comments
I don't think that's a valid module name ( |
it works when i change the module name , even though it was working some of the time , but giving issues alot of the other times. |
Cf. https://go.dev/ref/mod#go-mod-file-ident [2024-04-27] |
yes @jfrech but shouldn't the compiler return the correct error , instead of |
@Mgrdich I am all for less obtuse failure diagnostics. Yet you wrote "What did you expect to see? ; It should compile the project and produce the executable.", which is behaviour which violates the modules specification. |
@jfrech my bad , I did not know back then it was a module name issue , I will change what do I expect . |
Go version
go1.22.1
Output of
go env
in your module/workspace:What did you do?
It is happening when everything is in different folder , and initiated with different packages , that is why i cannot link go.dev/play
but i can link the github repo with a branch that this is happening
https://github.com/Mgrdich/testGoApi/tree/bug/issue/golang
https://github.com/Mgrdich/testGoApi/blob/fd329312a1472c5d3c5269f792a438d999e43829/internal/routes/person.go#L18
https://github.com/Mgrdich/testGoApi/blob/fd329312a1472c5d3c5269f792a438d999e43829/internal/middlewares/movies.go#L28
https://github.com/Mgrdich/testGoApi/blob/fd329312a1472c5d3c5269f792a438d999e43829/internal/middlewares/id_context.go#L14
What did you see happen?
i keep getting this compile time error
as i noticed it is happening something with the folder and package structure
What did you expect to see?
It return the correct error , with description that module name is invalid.
The text was updated successfully, but these errors were encountered: