Skip to content

Update documentation to explain misconfigurations of SWT_ conditions. #772

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Oct 18, 2024

This PR was supposed to be part of #769, but I must have blown away a local commit because it didn't make it into that PR.

This PR updates Porting.md to explain when a developer might encounter an error due to mismatched SWT_ conditions. It ensures that exit tests require process spawning to be enabled/implemented by adding a dependency between SWT_NO_PROCESS_SPAWNING and SWT_NO_EXIT_TESTS.

This PR also tweaks which bits of ExitTest are exposed on platforms that do not support exit tests at all. The type needs to be exposed so that ExitTest.Result is exposed so that we can correctly expose #expect(exitsWith:) and #require(exitsWith:) while marking them unavailable, as opposed to hiding the macros and not giving a developer clear diagnostics.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

This PR was supposed to be part of #769, but I must have blown away a local
commit because it didn't make it into that PR.

This PR updates Porting.md to explain when a developer might encounter an error
due to mismatched `SWT_` conditions. It ensures that exit tests require process
spawning to be enabled/implemented by adding a dependency between
`SWT_NO_PROCESS_SPAWNING` and `SWT_NO_EXIT_TESTS`.

This PR also tweaks which bits of `ExitTest` are exposed on platforms that do
not support exit tests at all. The type needs to be exposed so that
`ExitTest.Result` is exposed so that we can correctly expose
`#expect(exitsWith:)` and `#require(exitsWith:)` while marking them unavailable,
as opposed to hiding the macros and not giving a developer clear diagnostics.
@grynspan grynspan added bug 🪲 Something isn't working documentation 📚 Improvements or additions to documentation exit-tests ☠️ Work related to exit tests labels Oct 18, 2024
@grynspan grynspan added this to the Swift 6.1 milestone Oct 18, 2024
@grynspan grynspan self-assigned this Oct 18, 2024
@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test Linux

@grynspan grynspan merged commit 404f121 into main Oct 18, 2024
3 checks passed
@grynspan grynspan deleted the jgrynspan/SWT_NO_PROCESS_SPAWNING-missing-docs-update branch October 18, 2024 21:08
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug 🪲 Something isn't working documentation 📚 Improvements or additions to documentation exit-tests ☠️ Work related to exit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants