sonic-pi-tool
sonic-pi-tool copied to clipboard
Updating for 4.0 Update
Updated to SonicPi 4.3 and it broke all my vim integrations - So I figured I could wire it up.
I tested with vim-sonic-pi and everything is working but the :ShowLogs
command. But running :!sonic-pi-tool logs
works correctly - so it seems to be somewhere in the VimScript which I can't really get too deep into.
But outside of that, tests are passing and all commands are working as previous versions.
Changes Required:
- SonicPi changed the main entry point from
server.rb
todaemon.rb
- SonicPi went from fixed ports to a dynamic port allocation. Get the ports from the daemon's output and write it in a file.
- When starting from the daemon - It adds a kill switch to bring down all the processes that it started, which makes the teardown real easy - but it requires a repeating keep alive message.
Some Crates Added:
Serde / Serde_derive / toml: To easily serialize and deserialize the configuration file. Picked toml because it's well supported in rust and the configuration files of sonic pi are already toml. I figured using the same sonic-pi path was a good idea cause it avoids more clutter on the user's ~/
duct: To easily run the daemon and get the ports from the output.
Thanks for the tool :)! - Hope this helps!