Commit Graph

2325 Commits

Author SHA1 Message Date
Alex Hoppen
4c1d875cf8 Remove the syntacticrename request
`source.request.find-syntactic-rename-ranges` should be used instead.
2023-11-10 11:46:47 -08:00
Alex Hoppen
e6deb0b84b [SourceKit] Remove pImpl abstraction pattern for RequestRenameRangeConsumer 2023-11-10 11:41:01 -08:00
Alex Hoppen
d5edf34d7f Merge pull request #69573 from tristanlabelle/lsp-no-memmap
Avoid memory mapping source files opened by SourceKit
2023-11-02 08:37:20 -07:00
Tristan Labelle
fb8c4182d3 Avoid memory mapping source files opened by SourceKit. 2023-11-01 11:33:33 -04:00
Alex Hoppen
fdc8e7d387 Merge pull request #69294 from ahoppen/ahoppen/semantic-tokens
[SourceKit] Add a request to get the semantic tokens of a file
2023-10-24 08:07:41 -07:00
Alex Hoppen
2507e0e9ee [SourceKit] Support getting semantic tokens for macro expansion buffers 2023-10-23 11:06:49 -07:00
Alex Hoppen
4bc03f8392 [SourceKit] Add a request to get the semantic tokens of a file
We need this request for semantic highlighting in LSP. Previously, we were getting the semantic tokens using a 0,0 edit after a document update notification but that will no longer be possible if we open the documents in syntactic only mode.
2023-10-20 10:38:08 -07:00
Simon Barinka
baec9f5855 [SourceKit] Fix formatting 2023-10-20 12:59:54 +02:00
Simon Barinka
23cde9b2e0 [SourceKit] Move the option to IndexToStore request 2023-10-20 12:55:41 +02:00
Simon Barinka
3bcfc3b5a7 [SourceKit] Update docs 2023-10-09 21:25:54 +02:00
Simon Barinka
ae570850e0 [SourceKit] Fix formatting 2023-10-09 21:16:13 +02:00
Simon Barinka
b13a7f5829 [SourceKit] Add option to index local symbols to IndexSource request
Adds optional `key.should_index_locals` flag to the SourceKit `source.request.indexsource` request.
If true, the response includes symbol info for both locals and globals.
2023-10-09 20:59:43 +02:00
swift-ci
c746bf7e51 Merge remote-tracking branch 'origin/main' into rebranch 2023-10-08 10:54:42 -07:00
Saleem Abdulrasool
a2cc0d0468 Merge pull request #68780 from hjyamauchi/sourcekitclangdep
Fix the clang dependency of sourcekit libraries.
2023-10-08 10:41:57 -07:00
swift-ci
292463868e Merge remote-tracking branch 'origin/main' into rebranch 2023-10-02 17:14:15 -07:00
Rintaro Ishizaki
d2eaa84088 Merge pull request #68807 from rintaro/sourcekit-framework-rpath-rdar115976985
[SourceKit] Fix RPATH to lib/swift/host in SourceKit frameworks
2023-10-02 16:57:18 -07:00
Ben Barham
119d08c6d1 Merge remote-tracking branch 'origin/main' into 20230929-merge-rebranch
Conflicts:
  - `CMakeLists.txt` caused by the extra `-D` added in rebranch to
    reduce the number of deprecation warnings.
  - `lib/Frontend/PrintingDiagnosticConsumer.cpp` caused by the removal
    of one of the `#if SWIFT_SWIFT_PARSER` on rebranch (probably should
    have been done on main).
2023-09-29 09:50:50 -07:00
Hiroshi Yamauchi
71d8118af9 Fix the clang dependency of sourcekit libraries.
Because swift_swap_compiler_if_needed updates the compiler ID to
Clang, we need to account for it when deciding to add a dependency on
clang. Otherwise, the sourcekit build could fail due to the clang
executable not having been built there yet.
2023-09-27 14:15:12 -07:00
Rintaro Ishizaki
88ec86f36f [SourceKit] Fix RPATH to lib/swift/host in SourceKit frameworks
Relative path calculation to lib/swift/host was not correct.

rdar://115976985
2023-09-27 13:29:48 -07:00
Ben Barham
041691184c [CMake] Replace early swift-syntax with FetchContent
Use FetchContent to include swift-syntax directly in swift. This can be
thought of as an `add_subdirectory` for a directory outside the root.

The default build directory will be `_deps/swiftsyntax-subbuild/`, though
the modules and shared libraries will be built in `lib/swift/host` by
passing down `SWIFT_HOST_LIBRARIES_DEST_DIR` to avoid copying them as we
were doing previously.
2023-09-18 14:44:10 -07:00
swift-ci
17a5d30d54 Merge remote-tracking branch 'origin/main' into rebranch 2023-09-15 16:14:15 -07:00
Hamish Knight
746128c7aa Use StringMap in EditorDiagConsumer
As noted by the comment, storing a `StringRef` is
indeed brittle. Update to use a StringMap.

