Closed petergoldstein closed 2 years ago
This seems to have been done in https://github.com/perfectline/validates_url/commit/80a91294ad6388634246d2a755fa78fc84071815.
@timrogers It was, kind of. Because the CI action now in master
does not call rm Gemfile.lock
, the Ruby 2.5 build fails in CI. I'd suggest either removing Ruby 2.5 or addressing as in this PR.
@timrogers Oh, and the change in master
leaves out modern Rubies - 3.0, 3.1. Again this should be addressed.
@petergoldstein 😓 Good spot! It might be worth creating a PR to fix that if you have time - I'm sure the maintainer would appreciate it.
@timrogers Frankly, this is that PR. It fixes all the issues that the implementation in master didn't fix. If the maintainer wishes to reopen, this PR can simply be merged.
I don't think removing the Gemfile.lock
is a good practice.
I totally agree with you, my PR is not perfect and I added a comment describing this issue but I'm pretty sure there is a better way to fix that.
@benjamin-ltr The PR you submitted (and was merged) is conceptually flawed. There is no common Gemfile.lock that works for Ruby 2.3 - Ruby head. So there are exactly three solutions if you want to handle that range of Rubies:
Those are the options. Any of them is "fine", although I tend to favor (1) on my gem repos.
And here's a link to everything running green - https://github.com/petergoldstein/validates_url/actions/runs/2320480558
I think there is another option. Nokogiri is not really used by this gem, it's a jeweler dependency. We can remove the jeweler dependency and have another workflow for automatic releases that installs this dependency and automatically release this gem on a tag push.
@benjamin-ltr You are assuming that the only problem is Nokogiri. That's incorrect in this case. Rails is in the Gemfile.lock and there is no version of Rails that runs with all Rubies 2.3-3.1
It's also incorrect in general. This is not a validates_url
problem. Nor is it a jeweler
problem (I don't really know why jeweler
is needed in 2022 at all, as noted by my removal). This is an extremely common problem when putting together CI pipelines that span large ranges of Rubies. Either you cut down the supported Rubies or you engage in one of the three strategies mentioned above.
I'll grant you that attempting to trim your dependencies to only those gems that have at least one single version that supports all Rubies from 2.3 to 3.1 is an additional strategy . But it's almost certainly a failing strategy.
Anyway, I'm not really that invested here. Do what you will. I'll leave this here for a bit and, assuming it hasn't been merged, close it on my next forked repo cleanup.
Migrate CI to GitHub Actions as Travis CI.org is no longer active.
In addition to adding the GH config, it was necessary to remove the Jeweler dependency to get things running on recent Rubies. In addition, I did some cleanup of the gemspec.