-
Notifications
You must be signed in to change notification settings - Fork 333
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
deprecation warnings with sprockets 3.7.0 #381
Comments
Quick fix for me(for now) was...
|
Same warning in |
Seeing same warning in https://github.com/ai/autoprefixer-rails |
cc @schneems |
Working on a PR. |
- Use both `register_engine` and `register_transformer` in railtie.rb. - In the test postprocessor use an object that responds to `call` and `new.render`.
- Use both `register_engine` and `register_transformer` in railtie.rb. - In the test postprocessor use an object that responds to `call` and `new.render`.
- Use both `register_engine` and `register_transformer` in railtie.rb. - In the test postprocessor use an object that responds to `call` and `new.render`.
[close #381] Avoid Sprockets deprecations
@schneems Thanks a lot for solving the issue with the release of 5.0.6! |
Thanks all for chiming in. I added some docs to Sprockets guides on master to show how to register an processor across Sprockets 2, 3, and 4. Link: https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#registering-all-versions-of-sprockets-in-processors I also re-wrote the guide to be easier to reference, put the most relevant examples at the top of the sections and added a table of contents at the top. Please take a look and if you have something to add or ways you think the docs could be better open an issue and we can talk about it. I want the process of maintaining Sprockets extensions to be as easy as possible, I'm hoping the docs can smooth out rough edges and cut down on guessing how to write a sprockets plugin. If you're working on getting rid of deprecations in your own library and having problems, ping me on a pull request. |
sass-rails 5.0.6 fixes the issue: rails/sass-rails#381 Authors: @robinwhittleton @richardTowers
hey @schneems , I just updated my gem library for the first time in a while and a bunch of css/scss (but not everything) is not loading correctly, and I'm also seeing this error. Is it likely that this is related? I've never really used sprockets before so its not really clear to me why this would be happening. |
@calderJamNet if you have a repro example app please put it on github and give me access. If not you can manually specify an older version of sprockets and sass-rails in your Gemfile.lock. Do you have any more details other than not working correctly? |
Hey @schneems, I added you to the repo. Its just a testing ground for front end styles so its kind of a mess. I did however notice the same changes when I updated all the gems in the main repo. The differences I have noticed so far have only affected "border" and "color" css styles, with the original foundation styles being applied now while before they were being overwritten. They are minor and could be fixed easily with "!important" but I would like to understand why this started happening if possible. This is how it was before bundle update: so far I've only noticed it affecting styles for founations ".accordion", so perhaps the issue is routed in something they changed, in which case I apologize for wasting your time. |
@calderJamNet i'm back from vacation and will probably have time to look at this sometime this week. I made an issue for a reminder since this issue is "closed" #384 |
@schneems I haven't customized Sprockets before -- what's the typical file/location that you would place the |
This deprecation should only come from gems that are customizing sprockets for you, what is the deprecation output say? It should point it at a location, probably from a gem. |
@schneems I haven't customized sprockets before this either. How do I view the deprecation output? |
@calderJamNet i don't understand the question. If you're using Sprockets 3.7 and using another gem that doesn't support Sprockets 4 yet, then you'll see deprecation output in your output when you build assets or run in development. |
|
sass-rails had an issue, so needed to be greater than 5.0.6 rails/sass-rails#381
Update "sass-rails" gem from v5.0.5 to v5.0.6 to fix the following deprecation warnings appearing at startup and running tests: ``` 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 /Users/dsteelma/.rvm/gems/ruby-2.2.4@archelon/gems/sass-rails-5.0.5/lib/sass/rails/railtie.rb:57) 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 /Users/dsteelma/.rvm/gems/ruby-2.2.4@archelon/gems/sass-rails-5.0.5/lib/sass/rails/railtie.rb:58) ``` See rails/sass-rails#381 https://issues.umd.edu/browse/LIBHYDRA-105
Update "sass-rails" gem from v5.0.5 to v5.0.6 to fix the following deprecation warnings appearing at startup and running tests: ``` 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 /Users/dsteelma/.rvm/gems/ruby-2.2.4@archelon/gems/sass-rails-5.0.5/lib/sass/rails/railtie.rb:57) 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 /Users/dsteelma/.rvm/gems/ruby-2.2.4@archelon/gems/sass-rails-5.0.5/lib/sass/rails/railtie.rb:58) ``` See rails/sass-rails#381 https://issues.umd.edu/browse/LIBHYDRA-105
Update "sass-rails" gem from v5.0.5 to v5.0.6 to fix the following deprecation warnings appearing at startup and running tests: ``` 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 /Users/dsteelma/.rvm/gems/ruby-2.2.4@archelon/gems/sass-rails-5.0.5/lib/sass/rails/railtie.rb:57) 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 /Users/dsteelma/.rvm/gems/ruby-2.2.4@archelon/gems/sass-rails-5.0.5/lib/sass/rails/railtie.rb:58) ``` See rails/sass-rails#381 https://issues.umd.edu/browse/LIBHYDRA-105
The Rails update from 4.2.6 to 4.2.7 caused Sprockets-related deprecation warnings: DEPRECATION WARNING: Sprockets method `register_engine` is deprecated. These were fixed in sass-rails: rails/sass-rails#381
- Had to update gems individually as bundle update informed me of dependencies that they could not match. - The gem sass-rails was throwing a deprecation for a sprocket method called `register_enginerj` and had to be updated. Reference: rails/sass-rails#381 - Specs were throwing an error `undefined method `cache' for nil:NilClass` and researching solved it by updating rspec-rails - Kept changing gem versions until I found that all specs were passing again
sass-rails-5.0.5 throws deprecation warnings when using sprockets 3.7.0:
The text was updated successfully, but these errors were encountered: