tenderlove / rails_autolink

The auto_link function from Rails
MIT License
588 stars 91 forks source link

Reduce Rails dependencies #79

Closed orien closed 1 year ago

orien commented 1 year ago

rails_autolink declares a runtime dependency on rails. This brings in transitive dependencies like actioncable, activerecord, and activestorage. These aren't strictly necessary to use rails_autolink.

I propose to reduce the declared runtime dependencies by replacing rails with actionview, activesupport, and railties. This will give downstream projects the ability to be more selective in the Rails dependencies they use.

amatsuda commented 1 year ago

@orien Do you have any idea why the CI is passing although we're still requiring rails in test/test_rails_autolink.rb#L4?

orien commented 1 year ago

@amatsuda Thanks for the thorough review 🙇

The require 'rails' statement is actually satisfied by the railties gem. See: https://github.com/rails/rails/blob/7-0-stable/railties/lib/rails.rb

amatsuda commented 1 year ago

Indeed! Thank you for clarifying!