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(gno.land): refine error message for addpkg operation #2409

Merged
merged 4 commits into from
Sep 13, 2024

Conversation

ltzmaxwell
Copy link
Contributor

@ltzmaxwell ltzmaxwell commented Jun 21, 2024

This PR introduces PkgExistError to replace InvalidPkgPathError for situations where a package already exists during the addpkg operation, enhancing clarity and specificity.

@github-actions github-actions bot added the 📦 ⛰️ gno.land Issues or PRs gno.land package related label Jun 21, 2024
Copy link

codecov bot commented Jun 24, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 60.23%. Comparing base (8bd07c9) to head (a4b416d).
Report is 37 commits behind head on master.

Files with missing lines Patch % Lines
gno.land/pkg/sdk/vm/errors.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2409      +/-   ##
==========================================
+ Coverage   60.21%   60.23%   +0.01%     
==========================================
  Files         561      561              
  Lines       75071    75074       +3     
==========================================
+ Hits        45205    45218      +13     
+ Misses      26485    26480       -5     
+ Partials     3381     3376       -5     
Flag Coverage Δ
contribs/gnodev 61.40% <ø> (ø)
contribs/gnofaucet 15.31% <ø> (ø)
gno.land 64.70% <75.00%> (-0.05%) ⬇️
gnovm 64.30% <ø> (ø)
misc/genstd 80.54% <ø> (ø)
misc/logos 20.23% <ø> (ø)
tm2 62.10% <ø> (+0.09%) ⬆️

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.

Copy link
Contributor

@leohhhn leohhhn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the cases where addpkg can fail? I'm wondering if there are other cases, such as an empty file (I guess it's caught by msg.Package.Validate()), or other cases? What if we have two files with identical names in the same package?

Just running thoughts, we should clearly define the failure cases and improve more of these errors. It might be out of scope for this PR, but it would be great to have an analysis of this. Approving.

@thehowl thehowl merged commit 22ce48c into gnolang:master Sep 13, 2024
117 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 ⛰️ gno.land Issues or PRs gno.land package related
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants