Commit Graph

6605 Commits

Author SHA1 Message Date
Miguel Salinas
b075697869 fix bugs and address feedback 2021-09-24 15:40:12 -07:00
swift-ci
3b702bf6e4 Merge remote-tracking branch 'origin/main' into rebranch 2021-09-24 11:54:10 -07:00
Egor Zhdan
e1c4ea50c8 Merge pull request #37806 from egorzhdan/clang-executable-path-reapply
ClangImporter: run Clang with a proper executable path (pt 2)
2021-09-24 21:46:03 +03:00
swift-ci
a7839bb80f Merge remote-tracking branch 'origin/main' into rebranch 2021-09-23 14:14:43 -07:00
Artem Chikin
7d4619e8f7 Merge pull request #39397 from artemcm/IncludePCMArgsFromInitialScan
[Dependency Scanning] Include initial PCM arguments on Clang module dependency details
2021-09-23 14:08:53 -07:00
Alex Hoppen
7a80034e35 [SourceKit] Support cancellation of requests while an AST is being built
This commit refactors the way ASTs are being built in SourceKit and how `SwiftASTConsumer`s are served by the built ASTs. `SwiftASTManager.h` should give an overview of the new design.

This commit does not change the cancellation paradigm in SourceKit (yet). That is, subsequent requests with the same `OncePerASTToken` still cancel previous requests with the same token. But while previously, we were only able to cancel requests that haven’t started an AST build yet, we can now also cancel the AST build of the to-be-cancelled requests.

With this change in place, we can start looking into explicit cancellation of requests or other cancellation paradigms.
2021-09-23 11:53:45 +02:00
Rintaro Ishizaki
afc24dfd4b [CodeCompletion] Remove two completion options from LangOptions
"add inits to toplevel" and "call pattern heuristics" are only used in
code completion. Move them from LangOptions to CodeCompletionContext so
that they don't affect compiler arguments.
2021-09-22 16:49:50 -07:00
swift-ci
102e1cebc1 Merge remote-tracking branch 'origin/main' into rebranch 2021-09-22 15:53:25 -07:00
Rintaro Ishizaki
845b2f97da Merge pull request #39386 from rintaro/ide-completion-sourcefileinfo
[CodeCompletion] Revert "Provide known module source file information"
2021-09-22 15:48:36 -07:00
Artem Chikin
6176657285 [Dependency Scanning] Include initial PCM arguments on Clang module dependency details
Doing so will allow clients to know which Swift-specific PCM arguments are already captured from the scan that first discovered this module.
SwiftDriver, in particular, will be able to use this information to avoid re-scanning a given Clang module if the initial scan was sufficient for all possible sets of PCM arguments on Swift modules that depend on said Clang module.
2021-09-22 11:34:02 -07:00
Rintaro Ishizaki
1656eed597 Revert "[CodeCompletion] Provide known module source file information"
This effectively reverts commit f8751d466e.
2021-09-22 10:06:19 -07:00
swift-ci
f8df0dc8a2 Merge remote-tracking branch 'origin/main' into rebranch 2021-09-21 19:53:25 -07:00
Xi Ge
f97653ef37 Frontend: teach -emit-module and -merge-modules to emit ABI descriptor files 2021-09-21 16:51:52 -07:00
swift-ci
d12197f488 Merge remote-tracking branch 'origin/main' into rebranch 2021-09-21 08:33:46 -07:00
salinas-miguel
815b784988 fix typo 2021-09-20 11:40:00 -07:00
Artem Chikin
709676c20c [Dependency Scanning] Make GlobalModuleDependenciesCache aware of the current scanning action's target triple
And only resolve cached dependencies that came from scanning actions with the same target triple.

This change means that the `GlobalModuleDependenciesCache` must be configured with a specific target triple for every scannig action, and it will only resolve previously-found dependencies from previous scannig actions using the exact same triple.