rdar://111589090
2023-09-15 18:27:49 +01:00
swift-ci
d1abca98df Merge remote-tracking branch 'origin/main' into rebranch 2023-09-07 08:14:37 -07:00
Saleem Abdulrasool
b6764c3f01 Merge pull request #68258 from compnerd/how-do-you-do
build: adjust the build to support non-Apple environments
2023-09-07 08:11:37 -07:00
swift-ci
0407c3d3b2 Merge remote-tracking branch 'origin/main' into rebranch 2023-09-06 13:34:53 -07:00
Saleem Abdulrasool
00d4879c84 build: adjust the build to support non-Apple environments
Account for import libraries and the associated layout difference on
platforms (e.g. DLLs are placed in `bin`).  This is required to enable
building the macro path on Windows.
2023-09-06 12:45:58 -07:00
Allan Shortlidge
0dd8f4c492 AST: Introduce abstraction for extension/type decl inheritance clauses.
Wrap the `InheritedEntry` array available on both `ExtensionDecl` and
`TypeDecl` in a new `InheritedTypes` class. This class will provide shared
conveniences for working with inherited type clauses. NFC.
2023-09-06 10:41:57 -07:00
swift-ci
f560dc5cd2 Merge remote-tracking branch 'origin/main' into rebranch 2023-09-05 13:34:36 -07:00
Rintaro Ishizaki
8a2aeb9590 Merge pull request #68273 from rintaro/sourcekit-host-rpath
[SourceKit] RPATH 'lib/swift/host' should be added without BOOTSTRAPPING
2023-09-05 13:14:41 -07:00
swift-ci
e279a465ca Merge remote-tracking branch 'origin/main' into rebranch 2023-09-03 15:53:40 -07:00
Saleem Abdulrasool
6b50edc6f7 SourceKit: handle Windows paths for request options
Windows paths involve a `:`.  Ideally, we would just use `;` as the
separator rather than `:`, but for now just limit the split count to 2.
2023-09-03 10:32:08 -07:00
Rintaro Ishizaki
537f3180c5 [SourceKit] RPATH 'lib/swift/host' should be added without BOOTSTRAPPING
as long as the Swift parser integration is enabled.
Also, remove redundant RPATH additions.
2023-09-01 11:21:09 -07:00
swift-ci
97970caeac Merge remote-tracking branch 'origin/main' into rebranch 2023-08-30 20:55:33 -07:00
Rintaro Ishizaki
9d78971b9b [CMake][SourceKit] Add RPATH to 'lib/swift/host'
RPATH to 'lib/swift/host' was missing in Darwin platform.
2023-08-30 11:56:00 -07:00
swift-ci
484684f0dd Merge remote-tracking branch 'origin/main' into rebranch 2023-08-29 17:55:14 -07:00
Ben Barham
0988236065 Merge pull request #68082 from rintaro/swift-swift-linux
[CMake] Support Macros in Linux
2023-08-29 17:45:26 -07:00
swift-ci
fecdc7961c Merge remote-tracking branch 'origin/main' into rebranch 2023-08-28 10:37:07 -07:00
Rintaro Ishizaki
602604be74 [CMake] Further cleanup for RUNPATH setting
`$ORIGIN` is only supported in Linux, BSD, etc. (i.e. not in Windows)
2023-08-25 23:42:19 +00:00
Artem Chikin
e0275f4f0e [Explicit Module Builds] Do not attempt to re-load module dependency from
interface for index.

An explicit module build compile is unable to do so because it does not have
access to the interfaces. Doing this in the first place is a workaround for a
known bug, which will require to be solved at the root cause instead (e.g.
Deserialization Safety feature).

Resolves rdar://113165898
2023-08-25 16:34:09 -07:00
Rintaro Ishizaki
914a6fdf7a [CMake] Fix weiredness in swift runtime linking for SourceKit libraries
SourceKit components are never built while bootstrapping stages. So it
doen't need to have stage 0 or 1 handling.
2023-08-25 22:37:34 +00:00
Rintaro Ishizaki
0f0c4925ae [CMake] Fatal error when bootstrapping is not "hosttools"
and Swift parser integration is enabled.
If swift parser integration is enabled, SwiftSyntax libraries are always
built with host tools. Other SwiftCompilerSources modules must use the
same runtime with parser libraries.
2023-08-24 23:31:47 +00:00
Rintaro Ishizaki
2a2787b2d0 Avoid adding redundant temporary RUNPATH to builder's stdlib
Many shared libs and executables are only run after stdlib/runtime are
built. They don't need to link with builders stdlib at all.
2023-08-24 23:10:20 +00:00
Rintaro Ishizaki
9c9010e5b7 [CMake] Support Macros in Linux
For compiling codes required for macro support, we now need swiftc
compiler in the build machine.

Unlike Darwin OSes, where swiftCore runtime is guaranteed to be present
in /usr/lib, Linux doesn't have ABI stability and the stdlib of the
build machine is not at the specific location. So the built compiler
cannot relies on the shared object in the toolchain.
2023-08-24 17:04:15 +00:00
Evan Wilde
11fcbbeea2 Cleaning up more deprecation warnings
Pointer `llvm/Support/Host.h` at `llvm/TargetParser/Host.h`.
Replacing deprecated API `startswith_insensitive` with replacement
`starts_with_insensitive`.
2023-08-10 16:19:24 -07:00
swift-ci
49940d20ed Merge remote-tracking branch 'origin/main' into rebranch 2023-08-08 20:55:05 -07:00
Alex Hoppen
bba2f476ab Merge pull request #67613 from barinsim/my-main
[SourceKit] Report cursor info information for literals
2023-08-08 20:54:00 -07:00
Evan Wilde
8cc1dea5b9 [SourceKit] Add missing variant header include 2023-08-07 11:37:24 -07:00
Simon Barinka
87878c5f35 [SourceKit] Address minor PR comments 2023-08-03 09:41:25 +02:00
Simon Barinka
76e01b8481 [SourceKit] Address minor PR comments 2023-08-03 09:36:29 +02:00
Simon Barinka
e5fa3f9d2d [SourceKit] Fix formatting issues 2023-08-03 00:53:46 +02:00