-
Notifications
You must be signed in to change notification settings - Fork 419
feat(modfile): switch to gnomod.toml v2 #4331
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
Conversation
Signed-off-by: moul <94029+moul@users.noreply.github.com>
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
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.
nice
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.
LGTM
A couple of questions:
Need to play around a bit more, but definitely looks like a change for the better over the old gno mod :) Docs need to be updated as well, I'm on it soon. |
Co-authored-by: Jerónimo Albi <jeronimo.albi@gmail.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
It's already the case, since the gno0.9 PR.
Yes, the gnomod.toml file should be taken into account. While simplicity is generally important, the deployed pkgpath is a sensitive variable that we want to clarify in the request (as the amount of tokens you send, or the key you're using). Therefore, we can either establish a validation/review period to inform the signer of the exact package name or... keep the parameter and trigger an error if cli.pkgpath != gnomod.pkgpath. Alternatively, we could accept a -pkgpath=gnomod (default?) that assumes we trust the contents of the file. For now, I added an extra check to prevent uploading if pkgpath does not equal gnomod.Module: 9cb82fb. Edit: As a shortcut, I ensured that the gnomod.toml file was overridden with the provided pkgpath during the upload: a30a1d6.
-> #4365
👍
Thank you 🙏 |
Signed-off-by: moul <94029+moul@users.noreply.github.com>
…ed pkgpath Signed-off-by: moul <94029+moul@users.noreply.github.com>
Meta: gnolang#4365 Once merged, it will unlock several features: - It will allow for easy addition of new fields with impact, such as: - `private=true`: This makes the object not importable and prevents local objects from being persisted remotely, for example, in a registry, specifically for a /home realm, ensuring it can be upgraded by fully replacing the source code. - `draft=true`: This reuses the previous draft keyword for a different purpose, allowing us to mark some packages as "published on genesis but not importable by `addpkg`." This way, we can publish contracts now, have them audited, and then republish them or use `editpkg` to modify some `gnomod.toml` fields, such as changing from `private=true` to `private=false`. - Gnoweb will parse this file to enhance the UI with links to the uploader and more. --- - [x] support `gnomod.toml` - [x] migration from `gno.mod` to `gnomod.toml` - [x] lazy generation of `gnomod.toml` in most `gno xxx` commands - [x] update of `gnomod.toml` with `gno mod tidy` - [x] patch `gnomod.toml` when `vm.AddPackage` - [x] fix unit tests Alternative to gnolang#4263 --------- Signed-off-by: moul <94029+moul@users.noreply.github.com> Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com> Co-authored-by: Antonio Navarro Perez <antnavper@gmail.com> Co-authored-by: gfanton <8671905+gfanton@users.noreply.github.com> Co-authored-by: aeddi <antoine.e.b@gmail.com> Co-authored-by: Jerónimo Albi <jeronimo.albi@gmail.com>
Meta: #4365
Once merged, it will unlock several features:
private=true
: This makes the object not importable and prevents local objects from being persisted remotely, for example, in a registry, specifically for a /home realm, ensuring it can be upgraded by fully replacing the source code.draft=true
: This reuses the previous draft keyword for a different purpose, allowing us to mark some packages as "published on genesis but not importable byaddpkg
." This way, we can publish contracts now, have them audited, and then republish them or useeditpkg
to modify somegnomod.toml
fields, such as changing fromprivate=true
toprivate=false
.gnomod.toml
gno.mod
tognomod.toml
gnomod.toml
in mostgno xxx
commandsgnomod.toml
withgno mod tidy
gnomod.toml
whenvm.AddPackage
Alternative to #4263