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

Refactor gemfiles #438

Merged
merged 1 commit into from
Nov 16, 2023
Merged

Refactor gemfiles #438

merged 1 commit into from
Nov 16, 2023

Conversation

sambostock
Copy link
Contributor

We have several gemfiles in which we have specific version requirements for activejob and activerecord, for use in our CI matrix.

The current approach breaks on Ruby HEAD because it is detected as specifying multiple versions/sources for those gems. Instead, this refactors them to use an instance variable approach, similar to that used in Shopify/maintenance_tasks.

We have several gemfiles in which we have specific version requirements
for `activejob` and `activerecord`, for use in our CI matrix.

The current approach breaks on Ruby HEAD because it is detected as
specifying multiple versions/sources for those gems. Instead, this
refactors them to use an instance variable approach, similar to that
used in Shopify/maintenance_tasks.
@@ -11,6 +11,17 @@ gemspec
gem "sidekiq"
gem "resque"

if defined?(@rails_gems_requirements) && @rails_gems_requirements
# We avoid the `gem "..."` syntax here so Dependabot doesn't try to update these gems.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sambostock
Copy link
Contributor Author

Looks like this approach works on latest Ruby HEAD, as opposed to the previous approach which no longer works as of this writing.

@sambostock sambostock marked this pull request as ready for review November 15, 2023 21:55
Copy link
Contributor

@Mangara Mangara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love the dependabot work-around, but it's better than broken CI.

@sambostock
Copy link
Contributor Author

Yeah, it's weird. Shopify/maintenance_tasks#496 has context on how and why they got to their

rails = "rails"
gem rails, @rails_gem_requirement

approach, which I adapted.

@sambostock sambostock merged commit c4ff63e into main Nov 16, 2023
39 checks passed
@sambostock sambostock deleted the refactor-gemfiles branch November 16, 2023 15:26
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

Successfully merging this pull request may close these issues.

3 participants