reckless: rust rewrite - #9239
Conversation
8644166 to
6889d36
Compare
vincenzopalazzo
left a comment
There was a problem hiding this comment.
Nice to see that the manifest idea is taking over. Hope you are also using git for versioning, otherwise this would be another good thing to take from https://github.com/coffee-tools/coffee
There was a problem hiding this comment.
Would be nice to reference the original reference implementation https://coffee-docs.netlify.app/support-coffee
There was a problem hiding this comment.
Would be nice to reference the original reference implementation https://coffee-docs.netlify.app/support-coffee
I was planning on giving full credit for the manifest/tip function to coffee in the README. But i want to lock down the functionality first before writing documentation.
There was a problem hiding this comment.
to save credit was also good to just include coffee, I do not think there are more features than coffee, we were also supporting ws (palanning to) to support interactive UX inside the web applications
But these days cloning is easy!
If you mean installing a plugin with a git ref then yes, that is supported. |
Yeah, otherwise it's insanity! Nice, it would be nice to have two lines that reference coffee because the development died because Blockstream was moving to reckless. Referencing a good idea is what is left in this AI era, where rebuilding is easy |
6658af8 to
f6bbfb5
Compare
5833d8b to
853fe7d
Compare
f4513c8 to
bf9e3e2
Compare
|
|
59f0030 to
a0ca360
Compare
4cbd454 to
fc99024
Compare
| let line = format!("creating venv at: {}", venv_dir.display()); | ||
| logger.log(&line, LogLevel::INFO).await?; | ||
|
|
||
| let mut command = Command::new("python"); |
There was a problem hiding this comment.
Is this command assuming the presence of python-is-python3? Couldn't we invoke python3 directly?
There was a problem hiding this comment.
Good catch. Outside a venv it's best to call python3 on unix platforms.
| .map(std::borrow::ToOwned::to_owned), | ||
| }; | ||
|
|
||
| match enable_plugin(plugin.clone(), rl_plugin, install_args.options, &mut logger).await { |
There was a problem hiding this comment.
reckless install plugin-a plugin-b is not possible anymore, as clearly stated in the README and --help, but if a user attempts it no error is raised. Since this was possible in the old version, I feel like we should somehow enforce this new behaviour, or at least raise an error if attempted.
There was a problem hiding this comment.
A second plugin name is currently not distinguishable from a config flag, since we don't require plugin config options to prefix with something like --. That is why you don't see an error on a command like you wrote. It will try to install plugin-a with the boolean flag plugin-b which at the end will fail since no such option exists in the plugin-a manifest:
l1-cli reckless install summary historian
...
"INFO: plugin installed: /tmp/l1/reckless/summary/summary.py",
"WARNING: option historian not found in manifest",
"WARNING: summary failed to start, it may require options, read the logs!"
Shahana said, that breaking with old reckless input/output format was ok since nobody really used it.
There was a problem hiding this comment.
alright, then I guess the docs mentions are enough.
a81ce21 to
9f45807
Compare
Changelog-Changed: reckless: complete rewrite with new subcommands `listinstalled` and `tip`. Replaced `search` with `listavailable`.
If the timestamp of the python file does not differ after an update it will load the bytecode of the old version. We remove the pycache to make sure this does not happen. Mostly a test environment issue as in practive the timestamps should always differ.
After ElementsProject@fce9d6e we can now use it. Also fix writing flag options to config file.
9f45807 to
4a983dd
Compare
Not ready for code review yet, we have not decided on some important aspects. Right now it is a drop-in replacement of the python reckless version.
Should
Fixes: #8439
Fixes: #8761
Fixes: #8775
Fixes: #8776
Fixes: #8794
and should supercede #8630
Key differences:
reckless-diris a proper plugin option now--jsonoptionlistavailable, an array of strings is just not nice heremanifest.json