8000 [5.1]Import _CSwiftSyntax using @_implementationOnly. by akyrtzi · Pull Request #143 · swiftlang/swift-syntax · GitHub
[go: up one dir, main page]

Skip to content

[5.1]Import _CSwiftSyntax using @_implementationOnly. #143

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

Merged
merged 1 commit into from
Sep 23, 2019

Conversation

akyrtzi
Copy link
Contributor
@akyrtzi akyrtzi commented Sep 23, 2019

This lets us add an actual header for the C function it defines,
so that Swift can import it directly (while still retaining the
property that it is a standalone module) instead of relying on
the dlsym trick that fails on Linux unless additional flags are
passed to the linker for any binary that depends on SwiftSyntax
(see https://bugs.swift.org/browse/SR-11293).

master: #140

This lets us add an actual header for the C function it defines,
so that Swift can import it directly (while still retaining the
property that it is a standalone module) instead of relying on
the dlsym trick that fails on Linux unless additional flags are
passed to the linker for any binary that depends on SwiftSyntax
(see https://bugs.swift.org/browse/SR-11293).
@akyrtzi
Copy link
Contributor Author
akyrtzi commented Sep 23, 2019

@swift-ci Please test

@akyrtzi akyrtzi merged commit eb43915 into swiftlang:swift-5.1-branch Sep 23, 2019
@akyrtzi akyrtzi deleted the 5.1-fix-atomic-counter branch September 23, 2019 18:10
adevress pushed a commit to adevress/swift-syntax that referenced this pull request Jan 14, 2024
Ignore discretionary newlines in a number of new locations.
adevress pushed a commit to adevress/swift-syntax that referenced this pull request Jan 14, 2024
Several breaks were changed to disallow discretionary newlines in swiftlang#143. In practice, some of these breaks actually require a more nuanced approach because grouping around the content after the `:` is frequently subjective. Depending on the length of the label/key before the `:` and the actual expr or type, it varies whether a group should be around the content after the `:`. The formatter's current model doesn't support modifying the tokens to add/remove group tokens once the token stream is created.

In a future patch, it would be nice to have a way to switch between grouping and not grouping the content after the `:` based on the preceding key or label.

Reverted `ignoresDiscretionary` breaks include after the colon in...
- a dictionary type
- a dictionary element
- a function call argument
- a function decl parameter
- a generic parameter
- a tuple type
- a tuple expr element
adevress pushed a commit to adevress/swift-syntax that referenced this pull request Jan 14, 2024
…ignores_discretionary

Restore some discretionary newlines from PR swiftlang#143
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.

2 participants
0