Skip to content

Conversation

@zcei
Copy link
Contributor

@zcei zcei commented Jun 12, 2025

This library technically has no dependency on railties to function.

Only if the environment we're in defines Railtie (Ruby on Rails) we want to load Rails specific behavior, but at this point we can rely on the gem already being loaded.

Making this change enables us to make it actually work in a standalone Rack environment, without implicitly changing the behavior of other gems that try to load their own railties because of the dependency being loaded.

Copy link

@andheiberg andheiberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm we have a real use-case for using Propshaft outside of Rails and that this would make that possible.

@zcei zcei force-pushed the remove-railties-dep branch from c1cb288 to 94a95aa Compare June 12, 2025 15:41
We don't need to go back to the Rails application to access the cache sweeper we already have the assembly instance in the server class.
So the LoadPath class don't need to go back to the Rails application to access the file watcher.
@rafaelfranca rafaelfranca force-pushed the remove-railties-dep branch from 5ac27c8 to 8ea1b4f Compare June 12, 2025 19:19
@rafaelfranca rafaelfranca merged commit d33f17b into rails:main Jun 13, 2025
3 checks passed
@zcei zcei deleted the remove-railties-dep branch June 13, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants