gno icon indicating copy to clipboard operation
gno copied to clipboard

feat: addpkg command respects gno.mod file

Open harry-hov opened this issue 2 years ago • 4 comments

BREAKING CHANGE: removed flag -pkgPath from addpkg command

Since PR #763 we are parsing pkg path from gno.mod file while auto loading pkgs from /examples dir. Replicate the same behavior for gnokey maketx addpkg ...

Contributors' checklist...
  • [x] Added new tests, or not needed, or not feasible
  • [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • [x] 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
  • [x] Provided any useful hints for running manual tests
  • [x] Added new benchmarks to generated graphs, if any. More info here.

harry-hov avatar Jun 21 '23 14:06 harry-hov

@harry-hov do you think the same behavior should be applied for gno test ? That could help for #896.

tbruyelle avatar Jun 21 '23 21:06 tbruyelle

@harry-hov do you think the same behavior should be applied for gno test ? That could help for #896.

Yeah. I planned to do this in #682. But now I will open a separate PR for that. That will act as a preparatory PR for both #896 and #682. (maybe by tomorrow)

harry-hov avatar Jun 22 '23 09:06 harry-hov

Yeah. I planned to do this in #682. But now I will open a separate PR for that. That will act as a preparatory PR for both #896 and #682. (maybe by tomorrow)

Awesome thank you

tbruyelle avatar Jun 22 '23 11:06 tbruyelle

Codecov Report

Attention: Patch coverage is 50.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 48.81%. Comparing base (155aba4) to head (e71b88f). Report is 3 commits behind head on master.

Files Patch % Lines
gno.land/pkg/keyscli/addpkg.go 50.00% 2 Missing and 1 partial :warning:
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #922   +/-   ##
=======================================
  Coverage   48.81%   48.81%           
=======================================
  Files         579      579           
  Lines       78045    78041    -4     
=======================================
- Hits        38099    38098    -1     
+ Misses      36860    36857    -3     
  Partials     3086     3086           
Flag Coverage Δ
gno.land 61.64% <50.00%> (-0.04%) :arrow_down:
gnovm 42.02% <ø> (ø)
misc/autocounterd 0.00% <ø> (ø)
misc/genproto 0.00% <ø> (ø)
misc/genstd 73.90% <ø> (ø)
misc/goscan 0.00% <ø> (ø)
misc/logos 17.68% <ø> (+0.30%) :arrow_up:
misc/loop 0.00% <ø> (ø)

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Nov 27 '23 13:11 codecov[bot]

Catching up on old items in the queue. Sorry for the delay.

Sorry for the delay in reply as well.

The changes LGTM though I personally think it would be better to have pkgpath still be a flag, which defaults to the value in gno.mod if not set.

I agree 💯 (but...)

My rationale: gnokey is primarily a tool to interact with the gno.land blockchain, and while gno.mod is a very important tool in local development, it is not essential to publish a package. So, in the way I see it, gnokey should essentially be the bare tool to create a transaction, with sane defaults like this one, but without asserting that gno.mod is a requirement.

My vision is to make gno.mod more inclusive. Let's take an example of the versioning PR #1631, which will also make gno.mod mandatory. If we all agree on having gno.mod on-chain at some point, then I think this is the right direction to make gno.mod a habit. Otherwise, we can proceed with what you suggested. Thoughts?

harry-hov avatar Apr 08 '24 09:04 harry-hov

@harry-hov What is the status of this PR?

zivkovicmilos avatar May 14 '24 16:05 zivkovicmilos

@zivkovicmilos last I remember, it was ready for review.

Seems like now i need to fix merge conflicts. Will do this soon!

harry-hov avatar May 15 '24 07:05 harry-hov