sonic-pi-tool icon indicating copy to clipboard operation
sonic-pi-tool copied to clipboard

Updating for 4.0 Update

Open sysnet-ai opened this issue 1 year ago • 5 comments

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 to daemon.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!

sysnet-ai avatar Jan 05 '23 19:01 sysnet-ai