annotate_models icon indicating copy to clipboard operation
annotate_models copied to clipboard

Deprecation Warning on Rails 6.1 - bin/rake routes

Open andrewek opened this issue 5 years ago • 7 comments

On Rails 6.0.1, with the latest dependency, I received the following warning upon route annotation:

DEPRECATION WARNING: Using `bin/rake routes` is deprecated and will be removed in Rails 6.1. Use `bin/rails routes` instead.
 (called from load at /usr/local/bundle/bin/rake:23)
config/routes.rb annotated.

I'll do some research into what it would take to resolve this deprecation warning without breaking backwards compatibility too badly.

I should also note that annotation happened correctly.

Commands

$ annotate --routes

Version

  • annotate version - 3.0.3
  • rails version - 6.0.1
  • ruby version: 2.6.5p114

andrewek avatar Dec 05 '19 18:12 andrewek

`rake routes`.chomp("\n").split(/\n/, -1) is used internally to generate routes annotation content, that's what causes rails to issue the warning (and this will really break with rails 6.1)

Vasfed avatar Dec 05 '19 18:12 Vasfed

This gem needs some love and is definitely behind on being able to support newer Rails versions. Any PRs would highly appreciated.

drwl avatar Dec 25 '19 19:12 drwl

@drwl Cool - taking a look now.

andrewek avatar Dec 30 '19 21:12 andrewek

@andrewek let me know if I can help with this at all. Right now my priority is to get integration tests working (currently they're skipped) and update them with newer versions of Rails.

drwl avatar Jan 15 '20 15:01 drwl

@andrewek @drwl @Vasfed

What is the status here? What's stopping us from simply changing rake routes to rails routes, which for me works on Rails 6.1.0.rc1. Is it backward compatibility? So far rails routes also works on Rails 5.1.4. Are there any complications that I cannot see?

dcangulo avatar Nov 18 '20 04:11 dcangulo

@dcangulo to be honest since covid and the pandemic has started (at least in USA), I've lost the energy to help maintain the project -- so it's been a while since I've revisited this.

drwl avatar Nov 24 '20 18:11 drwl

@drwl I think we can safely drop rails 4 support (it is EOL anyway, if anyone has an app on it - they can use older versions of annotate), opened a PR for this.

Vasfed avatar Nov 24 '20 20:11 Vasfed