Furthermore, the `GlobalModuleDependenciesCache` separately tracks source-file-based module dependencies as those represent main Swift modules of previous scanning actions, and we must be able to resolve those regardless of the target triple.

Resolves rdar://83105455
2021-09-20 11:21:16 -07:00
Miguel Salinas
6e8c59a959 only require C++17 for swift-stdlib-tool 2021-09-13 09:43:24 -07:00
swift-ci
9a871a9964 Merge remote-tracking branch 'origin/main' into rebranch 2021-09-13 01:33:52 -07:00
Argyrios Kyrtzidis
2ae2fee605 Merge pull request #39270 from akyrtzi/cmake-sourcekit-module-map-depend
[AddSwiftSourceKit.cmake] Add dependency to the module map file due to the custom pre-build command
2021-09-13 01:26:24 -07:00
swift-ci
37bd8b5131 Merge remote-tracking branch 'origin/main' into rebranch 2021-09-12 20:13:39 -07:00
Argyrios Kyrtzidis
c3b7f94911 [CMake/swift-syntax-parser-test] Use proper case for specifying support link component 2021-09-12 16:59:21 -07:00
Argyrios Kyrtzidis
fcad3802ea [AddSwiftSourceKit.cmake] Add dependency to the module map file due to the custom pre-build command 2021-09-12 16:53:58 -07:00
Miguel Salinas
f995005494 address feedback 2021-09-10 16:40:57 -07:00
swift-ci
59ef57cb03 Merge remote-tracking branch 'origin/main' into rebranch 2021-09-08 22:34:30 -07:00
salinas-miguel
2fdd5e6a3e Remove Foundation dependency 2021-09-08 16:19:26 -07:00
Erik Eckstein
61cc7a6e37 sil-opt: add an option "-serialize" for testing serialization.
This is similar to the existing -emit-sib, except that not everything is serialized, but only functions which are marked as "serializable".
2021-09-08 17:10:33 +02:00
Alastair Houghton
9013083046 [Demangler] Display error codes in various places.
Also fixed a test that broke with the previous commit.

rdar://79725187
2021-09-06 17:49:55 +01:00
Alastair Houghton
b8a879954a [Demangler] Tidy up a bit, and add line numbers to ManglingErrors.
Because DEMANGLER_ASSERT() might cause the remanglers to return a ManglingError
with the code ManglingError::AssertionFailed, it's useful to have a line number
in the ManglingError as well as the other information.  This is also potentially
helpful for other cases where the code is used multiple times in the remanglers.

rdar://79725187
2021-09-06 17:49:55 +01:00
Alastair Houghton
cc869b90b1 [Demangling] Remangling error handling for the OldRemangler.
First pass at adding error handling to the OldRemangler.  Still pondering
assert() calls.

rdar://79725187
2021-09-06 17:49:09 +01:00
Alastair Houghton
145f2814a2 [Demangling][Tests] Fix tests after remangler initial error handling.
Fix the tests to work after the Remangler has been fixed to do error handling.

rdar://79725187
2021-09-06 17:49:09 +01:00
Alastair Houghton
3f01f853a6 [Demangling] Add error handling to the remangler.
Mangling can fail, usually because the Node structure has been built
incorrectly or because something isn't supported with the old remangler.
We shouldn't just terminate the program when that happens, particularly
if it happens because someone has passed bad data to the demangler.

