Repository navigation
reckless: rust rewrite - #9239
daywalker90 wants to merge 34 commits into
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
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.
The python wrapper only added the repo root to sys.path and ran the bare file stem, so an entrypoint like src/main.py failed with ImportError. Add the entrypoint's own directory to sys.path as well.
A single malformed manifest.json made find_plugin_locs return an error, so every plugin in that source disappeared from listavailable and install. Skip only the plugin whose manifest is invalid, log why, and keep scanning the rest of the source. The plugin is not installed with a default manifest, since that would ignore fields such as installable: false.
…name The lookup key was lowercased but the install directory kept the original case, so uninstall of MyPlug looked for reckless/myplug and failed to find the directory it had just installed.
A python plugin with a package.json at its root was routed to the nodejs installer, so its python dependencies were never installed.
The nodejs installer symlinked the entry file and executed it directly. A javascript entrypoint without a shebang failed to start with 'Exec format error (os error 8)'. Install a #!/bin/sh wrapper that runs the node binary found at install time instead.
The python wrapper embedded the venv and source paths in a shebang and in python string literals. A path with a space broke the shebang (the kernel splits it), and a path with a single quote broke the python source. Both wrappers are now sh scripts that pass every path as a single-quoted argument, so no value is interpolated into code.
The depth-1 filter skipped any directory whose name contained 'archive', so a plugin named archive_backup was silently left out of the source scan. Match the directory name exactly instead.
The uninstall section showed the install command.
The non-unix stub used a bare Result, which is not imported in this module, so the crate did not compile on non-unix targets.
The python tools/reckless and plugins/recklessrpc are replaced by the rust cln-reckless plugin. Remove the old binary, recklessrpc plugin and lightning-reckless.1 man page during make install, as was done for the old wss-proxy plugin. Changelog-Changed: reckless is now a Rust plugin. Changelog-Removed: the standalone `reckless` tool, the `recklessrpc` plugin and the `lightning-reckless.1` man page. If you install CLN from pre-compiled binaries, first remove `reckless` (usually /usr/local/bin/reckless), `recklessrpc` (usually /usr/local/libexec/c-lightning/plugins/recklessrpc) and `lightning-reckless.1`. If you compile from source, `make install` removes them automatically.
REDIR_GITHUB redirects where reckless fetches plugin repositories from. Only honour it in debug and small builds, so a release build always uses GitHub.
Plugins installed by the old python reckless use a different layout and are not managed by the rust plugin. listinstalled now logs a warning for each of them, with the directory to delete and the config lines to remove by hand. Changelog-Changed: reckless is now a Rust plugin and cannot manage plugins installed by the old python reckless. Before upgrading CLN, uninstall each plugin you installed with the old `reckless uninstall <name>`, then remove any `disable-plugin=` line for it from your reckless config, which is `<lightning-dir>/reckless/<network>-reckless.conf`. After upgrading, reinstall each plugin with `reckless install <name>`. If you skip the uninstall, `listinstalled` shows a warning for each old install, and the old plugin is not removed automatically on upgrade.
The .sources reader parsed every line as a source, so one empty line or comment made every reckless command fail with "path does not exist". Skip blank and # lines when reading. source remove rewrote the file from the parsed sources, which dropped comments and blank lines. It now removes only the matching line and keeps the rest. A source that is not listed no longer truncates the file.
ec8109c to
30d5277
Compare
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