-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: remove
gno build
command (#1297)
Closes: #1242 In favor of `gno precompile -gobuild`. As seen in the tests written for `gno build` in this PR #1103, the command's behavior is kinda unexpected. It actually doesn't care about the syntax of gno files and only relies on go files found in the path passed as an argument. Because of that, I chose to name the flag `-gobuild` instead of `-build` because I found that represents better what's really happening when this flag is provided. As mentioned in the linked issue, `gno build` will be re-implemented in the future with an other behavior. <!-- please provide a detailed description of the changes made in this pull request. --> <details><summary>Contributors' checklist...</summary> - [ ] Added new tests, or not needed, or not feasible - [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [ ] Updated the official documentation or not needed - [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
- Loading branch information
Showing
23 changed files
with
237 additions
and
275 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 was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
package main | ||
|
||
import "testing" | ||
import ( | ||
"testing" | ||
|
||
func TestPrecompileApp(t *testing.T) { | ||
tc := []testMainCase{ | ||
{ | ||
args: []string{"precompile"}, | ||
errShouldBe: "flag: help requested", | ||
}, | ||
"github.com/rogpeppe/go-internal/testscript" | ||
"github.com/stretchr/testify/require" | ||
|
||
// {args: []string{"precompile", "..."}, stdoutShouldContain: "..."}, | ||
// TODO: recursive | ||
// TODO: valid files | ||
// TODO: invalid files | ||
"github.com/gnolang/gno/gnovm/pkg/integration" | ||
) | ||
|
||
func Test_ScriptsPrecompile(t *testing.T) { | ||
p := testscript.Params{ | ||
Dir: "testdata/gno_precompile", | ||
} | ||
|
||
if coverdir, ok := integration.ResolveCoverageDir(); ok { | ||
err := integration.SetupTestscriptsCoverage(&p, coverdir) | ||
require.NoError(t, err) | ||
} | ||
testMainCaseRun(t, tc) | ||
|
||
err := integration.SetupGno(&p, t.TempDir()) | ||
require.NoError(t, err) | ||
|
||
testscript.Run(t, p) | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.