Commit Graph

6329 Commits

Author SHA1 Message Date
swift-ci
8158d75fe4 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-10 17:35:42 -07:00
Holly Borla
5da7ac6cbd [NFC] Use DeclAttributes::isDeprecated in a few more places. 2024-06-10 07:16:44 -07:00
swift-ci
aed40bd421 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-05 19:34:38 -07:00
artemcm
d70863501e [Dependency Scanning] Collect and report each module dependency's Link Libraries 2024-06-05 10:59:41 -07:00
swift-ci
e54e333862 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-22 14:15:04 -07:00
Steven Wu
47598bbe8f [ScanDependency] Respect working directory set inside invocation
Teach scanner to respect the working directory set in the invocation
through scanner C API.

Also add test infrastructure to testing scanner from C API. Break up
DependencyScan lib into two so the swift-scan-test and remain small
without understanding swift AST.

rdar://127626011
2024-05-22 11:04:45 -07:00
swift-ci
eebdc55a53 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-21 21:34:24 -07:00
artemcm
9aeadd0507 [Dependency Scanning] Specify Source Locations For Missing Module Dependencies
This change modifies the dependency scanner to keep track of source locations of each encountered 'import' statement, in order to be able to emit diagnostics with source locations if an import failed to resolve.

- Keep track of each 'import' statement's source buffer, line number, and column number when adding it. The dependency scanner utilizes separate compilation instances, and therefore separate Source Managers for scanning `import` statements of user sources and textual interfaces of Swift dependencies. Since import resolution may happen in the main scanner compilation instance while the `import` itself was found by an interface-scanning sub-instance, we cannot simply hold on to the import's `SourceLoc`.
- Add libSwiftScan API for diagnostics to carry above source locations to clients.
2024-05-21 13:12:09 -07:00
swift-ci
ac43224e86 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-20 13:24:24 -07:00
Rintaro Ishizaki
f62ff9b3ed Merge pull request #73628 from rintaro/completion-async-not-async-rdar126737530
[CodeCompletion] Remove warning for 'async in non-concurrency context'
2024-05-20 13:11:41 -07:00
swift-ci
55466ea15e Merge remote-tracking branch 'origin/main' into rebranch 2024-05-17 12:15:58 -07:00
Rintaro Ishizaki
65b0b383a9 Merge pull request #73517 from rintaro/macros-library-provider-2
[Macros] Use 'LibraryPluginProvider' in swift-plugin-server
2024-05-17 12:11:10 -07:00
Rintaro Ishizaki
39d633f5a8 [CodeCompletion] Remove unused 'isAsync' flag from CodeCompletionResult 2024-05-15 13:43:19 -07:00
swift-ci
a4382fb7f6 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-08 16:54:29 -07:00
Cassie Jones
f478b79af9 swift-inspect: Explicitly reference String.init(cString:)
This was briefly failing to build because of an ambiguous initializer
while making other changes, it's better to be explicit with method names
anyway.

rdar://127548384
2024-05-07 14:06:36 -07:00
Rintaro Ishizaki
be419a3428 [Macros] Use 'LibraryPluginProvider' in swift-plugin-server
Move 'PluginProvider' logic to 'SwiftLibraryPluginProvider' module
so the compiler can reuse that logic for the actual in-process plugins.
2024-05-07 09:47:04 -07:00
swift-ci
ebc680775f Merge remote-tracking branch 'origin/main' into rebranch 2024-05-06 16:34:41 -07:00
Rintaro Ishizaki
9a38072856 Revert "[Macros] Use 'LibraryPluginProvider' in swift-plugin-server" 2024-05-06 15:57:32 -07:00
swift-ci
c2e6e9f6e7 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-06 09:14:45 -07:00
Rintaro Ishizaki
eb9224f260 Merge pull request #69236 from rintaro/macros-library-provider
[Macros] Use 'LibraryPluginProvider' in swift-plugin-server
2024-05-06 08:56:10 -07:00
swift-ci
caf307833c Merge remote-tracking branch 'origin/main' into rebranch 2024-05-04 01:34:28 -07:00
Alastair Houghton
6afdcd311f Merge pull request #72061 from al45tair/eng/PR-123504095
[Linux][Runtime][IRGen] Mark metadata sections as retained and support section GC.
2024-05-04 09:23:06 +01:00
swift-ci
f28f34bb81 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-03 10:15:11 -07:00
Rintaro Ishizaki
6264792d19 [SourceKit] Don't use SourceEntitityWalker for placeholder expansion
Placeholder expansion should be a syntactic operation, but
`SourceEntityWalker` can invoke type checking operations, which causes
unexpected bahaviors including crashes.

