-
Notifications
You must be signed in to change notification settings - Fork 373
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: implement gno mod tidy
#1035
Conversation
35fad05
to
34f82ef
Compare
34f82ef
to
6507caf
Compare
ece1e87
to
3adcfce
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1035 +/- ##
==========================================
+ Coverage 47.84% 47.89% +0.05%
==========================================
Files 369 369
Lines 62764 62836 +72
==========================================
+ Hits 30028 30095 +67
- Misses 30308 30316 +8
+ Partials 2428 2425 -3
☔ View full report in Codecov by Sentry. |
3959fda
to
bbd9c7d
Compare
Co-authored-by: Manfred Touron <[email protected]>
} | ||
for _, imp := range f.Imports { | ||
importPath := strings.TrimPrefix(strings.TrimSuffix(imp.Path.Value, `"`), `"`) | ||
if !strings.HasPrefix(importPath, "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.
if !strings.HasPrefix(importPath, "gno.land/") { | |
if !strings.Contains(importPath, ".") { |
I believe this is more future-proof
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.
Umm. I'm sure there are many place where "gno.land" is hard coded.
I'm okay with both, applying your changes here or to wait till we find a good solution and modify everywhere in a separate PR.
WDYT?
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 right now we should only have "gno.land/*" import paths, while understanding that with IBC/ICS this will change and will allow for more domains, so that we should still treat all import paths which have a dot (before the first /) to come from external packages.
In any case, whichever is fine here. I've made a note on #1299.
Co-authored-by: Morgan <[email protected]>
Co-authored-by: Morgan <[email protected]>
CI failing after merging #1035 Seems like some mod files are not tidy.
Contains initial implementation of `gno mod tidy` <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> --------- Co-authored-by: Manfred Touron <[email protected]> Co-authored-by: Morgan <[email protected]>
CI failing after merging gnolang#1035 Seems like some mod files are not tidy.
Contains initial implementation of `gno mod tidy` <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> --------- Co-authored-by: Manfred Touron <[email protected]> Co-authored-by: Morgan <[email protected]>
CI failing after merging gnolang#1035 Seems like some mod files are not tidy.
Contains initial implementation of
gno mod tidy
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description