-
Notifications
You must be signed in to change notification settings - Fork 389
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: remove gnovm
and gno.land
dependencies from tm2
#1483
Conversation
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1483 +/- ##
==========================================
+ Coverage 55.85% 55.91% +0.06%
==========================================
Files 431 431
Lines 65839 65684 -155
==========================================
- Hits 36773 36727 -46
+ Misses 26185 26081 -104
+ Partials 2881 2876 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…tegration Signed-off-by: gfanton <[email protected]>
3b7ab05
to
ddbddd2
Compare
gno.land/pkg/keyscli/addpkg.go
Outdated
// TODO: move most of the logic in ROOT/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.
// TODO: move most of the logic in ROOT/gno.land/... |
@@ -0,0 +1,140 @@ | |||
package keyscli |
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.
please, add a small readme explaining the goal of this package and its relationships and add a link to this PR.
gno.land/pkg/keyscli/run.go
Outdated
|
||
import ( | ||
"context" | ||
"flag" | ||
"fmt" | ||
"io/ioutil" | ||
ioutil "io" |
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.
ioutil "io" | |
"io" |
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 didn't use io because it will make me rename 'io' argument from commands.IO
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.
do rename that one ;)
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.
done !
@@ -1,222 +0,0 @@ | |||
package client |
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.
The file is marked as deleted, but it was actually moved and then modified. We want to preserve the file's history. To handle the rename and edit, we can make two commits or explore other options. cc @harry-hov.
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.
hmm, from an history point view, it's correctly mark as renamed in the commit: 32511b3
but since this PR will be squash when merge, im not sure we can do anything about it...
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
🤯 the pr number is an anagram of the old #1438 |
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
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.
Looks great 💯
Thank you for going through with the split 🙏
In an effort to avoid duplicate code, an ExecSignAndBroadcast method has been exposed. However, it appears too specific, and I am considering duplicating it regardless. I would appreciate thoughts on this.
This is honestly one of the sketchier parts of gnokey
, the entire sign / broadcast pipeline. I like the approach you've gone with for now, I think it's out of the scope of this PR to fix these flows (that affect a good chunk of gnokey
commands).
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
This PR shares the same goal as gnolang#1438: to make `tm2` completely unaware of `gnovm` and `gno.land`. However, it adopts a different strategy to achieve this, following gnolang#1438 (comment). It will: - Exposed almost everything from the `tm2/crypto/keys/client` package: - `NewCommandXXX`, along with their specific structure configurations and fields, are now exposed to allow the creation of composable CLI tools. - `XXXHandler` (including Sign, Verify, Broadcast, etc.) are now exposed to enable external packages to reuse some logic from the `keys/client` package. - Moved specific `gnovm`/`gno.land` commands to the `gnokey` package: `run`, `call`, and `addpkg`. - In an effort to avoid duplicate code, an `ExecSignAndBroadcast` method has been exposed. However, it appears too specific, and I am considering duplicating it regardless. I would appreciate thoughts on this. <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> --------- Signed-off-by: gfanton <[email protected]>
…m2 separation (fixes #2373) (#2375) Fixes #2373. Seems `gnokeykc` was indirectly broken in #1483 (when tm2 was made completely independent from gno messages as addpkg). `gnokey` now makes use of `github.com/gnolang/gno/gno.land/pkg/keyscli` and this PR proposes to use the same root cmd. https://github.com/gnolang/gno/blob/5fdbce0e1fe533165c0c2009e93695ece677b2bd/gno.land/pkg/keyscli/README.md?plain=1#L1-L12
…m2 separation (fixes gnolang#2373) (gnolang#2375) Fixes gnolang#2373. Seems `gnokeykc` was indirectly broken in gnolang#1483 (when tm2 was made completely independent from gno messages as addpkg). `gnokey` now makes use of `github.com/gnolang/gno/gno.land/pkg/keyscli` and this PR proposes to use the same root cmd. https://github.com/gnolang/gno/blob/5fdbce0e1fe533165c0c2009e93695ece677b2bd/gno.land/pkg/keyscli/README.md?plain=1#L1-L12
This PR shares the same goal as #1438: to make
tm2
completely unaware ofgnovm
andgno.land
. However, it adopts a different strategy to achieve this, following #1438 (comment). It will:tm2/crypto/keys/client
package:NewCommandXXX
, along with their specific structure configurations and fields, are now exposed to allow the creation of composable CLI tools.XXXHandler
(including Sign, Verify, Broadcast, etc.) are now exposed to enable external packages to reuse some logic from thekeys/client
package.gnovm
/gno.land
commands to thegnokey
package:run
,call
, andaddpkg
.ExecSignAndBroadcast
method has been exposed. However, it appears too specific, and I am considering duplicating it regardless. I would appreciate thoughts on this.Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description