Closed richseviora closed 7 years ago
Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @rafaelfranca (or someone else) soon.
If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.
Please see the contribution instructions for more information.
This broke the test suite
Sorry about that!
OK, the problem is that ActionView
does not eager_autoload DependencyTracker
, it is only loaded when required through Digestor
. I've added a require statement at the appropriate step.
While researching rails#28503 I noticed that
.coffee
files do not resolve dependencies because they have not had a dependency tracker registered.Given
objects/show.coffee
:Running
rake cache_digest:nested_dependencies TEMPLATE=objects/show
would return an empty array (no dependencies).However, once
ActionView::DependencyTracker::ERBTracker
has been registered as a tracker for.coffee
files, running the same rake task properly resolves the dependencies.I don't know how we can test this particular behaviour within this gem given that ActionView isn't available here, but if there's way to do so I'd love to include a few.