Skip to content
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 warning in sprockets 3.7.0 #201

Closed
jaredbeck opened this issue Jul 21, 2016 · 16 comments
Closed

Deprecation warning in sprockets 3.7.0 #201

jaredbeck opened this issue Jul 21, 2016 · 16 comments

Comments

@jaredbeck
Copy link

sprockets 3.7.0, js-routes 1.2.7, rails 5.0.0

DEPRECATION WARNING: You are using the a deprecated processor interface #<Proc:0x007fc451a92b68@/Users/jared/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/js-routes-1.2.7/lib/js_routes/engine.rb:11>.
Please update your processor interface:
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:Engine> at /Users/jared/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/js-routes-1.2.7/lib/js_routes/engine.rb:11)

Looks like the Extending Sprockets guide is pretty thorough. I don't really understand any of it, but it looks pretty thorough :)

@jaredbeck
Copy link
Author

Same warning in sass-rails (rails/sass-rails#381) I suspect a lot of sprockets extensions will be fixing this in similar ways and may benefit from each other's work.

@bogdan
Copy link
Collaborator

bogdan commented Jul 22, 2016

Oh god...one more...

@jaredbeck
Copy link
Author

Same warning in sass-rails (rails/sass-rails#381) I suspect a lot of sprockets extensions will be fixing this in similar ways and may benefit from each other's work.

It's fixed in sass-rails, and according to rails/sass-rails#381 (comment) it sounds like the sprockets documentation has been improved also, which should make this easier to fix here.

@WAFulbright
Copy link

WAFulbright commented Jul 30, 2016

nice commentaries. HOW do I update this or fix it?

Could I get a "how to" answer? When I was first building this application, it worked. I am sure I broke something trying to keep up with the tutorial...It is all good, he just goes fast.

I am using rails 4.2.6. and Ruby 2.2.3p173

@flood4life
Copy link
Contributor

I've fixed this in #202. It will still issue deprecation warning, but will work in sprockets 2, 3, 4. And I've found that guide to be not totally correct, but now it's fixed.

@bogdan
Copy link
Collaborator

bogdan commented Aug 5, 2016

Check the recent verison and ensure it fixes your issue.

@jaredbeck
Copy link
Author

Check the recent verison and ensure it fixes your issue.

Which version? The combination of js-routes 1.2.8 and sprockets 3.7.0 still produces this deprecation warning.

DEPRECATION WARNING: You are using the a deprecated processor interface #<Proc:0x007fac03b67680@/Users/jared/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/
gems/js-routes-1.2.8/lib/js_routes/engine.rb:58>.
Please update your processor interface:
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:Engine> at /Users/jared/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/
gems/js-routes-1.2.8/lib/js_routes/engine.rb:58)
bundle show sprockets
../gems/sprockets-3.7.0
bundle show js-routes
../gems/js-routes-1.2.8

@bogdan
Copy link
Collaborator

bogdan commented Aug 8, 2016

@flood4life can you take a look? Is it because you left the old implementation for 3.x?

@flood4life
Copy link
Contributor

@bogdan yep, exactly because of it, since you asked to not change anything for sprockets 2-3. Initial version (with single class) does not produce the warning. I think it's possible to explicitly suppress the warning, but not sure how.

@bogdan
Copy link
Collaborator

bogdan commented Aug 8, 2016

"Initial version" which one do you mean?

Also, does it produce a warning for all 3.x versions or only for 3.7?

@flood4life
Copy link
Contributor

The one before you asked to add the case statement. Not sure about versions (on mobile now), but here's the commit that adds deprecation rails/sprockets@924c920

@CyborgMaster
Copy link

I can confirm that the deprecation warning does not show up in 3.6.4, but does show up in 3.7.0. I would love to get that warning out of my logs.

@bogdan
Copy link
Collaborator

bogdan commented Aug 9, 2016

We should change the condition to use newly developed preprocessor from #202 from version >= 4.0 to version >= 3.7

@CyborgMaster
Copy link

Awesome. Thanks! I'll watch this issue here to see when I should update.

@bogdan
Copy link
Collaborator

bogdan commented Aug 10, 2016

Released 1.2.9. Please check

@jaredbeck
Copy link
Author

jaredbeck commented Aug 10, 2016

Thanks Bogdan and Murad, with js-routes 1.2.9 I am no longer seeing this issue. 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants