-
Notifications
You must be signed in to change notification settings - Fork 391
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(gnovm): packages loader #2932
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
…ve download to own file Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
examples/gno.land/gno.mod
Outdated
@@ -0,0 +1 @@ | |||
module gno.land |
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.
do we need this file?
if we need it, please explain in a comment.
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.
please see #2904 (comment) and tell me what you think
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 think the best would be to have a gno.work
file at repo root to support multiple modules in a monorepo
But in that case we need to implement the gno work
commands
gnovm/tests/machine_test.go
Outdated
@@ -40,7 +40,7 @@ func TestMachineTestMemPackage(t *testing.T) { | |||
Name: tt.name, | |||
F: func(t2 *testing.T) { //nolint:thelper | |||
rootDir := filepath.Join("..", "..") | |||
store := TestStore(rootDir, "test", os.Stdin, os.Stdout, os.Stderr, ImportModeStdlibsOnly) | |||
store := TestStore(rootDir, "test", nil, os.Stdin, os.Stdout, os.Stderr, ImportModeStdlibsOnly) |
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.
create a variable that you set to nil, so we now what is this parameter.
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.
done in 0123512
gnovm/pkg/packages/download.go
Outdated
func DownloadModule(pkgPath string, dst string) error { | ||
modFilePath := filepath.Join(dst, ModfileName) | ||
if _, err := os.Stat(modFilePath); os.IsNotExist(err) { | ||
fmt.Fprintln(os.Stderr, "gno: downloading", pkgPath) |
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.
we usually don't use os.StdXXX, but stdouterr from a struct (io something) which is passed when needed.
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.
done in e648305
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
5090ff2
to
31b92be
Compare
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
WIP
Continuation of #2201
Taking #2904 into account
This implements a
Load
function with a similar interface to thepackages.Load
go functionContributors' checklist...
BREAKING CHANGE: xxx
message was included in the description