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

Update available to fix build for non-macOS Apple platforms #1746

Merged

Conversation

simonjbeaumont
Copy link
Collaborator

Motivation

The package currently doesn't build for non-macOS Apple platforms, e.g. iOS, because of missing @available annotations, mostly in tests.

Modifications

  • Add missing @available annotations.
  • Use #if os(macOS) || os(Linux) in test utils that require Foundation.Process. Ideally we'd use #if canImport(Foundation.Process), but the version of swift-format used by this project doesn't understand it.

Result

Code and tests can build for, and run on, other platforms, e.g. iOS.

@simonjbeaumont simonjbeaumont force-pushed the sb/add-missing-availabilty-guards branch from 54af59a to 32024f7 Compare December 19, 2023 07:30
Copy link
Collaborator

@glbrntt glbrntt 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 modulo one duplicated availability guard, thanks Si!

@glbrntt glbrntt added the semver/none No version bump required. label Dec 19, 2023
@simonjbeaumont simonjbeaumont enabled auto-merge (squash) December 19, 2023 08:48
@simonjbeaumont simonjbeaumont merged commit 4bd354e into grpc:main Dec 19, 2023
12 of 13 checks passed
glbrntt pushed a commit to glbrntt/grpc-swift that referenced this pull request Feb 5, 2024
## Motivation

The package currently doesn't build for non-macOS Apple platforms, e.g. iOS, because of missing `@available` annotations, mostly in tests.

## Modifications

- Add missing `@available` annotations.
- Use `#if os(macOS) || os(Linux)` in test utils that require `Foundation.Process`. Ideally we'd use `#if canImport(Foundation.Process)`, but the version of `swift-format` used by this project doesn't understand it.

## Result

Code and tests can build for, and run on, other platforms, e.g. iOS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants