You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running go-publish from a subdirectory (module) of a multi-module workspace fails.
Current behavior
[Info] Using go: go1.20
[Info] Running 'go list -mod=mod -m' in <dir omitted>
[Error] Failed running Go command: 'go list -mod=mod -m' in <dir-omitted> with error: 'exit status 1 - go: -mod may only be set to readonly when in workspace mode, but it is set to "mod"
Remove the -mod flag to use the default readonly value,
or set GOWORK=off to disable workspace mode.
Reproduction steps
Execute jfrog gp v1.0.0 in a subdirectory (module) of a workspace whose root contains a go.work.
Expected behavior
Within a subdirectory representing a single module, that module should be published.
Ideally, running from the root containing a go.work directory should publish all modules.
Up for some discussion on exact desired behavior, but the current failure is not ideal.
Presumably the go list command could be invoked with -mod=readonly rather than -mod=mod?
JFrog CLI version
2.34.2
Operating system type and version
debian:11.6-slim
JFrog Artifactory version
7.41.12
JFrog Xray version
No response
The text was updated successfully, but these errors were encountered:
Is there any solution to this? This bug has been opened for almost a year now. With evolving usage of go workspace, we will need this sooner than later.
Also hitting this issue with doing local build step.
Would greatly appreciate if this could be made a priority. important project has mono-repo structure.
maybe a flag for workspace mode could be provided.
jf go build --build-name=ascii-zoo-v0.0.2 --build-number=1
17:26:48 [🔵Info] Using go: go1.22.4
17:26:48 [🔵Info] Running 'go list -mod=mod -m' in /Users/gshepard/go/src/ascii-zoo/sdk/gozoo
17:26:48 [🔵Info] Trace ID for JFrog Platform logs: 956b574c05e4c935
17:26:48 [🚨Error] Failed running Go command: 'go list -mod=mod -m' in /Users/gshepard/go/src/ascii-zoo/sdk/gozoo with error: 'exit status 1 - go: -mod may only be set to readonly or vendor ### when in workspace mode, but it is set to "mod"
Remove the -mod flag to use the default readonly value,
or set GOWORK=off to disable workspace mode.
before seeing this is hardcoded, tried setting GOFLAGS to -mod=readonly does not change the behavior either.
Describe the bug
Running
go-publish
from a subdirectory (module) of a multi-module workspace fails.Current behavior
Reproduction steps
Execute
jfrog gp v1.0.0
in a subdirectory (module) of a workspace whose root contains ago.work
.Expected behavior
Within a subdirectory representing a single module, that module should be published.
Ideally, running from the root containing a
go.work
directory should publish all modules.Up for some discussion on exact desired behavior, but the current failure is not ideal.
Presumably the
go list
command could be invoked with-mod=readonly
rather than-mod=mod
?JFrog CLI version
2.34.2
Operating system type and version
debian:11.6-slim
JFrog Artifactory version
7.41.12
JFrog Xray version
No response
The text was updated successfully, but these errors were encountered: