8000 Make lockfile platforms easier to maintain by deivid-rodriguez · Pull Request #8344 · activeadmin/activeadmin · GitHub
[go: up one dir, main page]

Skip to content

Make lockfile platforms easier to maintain #8344

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

Merged
merged 2 commits into from
May 29, 2024

Conversation

deivid-rodriguez
Copy link
Member
@deivid-rodriguez deivid-rodriguez commented May 28, 2024

This should work equally well and has less churn when maintainers upgrade their OS or switch platforms.

Copy link
codecov bot commented May 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.10%. Comparing base (489d102) to head (8722101).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8344   +/-   ##
=======================================
  Coverage   99.10%   99.10%           
=======================================
  Files         140      140           
  Lines        4018     4018           
=======================================
  Hits         3982     3982           
  Misses         36       36           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member
@javierjulio javierjulio left a comment

Choose a reason for hiding this comment

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

Do you know where the *-21 and other platform values come from (how they get added/removed) or if Bundler has docs that cover these?

Do you want to make the same changes to the lock files in the /gemfiles directory too?

@deivid-rodriguez
Copy link
Member Author
deivid-rodriguez commented May 29, 2024

Yeah, I should've added a bit more context!

So these platform values ultimately come from Ruby. For example,

$ ruby -e 'puts RUBY_PLATFORM'
arm64-darwin21

When Bundler is run, it uses the value of the local platform, and finds the optimal resolution for the local platform. For example, if you're on x86_64-linux and say, nokogiri, has a x86_64-linux version, it will choose that and include that in the lockfile. It will also include the local platform in the PLATFORMS lockfile section if it's not already there.

The specific number in this case is supposed to track the specific macOS version. However, in practice, gem authors don't release macOS version specific variants of their gems, since the platforms are the same in practice. So, there's no arm64-darwin-21 specific version of nokogiri, just a arm64-darwin.

Recent versions of Bundler will "optimize" this, and as long as no variants specific to the macOS version exist, it will lock only arch + OS, but not the specific macOS version.

So, these should not get added in the future again as long as we use a recent enough version of Bundler.

I'll add the same changes to the other gemfiles, good idea!

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/lockfile-platforms branch 2 times, most recently from 395414a to 86be771 Compare May 29, 2024 09:29
@tagliala
Copy link
Contributor
tagliala commented May 29, 2024

So, these should not get added in the future again as long as we use a recent enough version of Bundler.

Oh great, just tested because my dev environment was adding platforms and it does not happen on this branch

Copy link
Member
@javierjulio javierjulio left a comment

Choose a reason for hiding this comment

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

Thanks!

@javierjulio javierjulio force-pushed the deivid-rodriguez/lockfile-platforms branch from 86be771 to 8722101 Compare May 29, 2024 14:17
@deivid-rodriguez
Copy link
Member Author

Thanks both!

@deivid-rodriguez deivid-rodriguez merged commit f4eb67a into master May 29, 2024
22 checks passed
@deivid-rodriguez deivid-rodriguez deleted the deivid-rodriguez/lockfile-platforms branch May 29, 2024 14:45
tagliala added a commit to tagliala/inherited_resources that referenced this pull request Jun 1, 2024
This should work equally well and has less churn when maintainers
upgrade their OS or switch platforms.

Recent versions of Bundler will "optimize" this, and as long as no
variants specific to the macOS version exist, it will lock only arch
+ OS, but not the specific macOS version.

These should not get added in the future again as long as we use a
recent enough version of Bundler, and for this reason locked Bundler
has been bumped to 2.5.11

Ref: activeadmin/activeadmin#8344
tagliala added a commit to tagliala/inherited_resources that referenced this pull request Jun 1, 2024
This should work equally well and has less churn when maintainers
upgrade their OS or switch platforms.

Recent versions of Bundler will "optimize" this, and as long as no
variants specific to the macOS version exist, it will lock only
arch + OS, but not the specific macOS version.

These should not get added in the future again as long as we use a
recent enough version of Bundler, and for this reason locked Bundler
has been bumped to 2.5.11

Ref: activeadmin/activeadmin#8344
javierjulio pushed a commit to activeadmin/inherited_resources that referenced this pull request Jun 1, 2024
This should work equally well and has less churn when maintainers
upgrade their OS or switch platforms.

Recent versions of Bundler will "optimize" this, and as long as no
variants specific to the macOS version exist, it will lock only
arch + OS, but not the specific macOS version.

These should not get added in the future again as long as we use a
recent enough version of Bundler, and for this reason locked Bundler
has been bumped to 2.5.11

Ref: activeadmin/activeadmin#8344
tagliala added a commit to tagliala/activeadmin that referenced this pull request Jul 28, 2024
tagliala added a commit to tagliala/activeadmin that referenced this pull request Jul 28, 2024
Also backport activeadmin#8344 and use latest rubygems from activeadmin#8370
tagliala added a commit to tagliala/activeadmin that referenced this pull request Jul 28, 2024
Also:
- Backport activeadmin#8344
- Use latest rubygems (partial backport of activeadmin#8370)
- Backport activeadmin#8372
tagliala added a commit that referenced this pull request Jul 28, 2024
Update dependencies

Also:
- Backport #8344
- Use latest rubygems (partial backport of #8370)
- Backport #8372
tagliala added a commit to tagliala/active_storage_validations that referenced this pull request Oct 11, 2024
- Test against Rails 7.2
- Test against Ruby 3.3
- Make lockfile platforms easier to maintain
  (ref: activeadmin/activeadmin#8344)
- Update bundles
tagliala added a commit to tagliala/active_storage_validations that referenced this pull request Oct 11, 2024
- Test against Rails 7.2
- Test against Ruby 3.3
- Make lockfile platforms easier to maintain
  (ref: activeadmin/activeadmin#8344)
- Update bundles by using the minimum supported ruby version
tagliala added a commit to tagliala/active_storage_validations that referenced this pull request Oct 11, 2024
- Test against Rails 7.2
- Test against Ruby 3.3
- Make lockfile platforms easier to maintain
  (ref: activeadmin/activeadmin#8344)
- Update bundles by using the minimum supported ruby version
tagliala added a commit to tagliala/active_storage_validations that referenced this pull request Oct 11, 2024
- Test against Rails 7.2
- Test against Ruby 3.3
- Make lockfile platforms easier to maintain
  (ref: activeadmin/activeadmin#8344)
- Update bundles by using the minimum supported ruby version
tagliala added a commit to tagliala/active_storage_validations that referenced this pull request Oct 11, 2024
- Test against Rails 7.2
- Test against Ruby 3.3
- Make lockfile platforms easier to maintain
  (ref: activeadmin/activeadmin#8344)
- Update bundles by using the minimum supported ruby version
tagliala added a commit to tagliala/active_storage_validations that referenced this pull request Oct 11, 2024
- Test against Rails 7.2
- Test against Ruby 3.3
- Make lockfile platforms easier to maintain
  (ref: activeadmin/activeadmin#8344)
- Update bundles by using the minimum supported ruby version
tagliala added a commit to tagliala/active_storage_validations that referenced this pull request Oct 11, 2024
- Test against Rails 7.2
- Test against Ruby 3.3
- Make lockfile platforms easier to maintain
  (ref: activeadmin/activeadmin#8344)
- Update bundles by using the minimum supported ruby version
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
0