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

Add Windows Support #1088

Merged
merged 6 commits into from
Sep 27, 2023
Merged

Conversation

brianmichel
Copy link
Contributor

Adds support for compiling and using Nimble when using Swift on Windows.

This PR is a mostly mechanical change except the bits around the RunLoop that I had to work around since CoreFoundation does not exist on Windows. Unfortunately, the only way to get all of the polling stuff running was to use the SPI _stop() on the RunLoop implementation which specifically exists for XCTest it seems. I've filed an issue here apple/swift-corelibs-foundation#4826 to better understand the trajectory for that function since there is no alternative to stopping a runloop otherwise.

All tests should pass except the throwAssertion tests since I was unsure if they could be adjusted to function correctly on Windows.

No function signatures have been modified as part of this PR as my goal is to use it in downstream libraries that we're trying to get running on Windows (LaunchDarkly).

I've also added a new CI job and pinned the Windows swift version to the 5.9 toolchain.

Copy link
Member

@younata younata left a comment

Choose a reason for hiding this comment

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

This looks good overall.

My concern with accepting this is I don't have a windows machine to be able to locally verify I don't break anything, forcing me to rely on CI to double-check things.

This work is valuable, so I don't want to throw it away, but I'm noting that the risk of bitrot with this is high.

@brianmichel
Copy link
Contributor Author

This looks good overall.

My concern with accepting this is I don't have a windows machine to be able to locally verify I don't break anything, forcing me to rely on CI to double-check things.

This work is valuable, so I don't want to throw it away, but I'm noting that the risk of bitrot with this is high.

Yeah, this is certainly a concern. There are ways around not having a machine (like sshing into a runner to debug) but I'm happy to help as needed to see what assistance I can provide.

I imagine this might be a common concern from maintainers so I totally understand.

@younata
Copy link
Member

younata commented Sep 27, 2023

There are ways around not having a machine (like sshing into a runner to debug) but I'm happy to help as needed to see what assistance I can provide.

I'll be sure to keep that in mind! Thanks for this!

@younata younata merged commit 67aca90 into Quick:main Sep 27, 2023
14 checks passed
cgrindel-self-hosted-renovate bot added a commit to cgrindel/rules_swift_package_manager that referenced this pull request Oct 12, 2023
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [Quick/Nimble](https://togithub.com/Quick/Nimble) | major | `from:
"12.3.0"` -> `from: "13.0.0"` |

---

### Release Notes

<details>
<summary>Quick/Nimble (Quick/Nimble)</summary>

### [`v13.0.0`](https://togithub.com/Quick/Nimble/releases/tag/v13.0.0)

[Compare
Source](https://togithub.com/Quick/Nimble/compare/v12.3.0...v13.0.0)

### Highlights

#### New Features

- Nimble now supports Windows! (Thanks
[@&#8203;brianmichel](https://togithub.com/brianmichel)!)
- the `Predicate` series of APIs has been renamed to `Matcher`. There
are typealiases for the older APIs to better enable migrations. These
typealiases will be marked as removed in the next major version of
Nimble (Nimble 14), and they will be removed entirely in Nimble 15.
-   Nimble now supports the DriverKit platform.

#### Breaking Changes

-   The `Predicate` series of APIs have been renamed.
- The `AsyncDefaults` struct is now marked as removed. It will be fully
removed in the next major version of Nimble.
- The platform-independent targets in `Nimble.xcodeproj` have now been
consolidated into a single Nimble (and NimbleTests) target.

#### Other Notes

- No changes since [Nimble 13 RC
1](https://togithub.com/Quick/Nimble/releases/tag/v13.0.0-rc.1).

### Automated Release Notes

#### What's Changed

- Update release script for a more modern-ish release process by
[@&#8203;younata](https://togithub.com/younata) in
[Quick/Nimble#1086
- Bump cocoapods from 1.12.1 to 1.13.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[Quick/Nimble#1089
- Add Windows Support by
[@&#8203;brianmichel](https://togithub.com/brianmichel) in
[Quick/Nimble#1088
- Rename Predicate to Matcher by
[@&#8203;younata](https://togithub.com/younata) in
[Quick/Nimble#1090
- Mark the AsyncDefaults struct as removed. by
[@&#8203;younata](https://togithub.com/younata) in
[Quick/Nimble#1092
- Consolidate xcodeproj targets (... again). by
[@&#8203;younata](https://togithub.com/younata) in
[Quick/Nimble#1093
- Bump actions/checkout from 3 to 4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[Quick/Nimble#1091

#### New Contributors

- [@&#8203;brianmichel](https://togithub.com/brianmichel) made their
first contribution in
[Quick/Nimble#1088

**Full Changelog**:
Quick/Nimble@v12.3.0...v13.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDAuMCIsInVwZGF0ZWRJblZlciI6IjM2LjEwMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: Self-hosted Renovate Bot <361546+cgrindel-self-hosted-renovate[bot]@users.noreply.github.enterprise.com>
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.

None yet

2 participants