This repository has been archived by the owner on Jan 31, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- remove the unecessary tools.Build step - add GO111MODULE=off to remove the error related to the absence of go.mod - filter error correctly according to file notification - see NOTEs for more contextualized infos
- Loading branch information
Showing
6 changed files
with
93 additions
and
59 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
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
package tools | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
"os/exec" | ||
"path/filepath" | ||
"strings" | ||
) | ||
|
||
// Transpile a Gno package: gno transpile <dir>. | ||
func Transpile(rootDir string) ([]byte, error) { | ||
return exec.Command("gno", "transpile", "-skip-imports", filepath.Join(rootDir)).CombinedOutput() | ||
cmd := exec.Command("gno", "transpile", "-skip-imports", "-gobuild", filepath.Join(rootDir)) | ||
// FIXME(tb): See https://github.com/gnolang/gno/pull/1695/files#r1697255524 | ||
const disableGoMod = "GO111MODULE=off" | ||
cmd.Env = append(os.Environ(), disableGoMod) | ||
bz, err := cmd.CombinedOutput() | ||
if err != nil { | ||
return bz, fmt.Errorf("running '%s': %w: %s", strings.Join(cmd.Args, " "), err, string(bz)) | ||
} | ||
return bz, nil | ||
} |
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