CocoaPods / cocoapods-downloader

A small library that provides downloaders for various source types (HTTP/SVN/Git/Mercurial)
MIT License
84 stars 71 forks source link

Fix "can't modify frozen string" errors when pods are integrated using the `branch` option (#10920) #119

Closed Buju77 closed 3 years ago

Buju77 commented 3 years ago

this PR fixes https://github.com/CocoaPods/CocoaPods/issues/10920

dnkoutso commented 3 years ago

Follow up to https://github.com/CocoaPods/cocoapods-downloader/pull/116 (for posterity).

@Buju77 can you also try this fix instead?

encoded_branch_name = branch_name.dup.force_encoding(Encoding::ASCII_8BIT)

?

dnkoutso commented 3 years ago

Also lets point to 1-5-stable branch since we will do a quick 1.5.1 release for this fix.

dnkoutso commented 3 years ago

I think this fix will suffice.

dnkoutso commented 3 years ago

@Buju77 lets make sure we point to 1-5-stable branch and rebase this PR before we merge it.

Buju77 commented 3 years ago

Follow up to #116 (for posterity).

@Buju77 can you also try this fix instead?

encoded_branch_name = branch_name.dup.force_encoding(Encoding::ASCII_8BIT)

yes, this works as well.

But I thought that branch_name.encode() would already return a copy and doesn't modify branch_name itself?

Buju77 commented 3 years ago

@Buju77 lets make sure we point to 1-5-stable branch and rebase this PR before we merge it.

ok, I've now rebased on top of 1-5-stable

dnkoutso commented 3 years ago

@Buju77 I think you are right and we can fix it your way

dnkoutso commented 3 years ago

oh well we can land this now! :D

dnkoutso commented 3 years ago

I will ship 1.5.1 of cocoapods-downloader

dnkoutso commented 3 years ago

@Buju77 shipped! https://github.com/CocoaPods/cocoapods-downloader/releases/1.5.1

Buju77 commented 3 years ago

@dnkoutso thank you very much! 👍