-
Notifications
You must be signed in to change notification settings - Fork 887
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
Reckless: add rust installer and json output #7484
Reckless: add rust installer and json output #7484
Conversation
7d303f8
to
be3f0fe
Compare
678f522
to
23d2b60
Compare
53e7cdf
to
905c3cc
Compare
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.
-
Search without result does not show any message, for example:
reckless search nonexistingplugin
should show a message stating thatplugin not found
/plugin nonexistingplugin not found
-
holdinvoice install command throws below error (
reckless --regtest --verbose --json install holdinvoice
)
Traceback (most recent call last):
File "/usr/local/bin/reckless", line 1803, in <module>
log.add_result(args.func(target))
File "/usr/local/bin/reckless", line 1314, in install
installed = _install_plugin(src)
File "/usr/local/bin/reckless", line 1245, in _install_plugin
staged_src = INSTALLER.dependency_call(staged_src)
File "/usr/local/bin/reckless", line 936, in cargo_installation
log.error(cargo.stderr.read())
AttributeError: 'str' object has no attribute 'read'
- Can
reckless install
accept plugin options too, likesummars-columns
,summars-sort-by
withreckless install summars
?
337e60c
to
7681986
Compare
Good catch, I changed the default logging level and missed changing this one to
Ah, right, I changed the call from Popen to run, which has the outputs strings. Also raised the right error to catch here. |
The python mimetype package wasn't useful enough in indentifying filetypes anyhow.
rather than just source/. This is required for cargo install, so let's just use this paradigm globally.
7681986
to
a3fff01
Compare
I like this idea. We could pass these in a list to an optional keyword, and then maybe track the options in the metadata. Is there a good way to validate the plugins options though? Any errors will cause the node to not start. |
This follows the same structure that enables python virtual environments: reckless/ <plugin_name>/ <symlink to compiled bin> source/ <clone of original source plugin dir>/ Changelog-Added: Reckless: added the ability to install rust plugins.
Changelog-Changed: Reckless option flags are now position independent.
This will allow redirection of json output in the following commits.
Also redirect config creation prompts to stderr in order to not interfere with json output on stdout. Changelog-Added: reckless provides json output with option flag -j/--json
This more easily allows list output for commands accepting list input, i.e., installing 3 plugins produces 3 outputs.
status if --json was requested.
Changelog-Added: Reckless: accepts json array input for command targets
Some output was hidden under normal operation which should not have been.
a3fff01
to
87895bd
Compare
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.
Ack 87895bd
This PR does several things:
In general, this prepares for a reckless-rpc plugin coming next.