Skip to content
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

fix(cmd/gno/clean): allow to run gno clean -modcache from anywhere + rename and use gnomod.ModCachePath + tmp GNOHOME in main tests #3083

Merged
merged 10 commits into from
Nov 8, 2024

Conversation

n0izn0iz
Copy link
Contributor

@n0izn0iz n0izn0iz commented Nov 7, 2024

  • In gno clean, run the -modcache case before checking for presence of a gno.mod to allow to run gno clean -modcache from anywhere (like go)
  • Refactor gno clean -modcache to use the gnomod.GetGnoModPath helper to get the modcache path
  • Rename gnomod.GetGnoModPath -> gnomod.ModCachePath
  • Improve gno cmd tests by using a tmp GNOHOME instead of the system one
Contributors' checklist...
  • 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

@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Nov 7, 2024
Copy link

codecov bot commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 73.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 63.35%. Comparing base (d73b6c6) to head (b55bac4).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
gnovm/cmd/gno/clean.go 72.72% 2 Missing and 1 partial ⚠️
gnovm/pkg/gnomod/gnomod.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3083      +/-   ##
==========================================
+ Coverage   63.33%   63.35%   +0.01%     
==========================================
  Files         548      548              
  Lines       78680    78681       +1     
==========================================
+ Hits        49835    49846      +11     
+ Misses      25481    25473       -8     
+ Partials     3364     3362       -2     
Flag Coverage Δ
contribs/gnodev 61.16% <ø> (ø)
contribs/gnofaucet 14.82% <ø> (ø)
gno.land 67.13% <ø> (ø)
gnovm 67.92% <73.33%> (+0.02%) ⬆️
misc/genstd 79.72% <ø> (ø)
tm2 62.45% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Norman Meier <[email protected]>
@n0izn0iz n0izn0iz force-pushed the refacto-clean-modcache branch from 951f6fa to 76fa49c Compare November 7, 2024 00:33
@n0izn0iz n0izn0iz marked this pull request as draft November 7, 2024 01:01
Signed-off-by: Norman Meier <[email protected]>
@n0izn0iz n0izn0iz marked this pull request as ready for review November 7, 2024 01:47
@jefft0 jefft0 added the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Nov 7, 2024
gnovm/cmd/gno/main_test.go Outdated Show resolved Hide resolved
gnovm/cmd/gno/clean.go Outdated Show resolved Hide resolved
gnovm/cmd/gno/clean.go Show resolved Hide resolved
@thehowl thehowl removed the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Nov 7, 2024
@n0izn0iz n0izn0iz changed the title fix(cmd/gno/clean): allow to run gno clean -modcache from anywhere + use GetGnoModPath fix(cmd/gno/clean): allow to run gno clean -modcache from anywhere + rename and use gnomod.ModCachePath Nov 7, 2024
@n0izn0iz n0izn0iz changed the title fix(cmd/gno/clean): allow to run gno clean -modcache from anywhere + rename and use gnomod.ModCachePath fix(cmd/gno/clean): allow to run gno clean -modcache from anywhere + rename and use gnomod.ModCachePath + tmp GNOHOME in main tests Nov 8, 2024
@thehowl thehowl merged commit 4f27a57 into gnolang:master Nov 8, 2024
135 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🤖 gnovm Issues or PRs gnovm related
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants