I’m working on breaking a part a rails app and making use of dry-system. Everything is working great so far, except I cannot figure out how to get it working with Rails’ constant reloading in development. Has anyone done this successfully or have suggestions on where I might start?
This is super outdated, but we have a railtie for dry-system right here https://github.com/dry-rb/dry-system-rails Maybe it’d be worth seeing if a proper setup for code reloading could be added to this railtie.
This is a very rails-specific problem so monkey-patching Container is going to be the best solution (and of course extracting the require part into a separate method that can be overridden), simply because the alternative is to make the library more complex just to satisfy this one use case. Maybe in the future, we will discover that having a configurable “source loader” is useful, but for now, this is the only case. I’m more than happy to give you commit access to dry-system-rails and you can do whatever you need to do in order to make it work for you and others.