rdar://79725187
2021-09-06 17:49:09 +01:00
swift-ci
cb32b553de Merge remote-tracking branch 'origin/main' into rebranch 2021-09-04 11:32:57 -07:00
Hamish Knight
dc60996f89 Merge pull request #38836 from hamishknight/toil-and-tuple 2021-09-04 19:30:04 +01:00
swift-ci
00d00b1927 Merge remote-tracking branch 'origin/main' into rebranch 2021-09-02 18:13:05 -07:00
Michael Gottesman
5b1033575e Merge pull request #39147 from gottesmm/pr-647d874e9cb1793da138aab4d9e0a864f3555227
[swift-refactor] When testing always specify a resource-dir
2021-09-02 17:58:14 -07:00
swift-ci
0c7778f1bc Merge remote-tracking branch 'origin/main' into rebranch 2021-09-02 15:54:46 -07:00
Rintaro Ishizaki
bd5b3012f4 Merge pull request #38453 from rintaro/ide-completion-overrideannotation-rdarrdar62617558
[CodeCompletion] Annotate override completions
2021-09-02 15:50:26 -07:00
Michael Gottesman
558aee9e65 [swift-refactor] Add the option -resource-dir.
This lets one customize in the compiler invocation where the compiler looks for
the stdlib. This is necessary if the toolchain is not using a stdlib installed
with it.
2021-09-02 14:08:24 -07:00
swift-ci
7fd9dd27c5 Merge remote-tracking branch 'origin/main' into rebranch 2021-09-02 12:33:02 -07:00
Rintaro Ishizaki
7e7b2c3557 [CodeCompletion] Annotate override completions
* "description" for override completion is now annotatable
* "description" doesn't include attributes and decl introducer, but it
  includes generic paramters, effects specifiers, result type clause,
  and generic where clauses
* "name" now only include the name and the parameter names
* "sourcetext" should be the same

rdar://63835352
2021-09-02 12:12:26 -07:00
Michael Gottesman
872d492029 [cmake] Allow for users to build binaries for testing even if we aren't going to run the actual tests.
Previously, we used SWIFT_INCLUDE_TESTS to control if we created build rules for
binaries just used to test as well as running the tests as well. In this commit,
I changed this behavior by adding an option called SWIFT_INCLUDE_TEST_BINARIES.
This will allow for the stage 1 swift build to build and install test binaries
into the just built toolchain for use by the stage 2 swift that builds the
stdlib.
2021-09-01 16:33:04 -07:00
Hamish Knight
78d8d09b99 [IDE] Adopt ArgumentList 2021-09-01 18:40:26 +01:00
swift-ci
f8ed58196e Merge remote-tracking branch 'origin/main' into rebranch 2021-08-31 18:34:15 -07:00
Doug Gregor
9a8847dd4f [swift-inspect] Make sure to initialize backtrace flags.
This eliminates a compilation error with Swift 5.5 and the latest
argument parser library.
2021-08-31 09:56:50 -07:00
swift-ci
86a715d70e Merge remote-tracking branch 'origin/main' into rebranch 2021-08-30 17:15:00 -07:00
Ben Barham
a375ffebcf Merge pull request #39084 from apple/remove-keywords
[Completion] Remove unused DocWords
2021-08-31 10:10:22 +10:00
Ben Barham
8ae8f1d204 [Completion] Remove unused DocWords
The various keyword/recommended/etc fields were parsed and added to
completions, but never actually plumbed through SourceKit. Since they're
still unused and the implementation is not particularly lightweight,
just remove for now.

Resolves rdar://82464220
2021-08-28 14:05:01 +10:00
swift-ci
19048afbc8 Merge remote-tracking branch 'origin/main' into rebranch 2021-08-25 07:13:51 -07:00
Slava Pestov
bffce661c8 SourceKit: Don't call subst() with generic parameters that don't exist in the SubstitutionMap
Hack around this instead by using the two-function form of subst(),
and checking if the generic parameter is valid in the signature.

This comes up because we're using the generic signature of the
nominal type to get a SubstitutionMap, and then applying this map
to the types in the generic requirements of a member. If the member
introduces its own generic parameters, some of those requirements
might not be valid types in the outer generic signature.

This can probably use SubstitutionMap::combineSubstitutionMaps()
instead, but it would require more refactoring than I'm willing
to undertake for now.
2021-08-24 16:26:19 -04:00
swift-ci
79ca271751 Merge remote-tracking branch 'origin/main' into rebranch 2021-08-20 14:53:15 -07:00