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 MRProgressView compiling issue #21235

Merged
merged 3 commits into from
Aug 7, 2023
Merged

Fix MRProgressView compiling issue #21235

merged 3 commits into from
Aug 7, 2023

Conversation

crazytonyli
Copy link
Contributor

The library hasn't published an update in 7 years, I doubt there will be an update now to fix this compiling issue.

Regression Notes

  1. Potential unintended areas of impact
    None.

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    None.

  3. What automated tests I added (or what prevented me from doing so)
    None.

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

UI Changes testing checklist: N/A

@crazytonyli crazytonyli added this to the 23.0 milestone Aug 2, 2023
@crazytonyli crazytonyli requested a review from mokagio August 2, 2023 23:37
@crazytonyli crazytonyli self-assigned this Aug 2, 2023
Podfile Outdated
# We are going to replace the `id` with `MRProgressView *` (or any other type that has a method `setProgress:` that takes a float argument).
mrprogress_filepath = "#{project_root}/Pods/MRProgress/src/Components/MRProgressOverlayView.m"
File.chmod(0o644, mrprogress_filepath)
lines = IO.readlines(mrprogress_filepath)
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 File.readlines is safer than IO.readlines.

Podfile Outdated
lines = IO.readlines(mrprogress_filepath)
if lines[810] == " [((id)self.modeView) setProgress:self.progress];\n"
lines[810] = " [((MRProgressView *)self.modeView) setProgress:self.progress];\n"
IO.write(mrprogress_filepath, lines.join)
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 File.write is safer than IO.write.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Aug 3, 2023

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr21235-a3a43be
Version22.9
Bundle IDcom.jetpack.alpha
Commita3a43be
App Center Buildjetpack-installable-builds #5659
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

if lines[810] == " [((id)self.modeView) setProgress:self.progress];\n"
lines[810] = " [((MRProgressView *)self.modeView) setProgress:self.progress];\n"
File.write(mrprogress_filepath, lines.join)
end
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a nifty way of patching the issue 🤓

Have you considered forking the repo? Might set us up for addressing future issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That didn't cross my mind. 🥲

But I did think about removing this library, because it's only used in one single place: showing an activity indicator during uploading a featured image to a post's settings. I got lazy and decided to make this one line change instead. 😸

Copy link
Contributor

Choose a reason for hiding this comment

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

😄

I came here to write the same thing. I found that same as you did (sigh of relief).

If we go in with the intention of removing this library, then I'd say it's okay to merge this approach. I wonder if we could get the help of some iOS UI dev 🤓

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Aug 3, 2023

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr21235-a3a43be
Version22.9
Bundle IDorg.wordpress.alpha
Commita3a43be
App Center BuildWPiOS - One-Offs #6624
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

if lines[810] == " [((id)self.modeView) setProgress:self.progress];\n"
lines[810] = " [((MRProgressView *)self.modeView) setProgress:self.progress];\n"
File.write(mrprogress_filepath, lines.join)
end
Copy link
Contributor

Choose a reason for hiding this comment

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

😄

I came here to write the same thing. I found that same as you did (sigh of relief).

If we go in with the intention of removing this library, then I'd say it's okay to merge this approach. I wonder if we could get the help of some iOS UI dev 🤓

mokagio and others added 3 commits August 7, 2023 11:16
The library hasn't published an update in 7 years, I doubt there will be
an update now to fix this compiling issue.
@mokagio mokagio force-pushed the tonyli-xcode-15-fixes branch from f8ca022 to a3a43be Compare August 7, 2023 01:17
@peril-wordpress-mobile
Copy link

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 4 days Please, make sure to get it merged by then or assign it to a later expiring milestone

Generated by 🚫 dangerJS

@mokagio mokagio enabled auto-merge August 7, 2023 01:18
@mokagio mokagio merged commit 084caa6 into trunk Aug 7, 2023
@mokagio mokagio deleted the tonyli-xcode-15-fixes branch August 7, 2023 01:57
@crazytonyli crazytonyli mentioned this pull request Aug 28, 2023
13 tasks
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