New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Reloader #146
Comments
I've been experimenting with this a bit over the weekend and I wanted to share. ReloaderCamping's reloader assumes that we're loading every app from a single file, which kinda makes sense, historically. This is not going to be the assumption moving forward though, and with autoloading we'll need to rethink this. To really understand what to do we'll need to establish a directory structure scheme, that's simple, and easy to understand. Directory Structure.We've talked about this in other issues and PRs, but a formal directory structure should now be like this:
I think that's an expanded directory structure. An abbreviated structure:
Because, ideally, you would only have an Apps directory if you have more than one app, or if you're app starts to get pretty big. A goal of Camping is to have installable and modifiable apps available. So you could add an app to your Gemfile and just, have it work. Getting that to work with the Reloader might be tricky, but not if we reload according to where the app is defined, i.e. : Once everything is loaded |
I've mostly got a new reloader thing working the way It ought to on this branch: https://github.com/karloscarweber/camping/tree/feat-146-fix-reloader . Formal PR and more documentation/discussion about this should be incoming later tonight/early tomorrow. |
I have a new Reloader now called Loader mostly working and passing tests. Work in progress PR can be found at: #147 . I have questions about the ORDER that things should be loaded or autoloaded. For example in directories and subdirectories should we prioritize the eager loading of Models over Controllers? Ought there to be a preloading sequence for initializers? I'd love to hear what ya'll think about those ideas. Should certain files/folders be loaded first, or take priority?The idea is that certain files or folders should be loaded first as they are probably depended on by other files, like models. But this might be a non issue because of the ZeitWerk loading thingy. Each Loader instance has an its Related question! Should Pre and Post loading scripts?Before loading our apps should we have some sort of initialization scripts? I don't want to bloat things and perhaps the |
The Reloader is broken or borked with the way we do things now in Camping land. We need to fix that, I think.
This issue entails a couple things really. Additionally we want to have a standard directory structure that we've been experimenting with for a while now. So we should have that sorted out. We need to cement the convention of using camp.rb as the launcher for our apps. OR moving apps up to an
/apps
directory and autoloading THOSE virtually or something. We also ought to add some autoloader stuff using Zeitwerk.So:
The text was updated successfully, but these errors were encountered: