This repository has been archived by the owner on Dec 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix source mode to not trigger go modules (#23)
Fixes #17. Investigating a bit, golang's module mode seems to trigger when using source mode with a fake module file, resulting in downloading modules while doing codegen. This can be avoided by prefixing the path passed to `-source` with `$GOPATH`, so `go/packages` recognizes the source file as being in the GOPATH. This also removes the `_go_tool_run_shell_stdout`, which was only called from one place. Seemed better to remove as compared having to pass the gopath around to prefix the source flag.
- Loading branch information
1 parent
1e4c2d6
commit 0863892
Showing
1 changed file
with
36 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters