-
Notifications
You must be signed in to change notification settings - Fork 388
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(gnomod)!: forbid require and find dependencies without it #3123
Merged
Conversation
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
Signed-off-by: Norman Meier <[email protected]>
…ould be reverted) 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]>
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]>
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]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
seem to have been a bad substitution
…gnomod-remove-require
thehowl
reviewed
Dec 6, 2024
thehowl
reviewed
Dec 6, 2024
gnovm/cmd/gno/internal/pkgdownload/gnopkgfetcher/gnopkgfetcher.go
Outdated
Show resolved
Hide resolved
thehowl
reviewed
Dec 6, 2024
gnovm/cmd/gno/internal/pkgdownload/gnopkgfetcher/gnopkgfetcher.go
Outdated
Show resolved
Hide resolved
thehowl
approved these changes
Dec 6, 2024
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.
Pre-approving, mostly looks good now. Here's a few further improvements, that I think you can look to tackle in further PRs:
- Stop swallowing errors: there's a bunch of cases we brought up here, errors will happen in these scenarios and we need to report them properly. I understand you didn't want to include it in the scope of this already large PR, but we need to address it
- Purify the scope of package
gnomod
(should be:modules
) and move some things topackages
, and also changegno mod download
->gno get
. Package download is now tied to packages, rather than the requires in the modules; so the command should reflect that. I thinkgnomod
does extra things related to packages, which actually fall outside of its scope. -u
flag: we need a way to force an update from the cache, especially now that we still heavily use the portal loop.
Signed-off-by: Norman Meier <[email protected]>
…ormat Signed-off-by: Norman Meier <[email protected]>
thehowl
changed the title
feat(gnomod): forbid require and find dependencies without it
feat(gnomod)!: forbid require and find dependencies without it
Dec 7, 2024
omarsy
pushed a commit
to TERITORI/gno
that referenced
this pull request
Dec 7, 2024
…ng#3123) A step towards the importer package (gnolang#2932) and future of `gno.mod` (gnolang#2904) - BREAKING CHANGE: remove `require` statement support from `gno.mod` - BREAKING CHANGE: remove `-v` (verbose) and `--remote` flags in `gno mod download` - Don't require version specification in `gno.mod`'s `replace` statements - Use `.gno` files `import` statements to find dependencies - Extract and refacto imports gathering utils in `gnovm/pkg/packages` - Add `gnovm/cmd/gno/internal/pkgdownload.PackageFetcher` interface - Implement `PackageFetcher` using `vm/qfile` queries in `gnovm/cmd/gno/internal/pkgdownload/rpcpackagefetcher` - Rewrite single package download routine in `gnovm/cmd/gno/internal/pkgdownload` - Move and refacto dependencies download routine in `gnovm/cmd/gno/download_deps.go` - Add a `--remote-overrides` flag for `gno mod download` that takes `chain-domain=rpc-url` comma-separated pairs to override endpoints used to fetch packages - Add and use a testing implementation of `PackageFetcher` called `examplesPackageFetcher` that serves package from the `examples` directory for testing purposes (download tests before this PR use the portal loop public endpoint) - Make `ReadMemPackage` and it's dependencies error-out instead of panicking - Create panicking `MemPackage` utils that wrap the erroring ones and use them at existing callsites I decided to do this first to avoid having multiple ways to resolve dependencies lying around in the codebase and causing confusion in subsequent steps <details><summary>Contributors' checklist...</summary> - [x] 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 - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests </details> --------- Signed-off-by: Norman Meier <[email protected]> Co-authored-by: Morgan Bazalgette <[email protected]>
notJoon
added a commit
to gnoverse/tlin
that referenced
this pull request
Dec 9, 2024
# Description Remove gno mod tidy checker # Related Issues - gnoswap-labs/gnoswap#424 (review) - gnolang/gno#3123
Villaquiranm
pushed a commit
to Villaquiranm/gno
that referenced
this pull request
Dec 9, 2024
…ng#3123) A step towards the importer package (gnolang#2932) and future of `gno.mod` (gnolang#2904) - BREAKING CHANGE: remove `require` statement support from `gno.mod` - BREAKING CHANGE: remove `-v` (verbose) and `--remote` flags in `gno mod download` - Don't require version specification in `gno.mod`'s `replace` statements - Use `.gno` files `import` statements to find dependencies - Extract and refacto imports gathering utils in `gnovm/pkg/packages` - Add `gnovm/cmd/gno/internal/pkgdownload.PackageFetcher` interface - Implement `PackageFetcher` using `vm/qfile` queries in `gnovm/cmd/gno/internal/pkgdownload/rpcpackagefetcher` - Rewrite single package download routine in `gnovm/cmd/gno/internal/pkgdownload` - Move and refacto dependencies download routine in `gnovm/cmd/gno/download_deps.go` - Add a `--remote-overrides` flag for `gno mod download` that takes `chain-domain=rpc-url` comma-separated pairs to override endpoints used to fetch packages - Add and use a testing implementation of `PackageFetcher` called `examplesPackageFetcher` that serves package from the `examples` directory for testing purposes (download tests before this PR use the portal loop public endpoint) - Make `ReadMemPackage` and it's dependencies error-out instead of panicking - Create panicking `MemPackage` utils that wrap the erroring ones and use them at existing callsites I decided to do this first to avoid having multiple ways to resolve dependencies lying around in the codebase and causing confusion in subsequent steps <details><summary>Contributors' checklist...</summary> - [x] 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 - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests </details> --------- Signed-off-by: Norman Meier <[email protected]> Co-authored-by: Morgan Bazalgette <[email protected]>
r3v4s
pushed a commit
to gnoswap-labs/gno
that referenced
this pull request
Dec 10, 2024
…ng#3123) A step towards the importer package (gnolang#2932) and future of `gno.mod` (gnolang#2904) - BREAKING CHANGE: remove `require` statement support from `gno.mod` - BREAKING CHANGE: remove `-v` (verbose) and `--remote` flags in `gno mod download` - Don't require version specification in `gno.mod`'s `replace` statements - Use `.gno` files `import` statements to find dependencies - Extract and refacto imports gathering utils in `gnovm/pkg/packages` - Add `gnovm/cmd/gno/internal/pkgdownload.PackageFetcher` interface - Implement `PackageFetcher` using `vm/qfile` queries in `gnovm/cmd/gno/internal/pkgdownload/rpcpackagefetcher` - Rewrite single package download routine in `gnovm/cmd/gno/internal/pkgdownload` - Move and refacto dependencies download routine in `gnovm/cmd/gno/download_deps.go` - Add a `--remote-overrides` flag for `gno mod download` that takes `chain-domain=rpc-url` comma-separated pairs to override endpoints used to fetch packages - Add and use a testing implementation of `PackageFetcher` called `examplesPackageFetcher` that serves package from the `examples` directory for testing purposes (download tests before this PR use the portal loop public endpoint) - Make `ReadMemPackage` and it's dependencies error-out instead of panicking - Create panicking `MemPackage` utils that wrap the erroring ones and use them at existing callsites I decided to do this first to avoid having multiple ways to resolve dependencies lying around in the codebase and causing confusion in subsequent steps <details><summary>Contributors' checklist...</summary> - [x] 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 - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests </details> --------- Signed-off-by: Norman Meier <[email protected]> Co-authored-by: Morgan Bazalgette <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaking change
Functionality that contains breaking changes
📦 ⛰️ gno.land
Issues or PRs gno.land package related
📦 🤖 gnovm
Issues or PRs gnovm related
🧾 package/realm
Tag used for new Realms or Packages.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A step towards the importer package (#2932) and future of
gno.mod
(#2904)require
statement support fromgno.mod
-v
(verbose) and--remote
flags ingno mod download
gno.mod
'sreplace
statements.gno
filesimport
statements to find dependenciesgnovm/pkg/packages
gnovm/cmd/gno/internal/pkgdownload.PackageFetcher
interfacePackageFetcher
usingvm/qfile
queries ingnovm/cmd/gno/internal/pkgdownload/rpcpackagefetcher
gnovm/cmd/gno/internal/pkgdownload
gnovm/cmd/gno/download_deps.go
--remote-overrides
flag forgno mod download
that takeschain-domain=rpc-url
comma-separated pairs to override endpoints used to fetch packagesPackageFetcher
calledexamplesPackageFetcher
that serves package from theexamples
directory for testing purposes (download tests before this PR use the portal loop public endpoint)ReadMemPackage
and it's dependencies error-out instead of panickingMemPackage
utils that wrap the erroring ones and use them at existing callsitesI decided to do this first to avoid having multiple ways to resolve dependencies lying around in the codebase and causing confusion in subsequent steps
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description