rdar://121360941`
2024-05-02 11:52:13 -07:00
swift-ci
7b5298cd01 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-02 03:15:34 -07:00
Hamish Knight
9f7262e3d7 Merge pull request #73361 from hamishknight/uncache
[SourceKit] Remove cached AST by default on close
2024-05-02 11:14:53 +01:00
swift-ci
c8d364261c Merge remote-tracking branch 'origin/main' into rebranch 2024-05-01 16:55:47 -07:00
Slava Pestov
fda93680df Merge pull request #73363 from slavapestov/pack-expansion-closures-part-2
Extract common code for building opened existential and element signatures
2024-05-01 19:44:05 -04:00
Rintaro Ishizaki
26dbe2f8a1 [Macros] Use 'LibraryPluginProvider' in swift-plugin-server
Move 'PluginProvider' logic to 'SwiftLibraryPluginProvider' module
so the compiler can reuse that logic for the actual in-process plugins.
2024-05-01 16:41:14 -07:00
Slava Pestov
3b2a6d8c1a SourceKit: Use getNextDepth()/getMaxDepth() 2024-05-01 12:09:01 -04:00
Hamish Knight
e710b50255 [SourceKit] Remove cached AST by default on close
This isn't actually used for anything currently,
future requests will always have mismatching
stamps. As such, remove for now.

rdar://127353509
2024-05-01 12:24:13 +01:00
swift-ci
22d81cbbd2 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-01 04:14:10 -07:00
Hamish Knight
7da91bdf79 Merge pull request #73323 from hamishknight/cancel-on-close
[SourceKit] Cancel in-flight builds on `editor.close`
2024-05-01 12:07:34 +01:00
Hamish Knight
de9806e2fa [SourceKit] Introduce key for cancelling on close
Defaults to `true`.
2024-04-30 21:13:20 +01:00
swift-ci
3114640ebc Merge remote-tracking branch 'origin/main' into rebranch 2024-04-30 12:55:53 -07:00
Dave Lee
c3488c60e1 Demangler: Add option to omit closure signatures (#73331)
Add a new demangler option which excludes a closure's type signature.

This will be used in lldb.

Closures are not subject to overloading, and so the signature will never be used to 
disambiguate. A demangled closure is uniquely identifiable by its index(s) and parent.

Where opaque types are involved, the concrete type signature can be quite complex. This 
demangling option allows callers to avoid printing the underlying complex nested 
concrete types.

Example:

before: `closure #1 (Swift.Int) -> () in closure #1 (Swift.Int) -> () in main`
after: `closure #1 in closure #1 in main`
2024-04-30 12:48:02 -07:00
Hamish Knight
69f2e26d35 [SourceKit] Cancel in-flight builds on editor.close
When closing a document, cancel any in-flight
builds happening for it.

rdar://127126348
2024-04-30 12:00:27 +01:00
Hamish Knight
572fc4eae0 [SourceKit] Ensure ASTCache is guarded by mutex
There were a couple of accesses not guarded by
`CacheMtx`, introduce a couple of methods that
guard them, renaming `getASTProducer` while here.

Also make sure we don't ever insert a producer
after it has been purposefully removed by e.g a
close that removes the cached AST.
2024-04-30 12:00:27 +01:00
swift-ci
c283c8f833 Merge remote-tracking branch 'origin/main' into rebranch 2024-04-30 00:15:17 -07:00
eeckstein
74ed041119 Merge pull request #73247 from eeckstein/windows-enable-swift
Enable SwiftCompilerSources on Windows
2024-04-30 09:04:55 +02:00
swift-ci
c9ff828f07 Merge remote-tracking branch 'origin/main' into rebranch 2024-04-29 09:15:24 -07:00
Rintaro Ishizaki
f7c9966420 Merge pull request #72999 from rintaro/macros-pluginjson
[Macros] Use SwiftCompilerPluginMessageHandling JSON encoder/decoder
2024-04-29 08:57:57 -07:00
swift-ci
8743aa2219 Merge remote-tracking branch 'origin/main' into rebranch 2024-04-29 07:54:44 -07:00
Eric Miotto
8c3aba3ced Merge pull request #73303 from edymtt/edymtt/amend-search-path-for-swift-content-from-darwin-toolchain
CMake: amend search path for Swift content from Darwin toolchain
2024-04-29 07:44:13 -07:00
Alastair Houghton
7698836ecc [Test][SourceKit] Use the *builder*'s swiftrt.o when in hosttools.
We were linking with the newly built `swiftrt.o` when in hosttools mode,
which is wrong because the newly built `swiftrt.o` does not match the
compiler we were using for the `SwiftCompilerSources`.

This manifests as a failure in

  `SwiftCompilerSources/Sources/Optimizer/Utilities/Verifier.swift`

because `self is ForwardingInstruction` fails as we can't find the
protocol conformance records.

rdar://123504095
2024-04-29 10:48:23 +01:00
eeckstein
e9d6ba9154 cmake: enable SwiftCompilerSources on Windows 2024-04-29 10:52:24 +02:00
swift-ci
8aa2d1125e Merge remote-tracking branch 'origin/main' into rebranch 2024-04-26 16:34:24 -07:00
Steven Wu
6c5ab241c8 Merge pull request #73265 from cachemeifyoucan/eng/PR-127062609
[Caching] Add fast swift instance setup for cache replay
2024-04-26 16:32:11 -07:00
Eric Miotto
291065d3b1 CMake: amend search path for Swift content from Darwin toolchain
Additional testing showed that the path I initially choose does not work
in all scenarios.

Expands on #73255
Still addresses rdar://127014753
2024-04-26 15:12:24 -07:00
swift-ci
9437f51fce Merge remote-tracking branch 'origin/main' into rebranch 2024-04-26 07:54:41 -07:00