-
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: go work init won't create nested workspaces #53938
Labels
GoCommand
cmd/go
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Comments
go work init
does not work nested
For a self-contained reproducer:
I could see some room for debate about what should happen if the root |
eskultety
added a commit
to eskultety/hermeto
that referenced
this issue
Dec 8, 2024
- drop the "nested workspaces" test case --> it's unclear how that was supposed to work, i.e where would the go.work hosted if the main module was in the 'mainmod' subdirectory which means we wouldn't even find the go.work file if app_dir == 'mainmod' --> nested workspaces don't seem to be supported in a clean way (i.e. without manual intervention) [1] - adjust module path strings so that the test paths follow the test ID: 'app_root_is_workspace' - replace RootedPath(tmp_path) occurrence with rooted_tmp_path fixture [1] golang/go#53938 Signed-off-by: Erik Skultety <eskultet@redhat.com>
eskultety
added a commit
to hermetoproject/hermeto
that referenced
this issue
Jan 2, 2025
- drop the "nested workspaces" test case --> it's unclear how that was supposed to work, i.e where would the go.work hosted if the main module was in the 'mainmod' subdirectory which means we wouldn't even find the go.work file if app_dir == 'mainmod' --> nested workspaces don't seem to be supported in a clean way (i.e. without manual intervention) [1] - adjust module path strings so that the test paths follow the test ID: 'app_root_is_workspace' - replace RootedPath(tmp_path) occurrence with rooted_tmp_path fixture [1] golang/go#53938 Signed-off-by: Erik Skultety <eskultet@redhat.com>
eskultety
added a commit
to eskultety/hermeto
that referenced
this issue
Jan 6, 2025
- drop the "nested workspaces" test case --> it's unclear how that was supposed to work, i.e where would the go.work hosted if the main module was in the 'mainmod' subdirectory which means we wouldn't even find the go.work file if app_dir == 'mainmod' --> nested workspaces don't seem to be supported in a clean way (i.e. without manual intervention) [1] - adjust module path strings so that the test paths follow the test ID: 'app_root_is_workspace' - replace RootedPath(tmp_path) occurrence with rooted_tmp_path fixture [1] golang/go#53938 Signed-off-by: Erik Skultety <eskultet@redhat.com>
eskultety
added a commit
to eskultety/hermeto
that referenced
this issue
Jan 6, 2025
- drop the "nested workspaces" test case --> it's unclear how that was supposed to work, i.e where would the go.work hosted if the main module was in the 'mainmod' subdirectory which means we wouldn't even find the go.work file if app_dir == 'mainmod' --> nested workspaces don't seem to be supported in a clean way (i.e. without manual intervention) [1] - adjust module path strings so that the test paths follow the test ID: 'app_root_is_workspace' - replace RootedPath(tmp_path) occurrence with rooted_tmp_path fixture [1] golang/go#53938 Signed-off-by: Erik Skultety <eskultet@redhat.com>
eskultety
added a commit
to eskultety/hermeto
that referenced
this issue
Jan 7, 2025
- drop the "nested workspaces" test case --> it's unclear how that was supposed to work, i.e where would the go.work be hosted if the main module was in the 'mainmod' subdirectory which means we wouldn't even find the go.work file if app_dir == 'mainmod' --> nested workspaces don't seem to be supported in a clean way (i.e. without manual intervention) [1] - adjust module path strings so that the test paths follow the test ID: 'app_root_is_workspace' - replace RootedPath(tmp_path) occurrence with rooted_tmp_path fixture [1] golang/go#53938 Signed-off-by: Erik Skultety <eskultet@redhat.com>
github-merge-queue bot
pushed a commit
to hermetoproject/hermeto
that referenced
this issue
Jan 7, 2025
- drop the "nested workspaces" test case --> it's unclear how that was supposed to work, i.e where would the go.work be hosted if the main module was in the 'mainmod' subdirectory which means we wouldn't even find the go.work file if app_dir == 'mainmod' --> nested workspaces don't seem to be supported in a clean way (i.e. without manual intervention) [1] - adjust module path strings so that the test paths follow the test ID: 'app_root_is_workspace' - replace RootedPath(tmp_path) occurrence with rooted_tmp_path fixture [1] golang/go#53938 Signed-off-by: Erik Skultety <eskultet@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
GoCommand
cmd/go
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
CWD is a workspace, with a valid go.work file.
I am trying to isolate the deps in a sub-module from the deps in the workspace (as suggested in a different thread).
Manually creating a go.work file does achieve the ffect I wanted.
What did you expect to see?
I thought it would work
What did you see instead?
The above error
The text was updated successfully, but these errors were encountered: