-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: precompile imports and fix gnodev test
#431
Conversation
gnodev test
gnodev test
45aa668
to
517941f
Compare
gnodev test
gnodev test
f1a1583
to
517941f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left a few comments that need to be addressed, otherwise I think it looks alright 💯
I would've loved to have had more context in the PR description as to what this was fixing, and how it fixed the problem.
The PR didn't include a unit test that verified the problem and the fix, and also didn't include unit tests for introduced logic flows and helpers - we should start focusing on preventing future problems with good coverage
517941f
to
280447a
Compare
Now `gnodev precompile` and `gnodev test --precompile` support precompiling imports of the input file or package. - `gnodev precompile`: It is enabled by default. You need to pass addition flag `--skip-imports` to disable it. - `gnodev test --precompile` precompile imports automatically. Signed-off-by: Hariom Verma <hariom.verma@tendermint.com>
Fix error `cannot find package...` while running `gnodev test` by creating temporary go.mod file in the temporary root directory. Signed-off-by: Hariom Verma <hariom.verma@tendermint.com>
Try to find the nearest go.mod file, run `go build` in the same folder. Signed-off-by: Hariom Verma <hariom.verma@tendermint.com>
Currently, `stdlibs/stdshim` contains generated `*.gen.go` files. While other packages in the stdlibs contains `*.gno` files. Lets replace generated files with `*.gno` files. Signed-off-by: Hariom Verma <hariom.verma@tendermint.com>
Signed-off-by: Hariom Verma <hariom.verma@tendermint.com>
280447a
to
173897d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 💯
Thank you for adding in the suggestions, I think it's much cleaner now
Signed-off-by: Hariom Verma <hariom.verma@tendermint.com>
Signed-off-by: Hariom Verma <hariom.verma@tendermint.com>
Changes
Now
gnodev precompile
andgnodev test --precompile
support precompiling imports of the input file or package.gnodev precompile
: It is enabled by default. You need to pass addition flag--skip-imports
to disable it.gnodev test --precompile
precompile imports automatically.It also fixes the flag
--output
flag ingnodev precompile
. Currently, it assumes that the output dir contains the pkg path. Which results in an error.Fix error
cannot find package...
while runninggnodev test
by creating temporary go.mod file in the temporary root directory.Try to find the nearest go.mod file, run
go build
in the same folder.Currently,
stdlibs/stdshim
contains generated*.gen.go
files. While other packages in the stdlibs contains*.gno
files. Replaced generated files with*.gno
files.How has this been tested?
The above command precompiles
acl
and its imports.Addresses #415