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 --platform case sensitivity with test and build commands #6268

Merged
merged 1 commit into from May 21, 2024

Conversation

waltflanagan
Copy link
Member

@waltflanagan waltflanagan commented May 9, 2024

Changed based on user feedback that --platform iOS doesn't work. It should. So lets lowercase our input and provide better messaging if we get an invalid value.

How to test the changes locally 🧐

Run tuist build with various values for --platform

Contributor checklist ✅

  • The code has been linted using run mise run lint:fix
  • The change is tested via unit testing or acceptance testing, or both
  • The title of the PR is formulated in a way that is usable as a changelog entry
  • In case the PR introduces changes that affect users, the documentation has been updated

Reviewer checklist ✅

  • The code architecture and patterns are consistent with the rest of the codebase
  • Reviewer has checked that, if needed, the PR includes the label changelog:added, changelog:fixed, or changelog:changed, and the title is usable as a changelog entry

@waltflanagan waltflanagan force-pushed the FlexiblyPlatformSepcification branch from 752df47 to 873683a Compare May 9, 2024 15:54
@waltflanagan waltflanagan marked this pull request as ready for review May 9, 2024 15:55
@waltflanagan waltflanagan enabled auto-merge (squash) May 9, 2024 17:30
Comment on lines +38 to +45
do {
let _ = try Platform.from(commandLineValue: "not_a_platform")
XCTFail("Expected erro to be thrown")
} catch let error as UnsupportedPlatformError {
XCTAssertEqual(error, UnsupportedPlatformError(input: "not_a_platform"))
} catch {
XCTFail("Unexpected error thrown")
}
Copy link
Member

Choose a reason for hiding this comment

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

You can use XCTAssertThrowsSpecific that does the try-catch dance for you

@fortmarek fortmarek added the changelog:fixed PR will be listed in the Fixed section of CHANGELOG label May 10, 2024
@pepicrft pepicrft disabled auto-merge May 21, 2024 07:59
@pepicrft pepicrft merged commit de6dcba into main May 21, 2024
8 checks passed
@pepicrft pepicrft deleted the FlexiblyPlatformSepcification branch May 21, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:fixed PR will be listed in the Fixed section of CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants