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

Fix frozen string literal issue for ruby 3.4 #27

Merged
merged 1 commit into from
Aug 2, 2024
Merged

Conversation

chaadow
Copy link
Contributor

@chaadow chaadow commented Jun 15, 2024

@geemus Related to fog/fog-aws#711

The gem is tiny in size, so I was able to detect other frozen literal issues.

Went ahead and added a missing spec file ( didn't add full coverage of all the remaining classes, but it's better than nothing)

And I was able to test all cases where frozen string errors might arise.

lib/fog/to_hash_document.rb Outdated Show resolved Hide resolved
lib/fog/to_hash_document.rb Outdated Show resolved Hide resolved
lib/fog/to_hash_document.rb Outdated Show resolved Hide resolved
lib/fog/to_hash_document.rb Outdated Show resolved Hide resolved
lib/fog/xml/response.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
@chaadow chaadow force-pushed the patch-1 branch 5 times, most recently from 190c510 to 2509954 Compare June 16, 2024 11:52
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
spec/fog/to_hash_document_spec.rb Outdated Show resolved Hide resolved
Copy link
Contributor Author

@chaadow chaadow left a comment

Choose a reason for hiding this comment

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

I fixed all HoundCI violations except for 3 Metrics/BlockLength which I cant do anything about since it's a spec file

@chaadow
Copy link
Contributor Author

chaadow commented Jun 16, 2024

Also the CI should be enabled here I'll repush when it's done

@@ -12,5 +12,21 @@ permissions:
contents: read

jobs:
Shared:
uses: fog/.github/.github/workflows/[email protected]
Copy link
Member

Choose a reason for hiding this comment

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

We'll want to drop this and use the shared one again I think once we are satisfied (though perhaps we'll want to update the shared one with RUBYOPTS in some way also).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@geemus I just had the idea, but I can create a shared config on fog/.github for fog-aws fog-xml and fog-core.

and once all gems have migrated to this new shared config. we can completely remove the old config.

If you agree with this, please let me know and I'll go ahead and create a PR on fog/.github 👌

Copy link
Member

Choose a reason for hiding this comment

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

We'll have to figure out some specifics, but yeah that sounds fine to me.

Copy link
Member

Choose a reason for hiding this comment

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

Also or instead, we could leave this for now, but also add the shared workflow back (so that it just runs both). I didn't want to lose the shared workflow. Both is probably redundant, but it would be ok as an interim step.

Copy link
Member

@geemus geemus left a comment

Choose a reason for hiding this comment

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

Looks good overall, would just like a bit of help understanding part of the to_hash_document changes. Thanks!

@chaadow
Copy link
Contributor Author

chaadow commented Aug 1, 2024

Hi @geemus just like in the other PR, I believe you need to enable CI, thanks!

@geemus
Copy link
Member

geemus commented Aug 1, 2024

Hmm. It looks like it should be enabled, but it's not picking this up. I'm going to try closing and reopening and see if that kicks it off.

@geemus geemus closed this Aug 1, 2024
@geemus geemus reopened this Aug 1, 2024
@geemus
Copy link
Member

geemus commented Aug 1, 2024

I think the error should be fixed if/when I release fog-core (since it will solve the base64 dependency issue). I'll try to do that tomorrow probably. Will also look at the other warnings and see what can be done (one will be me figuring out logging + excon, and I need to try and figure out what's up with the circular require, my brain isn't wanting to parse it just now). So I'll try to circle back soon.

@geemus
Copy link
Member

geemus commented Aug 2, 2024

Ok, I released v2.5.0 of fog-core which had the other 3.4+ fixes and reran the tests here, which now also pass as I suspected. I think there might be some warnings remaining, but we can circle back to those later.

@geemus geemus merged commit 66c1452 into fog:master Aug 2, 2024
6 checks passed
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