-
Notifications
You must be signed in to change notification settings - Fork 9
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
Enable frozen_strings_literal
#626
Conversation
Generated by 🚫 Danger |
26f8f34
to
bceed35
Compare
@@ -30,13 +30,6 @@ Style/EmptyMethod: | |||
Style/TrailingCommaInArrayLiteral: | |||
EnforcedStyleForMultiline: consistent_comma | |||
|
|||
# Enabling the 'frozen_string_literal: true' comment is nice but should be done with extra care | |||
# because enabling it on code that accidentally mutates string literals will crash at runtime | |||
# (e.g. `name = 'Hello'` then later `name << ' world'` will crash if the comment is enabled) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's hope we don't have many of such cases -- I think the more recent actions are probably fine. I guess the concern is more on the older ones, without much testing.
And I think we're all aware that issues caused by this kind of change (or any change in Fastlane related tooling, really) would be caught only during an app release -- I always wonder if we could come up with a way to mitigate this problem or just accept that as inevitable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... I think this is a situation where it's more about how we react to issues than how we prevent them. Because to fully prevent them we would have to run a copy of each of our app's release scenario, which would take a long time. I'd like to think we can nimbly fix issues that might arise at release time and that it would be a more effective use of our time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran the updated codebase through Claude (which gave its ok) and checked a few things myself just in case.
What does it do?
Closes #625
Because most of the changes were done by
bundle exec rubocop -A
I addressed the test failures resulting to the code switching to immutable strings in dedicated commits. I hope it makes it easier to review.Checklist before requesting a review
bundle exec rubocop
to test for code style violations and recommendationsspecs/*_spec.rb
) if applicablebundle exec rspec
to run the whole test suite and ensure all your tests passCHANGELOG.md
file to describe your changes under the appropriate existing###
subsection of the existing## Trunk
section.MIGRATION.md
file to describe how the changes will affect the migration from the previous major version and what the clients will need to change and consider. — N.A.