Module name clash in Go lasagna and lasagna-master exercises

On the Go track, the module names for exercises lasagna and lasagna-master clash. This means it is not possible to run the tests for either of them once they are added to a go.work file.

❯ go test lasagna
go: module lasagna appears multiple times in workspace
❯ go test lasagna-master
go: module lasagna appears multiple times in workspace

I fixed this so that I could run the tests locally by changing the lasagna-master module to lasagna_master, but this then fails when submitting because the server side test uses lasagna for the module name.

Could lasagna-master be updated to use lasagna_master for the module name?

This is something that is on our radar to fix. If I recall correctly, the last time I checked there were other instances of duplicate names. Our goal is to remove the duplicates, so making a go.work file can work out of the box, but also make the module names more consistent with their folder names.

In the meantime, you should be able to change the package name of the exercise and submit it to exercism. It’s just that you have to change the package name in the go.mod file, the solution files, the test files, and submit them all explicitly with exercism submit.

2 Likes