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

Add Rails 7.1 support #2336

Merged
merged 5 commits into from
Oct 27, 2023
Merged

Add Rails 7.1 support #2336

merged 5 commits into from
Oct 27, 2023

Conversation

camertron
Copy link
Contributor

@camertron camertron commented Oct 26, 2023

What are you trying to accomplish?

This PR makes the changes necessary to support Rails 7.1.

Integration

No changes necessary in production.

List the issues that this change affects.

Fixes #2318

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.
  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.
  • High risk changes are those that could impact customers and SLOs, low or no test coverage, low observability, or slow to rollback.

What approach did you choose and why?

The only thing necessary to support Rails 7.1 is to remove an unnecessary require statement in the Rails engine. Rails 7.1 no longer adds eager load paths to Ruby's load path, preferring instead to let Zeitwerk autoload missing constants.

Accessibility

  • No new axe scan violation - This change does not introduce any new axe scan violations.

@changeset-bot
Copy link

changeset-bot bot commented Oct 26, 2023

🦋 Changeset detected

Latest commit: 6892d11

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/view-components Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@camertron camertron added skip changeset Pull requests that don't change the library output and removed skip changeset Pull requests that don't change the library output labels Oct 26, 2023
@camertron camertron temporarily deployed to preview October 26, 2023 22:21 — with GitHub Actions Inactive
@camertron camertron marked this pull request as ready for review October 26, 2023 22:30
@camertron camertron requested review from a team and jonrohan October 26, 2023 22:30
@safeforge
Copy link
Contributor

@camertron Removing the require "primer/form_helper" does not appear to be sufficient, but you have correctly identified the issue.

I'm experiencing issues with Form usage, and the error appears to be similar to the previous one: "cannot load such file -- primer/class_name_helper."

Indeed, by removing require "primer/class_name_helper" from the file lib/primer/forms/base_component.rb, the issue with my application appears to be resolved. I wonder if there are any other require causing errors.

@camertron
Copy link
Contributor Author

@safeforge interesting, thanks for the heads-up. Let me see if I can get our test suite to fail, that would really help catch these issues.

@camertron
Copy link
Contributor Author

Ok, I totally forgot to bump the framework defaults in the demo app's application.rb. Doing so uncovered several additional bad require statements that I have since removed.

@safeforge can you verify this addresses the issues you're seeing?

Copy link
Member

@jonrohan jonrohan left a comment

Choose a reason for hiding this comment

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

👍🏻

@camertron camertron merged commit 94db2c4 into main Oct 27, 2023
30 checks passed
@camertron camertron deleted the rails_7_1_support branch October 27, 2023 20:56
@camertron camertron temporarily deployed to preview October 27, 2023 20:56 — with GitHub Actions Inactive
@primer primer bot mentioned this pull request Oct 27, 2023
@safeforge
Copy link
Contributor

@safeforge can you verify this addresses the issues you're seeing?

@camertron, I can confirm that your fix has resolved the issue in my use case. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

primer/form_helper (LoadError) with the latest version of Rails. (7.1.1)
3 participants