Sourcecode update from outer world

Is it possible now that you can use an external editor for tool coding, so Renoise auto-detects file changes and then will recompile? I remember that there was something changed lately…

If I remember correctly, it doesn’t detect imported files being modified (only main.lua). Don’t quote me on that.

2 Likes

Hm, file watchers (macos system watchers) would be nice, so you fully could use an external editor. Also maybe “reload tools” thru Renoise.exe commandline?

1 Like

I started a prototype tool to make this workflow easier. It’s a separate renoise tool you use to develop your own tool. Here’s how it works:

First you select the path to your tool on disk. Then instead of using a file watcher wait for the renoise window to gain focus, and when it does we check the project files to see if they have changes. If they do we rebuild the tool and install it.

The reason for that approach is two fold:

  1. Waiting until the window is focused means you see any immediate effects caused by the code change
  2. There’s no way to watch files from within renoise and file watchers tend to be inaccurate anyway

The change detection uses mtime comparisons like make. The build can execute any command as long as it spits out a xrnx file when it’s done.

The main downside of this approach is when the tool being developed is reloaded, the build tool is reloaded too and loses all state. Anything that needs to persist like the last build’s mtimes needs to be written to disk first.

In my tests I am able to go to my editor, make a change, tab back to renoise, and see my change instantly applied without any prompts. And in case this isn’t clear the project can be located anywhere on disk; I’m using a git repo in my home directory.

I’m planning to extend this out into a general “devtools” tool. I would like to add a graphical test runner that is able to execute individual scripts within the renoise environment. And possibly a way to easily build and test views akin to Storybook for React.

1 Like

@mattya if this can work on macOS, please let me know how to test it. i’m thoroughly fed up with the instability of the scripting tool editor. it will actually make macOS freeze and app switching impossible and cursor + keyboard freezes etc and i gotta restart macOS altogether. i’ve had these issues since 2011.

something to do with “save + force reloading of all functions” that leaks memory and crashes.

1 Like

@esaruoho I pushed an initial version of the tool here: GitHub - matt-allan/renoise-livereload: Live reloading for Renoise tools

You can click on the latest workflow run here and download the “xrnx” artifact to try it: Build · Workflow runs · matt-allan/renoise-livereload · GitHub