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
The latest version of jquery-tmpl-rails triggers a sprockets deprecation warning of:
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
Please register a mime type using `register_mime_type` then
use `register_compressor` or `register_transformer`.
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from block (2 levels) in <class:Railtie> at /my/path/to/gems/jquery-tmpl-rails-ef6f58001d41/lib/jquery-tmpl-rails/engine.rb:10)
However, this attempt simply deals out breakages when trying to run the web application at all or test it on the CI. So obviously I've missed something. I am not the gem maintainer but am trying to put this PR together myself as we rely on this gem.
Questions
Is there a simple syntactical approach I am missing here?
It was unclear to me in the docs, although register_engine is deprecated in Sprockets 3, is it actually possible to migrate from register_engine while staying in Sprockets 3?
If we are remaining on Sprockets 3 for the foreseeable future, is it kosher to silence this? Generally I work viewing deprecations as 'bugs that need fixing' and would rather not.
The text was updated successfully, but these errors were encountered:
Versions
Issue:
The latest version of
jquery-tmpl-rails
triggers a sprockets deprecation warning of:Attempts at resolution:
Following the deprecation warning, the problem within the gem simply resides here: https://github.com/jimmycuadra/jquery-tmpl-rails/blob/master/lib/jquery-tmpl-rails/engine.rb#L10
Which is currently:
app.assets.register_engine(".tmpl", JqueryTemplate)
I then visited the sprockets guide for handling deprecations, extensibility and compliance with sprockets 2,3,4. https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
I made my best attempt at rectifying the problem with a commit on this fork here: oceanshq/jquery-tmpl-rails@de7a598
Which was:
However, this attempt simply deals out breakages when trying to run the web application at all or test it on the CI. So obviously I've missed something. I am not the gem maintainer but am trying to put this PR together myself as we rely on this gem.
Questions
register_engine
is deprecated in Sprockets 3, is it actually possible to migrate fromregister_engine
while staying in Sprockets 3?The text was updated successfully, but these errors were encountered: