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

Merge branch upstream/main into wasm32-wasi-test #55

Merged
merged 50 commits into from
Jun 27, 2024

Conversation

kkebo
Copy link
Owner

@kkebo kkebo commented Jun 26, 2024

No description provided.

adammcarter and others added 30 commits March 29, 2024 15:12
Added a new Identifier type which contains a name property

This name property contains a sanitized version of the TokenSyntax's
text property which for now only consists of trimming backticks
This acts as a convenience property to convert a TokenSyntax to an
Identifier
This isn't explicitly needed for this problem but it seems as though
the default for all types that can conform to Sendable/Hashable should

This also sets up this new type for Swift 6.0 (and the current Swift 5.10)
to pass this type around safely when needed

As well as allows Identifier to be a key in a dictionary which could be
a common scenario
When trying to create an Identifier from a non-identifier token, the
initializer should fail, returning nil

Additionally the identifier property of the TokenSyntax should also return nil
…ate-backtick-tokens

Add Identifier wrapper that strips backticks from token text
We are cherry-picking this change to `release/6.0` in swiftlang#2666.
…e-notes

Move the `TokenSyntax.identifier` release notes to 600.md
[SwiftParser] Handle extraneous case keyword after comma in switch case.
We used C atomics but these were allocated as Swift variables. Even thought they were atomic, concurrent accesses to them could violate Swift’s exclusivity laws, raising thread sanitizer errors.

Allocate the C atomic using malloc to fix this problem.
Remove resultDependsOn/resultDependsOnSelf
Exclude `.index-build` folder generated by SourceKit-LSP’s background indexing
We treated enum case parameters the same way as function parameters and weren’t considering that they can be unlabeled. That caused us to insert eg. `_ ` in front of the case’s type, producing `case myCase(_ String)`, which is invalid. Report `enumCaseParameters` as a special parameter kind so that sourcekitd can work with it.

swiftlang/sourcekit-lsp#1228
j-f1 and others added 20 commits June 12, 2024 08:31
…tion-converter

Make SourceLocationConverter Sendable
Fix renaming enum case parameters with unnamed associated arguments
The compiler may send the same syntax to the plugins multiple times.
For example, 'memberAttribute' macro request contains parent nominal
decl syntax, and the compiler sends a request for each members. Parsing
it multiple times is a waste.

rdar://129624305
Avoid 'import WinSDK' in swift sources or `#include` in headers.
This is to avoid linking with Swift overlay library (swiftWinSDK.dll)
so swift-frontend with plugins won't depends on it.
…egistry

[Macros] Cache parsed syntax tree in compiler plugins
[Windows] Avoid linking with swiftWinSDK.dll
Co-authored-by: Alex Hoppen <alex@alexhoppen.de>
Each target name is prefixed with SWIFTSYNTAX_TARGET_NAMESPACE

Also, add SWIFTSYNTAX_EMIT_MODULE setting; 'true' for building
library-evolution enabled modules with .swiftinterface, 'false' for
building fragile modules, undefined is 'true'
Having the trimmed node be attached to a parent was not intuitive because eg. printing the parent node would have the trimmed trivia missing, most likely forming invalid Swift code.
Update Contributing Docs - Encourage PRs Even When Stuck
[CMake] Add option to set the target namespace
…exicalContext`

Now that we have, we can change the default implementation of `MacroExpansionContext.lexicalContext` to return an empty array and be deprecated, making not implementing `lexicalContext` a compile-time warning instead of a runtime error.

rdar://123410459
deleting this file in favor of the org wide coc in the .github repo. having this file in place means that this repo opts out of those org wide benefits.
…ext-default-implementation

Properly deprecate default implementation of `MacroExpansionContext.lexicalContext`
@kkebo kkebo self-assigned this Jun 26, 2024
@kkebo kkebo merged commit 4e68624 into wasm32-wasi-test Jun 27, 2024
1 check passed
@kkebo kkebo deleted the merge-upstream-main branch June 27, 2024 07:38
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.

10 participants