You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using figwheel-main to wonderful effect for experimenting with Quil sketches. It's really a pleasant experience to save a file and immediately see the corresponding update in running animation, so thank you so much for this tool.
However, I've recently started experimenting using fragment shaders by way of http://quil.info/api/rendering/shaders#load-shader and sadly the workflow isn't so happy. Changes to a shader require a save of the GLSL shader file & then restarting or reloading the sketch. From my understanding, there are a couple major impediments to using this by way of Figwheel:
Changes in GLSL shader source does not participate in file-watch, so it doesn't appear possible to relay changes in a dependent source file to a particular Clojurescript reload hook.
Shader's are usually loaded at script initialization at page load, so some additional logic is necessary to force a state change on the page.
There is one partial workaround, which is to save the GLSL fragment as a string inside of the Clojurescript source, but that's not so nice for editing purposes.
This is likely a niche use case, so it's unlikely that a solution to it would be baked directly into Figwheel, however it does speak to a broader issue about file dependencies other than css or clojure triggering a reload event. As example, it would be nice if changes to a referenced image, svg or I8n file triggered a reload in dependent pages.
A few simple ideas that jump to mind are:
Extend the watch dirs syntax to allow watching other directories & file types
Adding a handler that maps between a filename and namespaces to trigger a reload on
Extend the meta syntax around ^:figwheel-hooks so it either lists specific files it depends on, or has a namespace specific should-reload that is passed all watched file updates to determine if the namespace should reload.
Passing the save event + all dependencies updated to before-load & after-load to allow custom state changes based on which dependency changed.
I don't have a definite solution here, but am interested in exploring the space & implementing some solution, and wondered if anyone else had any ideas about how to resolve this.
The text was updated successfully, but these errors were encountered:
I just hit this similar but working with text files loaded via ajax I wanted a reload to be triggered when one of the file have been touched, any reason the watchers can not be made more generic even if its by supplying a list of valid extensions or something to extend them perhaps ?
I've been using figwheel-main to wonderful effect for experimenting with Quil sketches. It's really a pleasant experience to save a file and immediately see the corresponding update in running animation, so thank you so much for this tool.
However, I've recently started experimenting using fragment shaders by way of http://quil.info/api/rendering/shaders#load-shader and sadly the workflow isn't so happy. Changes to a shader require a save of the GLSL shader file & then restarting or reloading the sketch. From my understanding, there are a couple major impediments to using this by way of Figwheel:
There is one partial workaround, which is to save the GLSL fragment as a string inside of the Clojurescript source, but that's not so nice for editing purposes.
This is likely a niche use case, so it's unlikely that a solution to it would be baked directly into Figwheel, however it does speak to a broader issue about file dependencies other than css or clojure triggering a reload event. As example, it would be nice if changes to a referenced image, svg or I8n file triggered a reload in dependent pages.
A few simple ideas that jump to mind are:
^:figwheel-hooks
so it either lists specific files it depends on, or has a namespace specificshould-reload
that is passed all watched file updates to determine if the namespace should reload.before-load
&after-load
to allow custom state changes based on which dependency changed.I don't have a definite solution here, but am interested in exploring the space & implementing some solution, and wondered if anyone else had any ideas about how to resolve this.
The text was updated successfully, but these errors were encountered: