Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
Skip precompiling imports for Go Build
Browse files Browse the repository at this point in the history
`gnopls` run diagnostics on Open and Save. Diagnostics uses
`gno precompile --gobuild` to get go build error. This command
precompile imports automatically unless used with flag
`-skip-imports`. It makes working dir dirty by generating
`*.gno.gen.go` files. So using it with flag `-skip-imports`.
  • Loading branch information
harry-hov committed Jan 6, 2024
1 parent b629683 commit 9adcc45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/tools/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (
// Build a Gno package: gno precompile -gobuild <dir>.
// TODO: Remove this in the favour of directly using tools/precompile.go
func Build(rootDir string) ([]byte, error) {
return exec.Command("gno", "precompile", "-gobuild", filepath.Join(rootDir)).CombinedOutput()
return exec.Command("gno", "precompile", "-skip-imports", "-gobuild", filepath.Join(rootDir)).CombinedOutput()
}

0 comments on commit 9adcc45

Please sign in to comment.