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
[xcodes] fix issue where xcodes
action wouldn't accept beta versions of Xcode
#21434
[xcodes] fix issue where xcodes
action wouldn't accept beta versions of Xcode
#21434
Conversation
Hey, sorry for asking directly for some help and review about the issue #21369 With @snatchev @milch @ainame @joshdholtz maybe some PR feedback would be great. thx |
I see that the problem is that we added the |
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.
Thank you for your contribution! 🚀
def self.requirement(req) | ||
UI.user_error!("Version must be specified") if req.nil? || req.to_s.strip.size == 0 |
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.
The requirement
method was only used in this one place: the verify_block
in the xcodes
action, as far as I can tell. I think if we are to remove it, it would probably make sense to remove the whole thing and have it as an inline block in the action's ruby file, which matches other verify_block
methods. This one was probably pulled out because it was a bit longer and using a rescue block, but generally 1-2 line verification methods are inline.
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.
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.
Hmm, I see. So shouldn't xcversion
continue to use the old validation?
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 would rather let xcodes or xcversion let decide to throw an error, fastlane should only pre check for empty strings
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 think I agree with @apps4everyone, the underlying tools will error out if the user enter an invalid version. I think that checking just for string validity (empty/whitespaces) is what makes more sense here 👌
@rogerluan maybe you have 5 mins? What's missing or what I can do to get here more feedback? Thank you |
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.
Good catch @apps4everyone, thanks for fixing this 🙏
I was the author of the xcodes
action and I agree this is a better approach 🙌
This PR LGTM
def self.requirement(req) | ||
UI.user_error!("Version must be specified") if req.nil? || req.to_s.strip.size == 0 |
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 think I agree with @apps4everyone, the underlying tools will error out if the user enter an invalid version. I think that checking just for string validity (empty/whitespaces) is what makes more sense here 👌
xcodes
action wouldn't accept beta versions of Xcode
Thx for the review @rogerluan, is there any release planned the next days? Would like to test with Xcode 15 before the release next weeks. thx |
No planned release for the time being. You can still test it by modifying your Gemfile, e.g.: gem 'fastlane', git: 'https://github.com/fastlane/fastlane.git', branch: 'master' And running |
thx, will test with that |
work's with master 🎉 |
Checklist
Motivation and Context
Try to fix #21369 xcodes does not allow "15.0 Beta 5" as version.