Skip to content

Update links for repositories moved to the swiftlang org on GitHub #1513

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
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ To enable more verbose logging on non-macOS platforms, launch sourcekit-lsp with

## Formatting

SourceKit-LSP is formatted using [swift-format](http://github.com/apple/swift-format) to ensure a consistent style.
SourceKit-LSP is formatted using [swift-format](http://github.com/swiftlang/swift-format) to ensure a consistent style.

To format your changes run the formatter using the following command
```bash
Expand Down Expand Up @@ -156,7 +156,7 @@ In order for a pull request to be considered for inclusion in a release branch (
```

> [!TIP]
> The PR description can be generated using the [release_branch.md](https://github.com/apple/sourcekit-lsp/blob/main/.github/PULL_REQUEST_TEMPLATE/release_branch.md) [pull request template](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/about-issue-and-pull-request-templates). To use this template when creating a PR, you need to add the query parameter:
> The PR description can be generated using the [release_branch.md](https://github.com/swiftlang/sourcekit-lsp/blob/main/.github/PULL_REQUEST_TEMPLATE/release_branch.md) [pull request template](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/about-issue-and-pull-request-templates). To use this template when creating a PR, you need to add the query parameter:
> ```
> ?expand=1&template=release_branch.md
> ```
Expand Down
12 changes: 6 additions & 6 deletions Documentation/Enable Experimental Background Indexing.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ Background indexing in SourceKit-LSP is available as an experimental feature. Th

## Known issues

- Background Indexing is only supported for SwiftPM projects [#1269](https://github.com/apple/sourcekit-lsp/issues/1269), [#1271](https://github.com/apple/sourcekit-lsp/issues/1271)
- If a module or one of its dependencies has a compilation error, it cannot be properly prepared for indexing because we are running a regular `swift build` to generate its modules [#1254](https://github.com/apple/sourcekit-lsp/issues/1254) rdar://128683404
- Background Indexing is only supported for SwiftPM projects [#1269](https://github.com/swiftlang/sourcekit-lsp/issues/1269), [#1271](https://github.com/swiftlang/sourcekit-lsp/issues/1271)
- If a module or one of its dependencies has a compilation error, it cannot be properly prepared for indexing because we are running a regular `swift build` to generate its modules [#1254](https://github.com/swiftlang/sourcekit-lsp/issues/1254) rdar://128683404
- Workaround 1: Ensure that your files dependencies are in a buildable state to get an up-to-date index and proper cross-module functionality
- Workaround 2: Enable the `swiftpm-prepare-for-indexing` experimental feature, which continues to build Swift module even in the presence of errors.
- If you change a function in a way that changes its USR but keeps it API compatible (such as adding a defaulted parameter), references to it will be lost and not re-indexed automatically [#1264](https://github.com/apple/sourcekit-lsp/issues/1264)
- If you change a function in a way that changes its USR but keeps it API compatible (such as adding a defaulted parameter), references to it will be lost and not re-indexed automatically [#1264](https://github.com/swiftlang/sourcekit-lsp/issues/1264)
- Workaround: Make some edit to the files that had references to re-index them
- The index build is currently completely separate from the command line build generated using `swift build`. Building *does not* update the index (break your habits of always building!) [#1270](https://github.com/apple/sourcekit-lsp/issues/1270)
- The initial indexing might take 2-3x more time than a regular build [#1254](https://github.com/apple/sourcekit-lsp/issues/1254), [#1262](https://github.com/apple/sourcekit-lsp/issues/1262), [#1268](https://github.com/apple/sourcekit-lsp/issues/1268)
- The index build is currently completely separate from the command line build generated using `swift build`. Building *does not* update the index (break your habits of always building!) [#1270](https://github.com/swiftlang/sourcekit-lsp/issues/1270)
- The initial indexing might take 2-3x more time than a regular build [#1254](https://github.com/swiftlang/sourcekit-lsp/issues/1254), [#1262](https://github.com/swiftlang/sourcekit-lsp/issues/1262), [#1268](https://github.com/swiftlang/sourcekit-lsp/issues/1268)
- Spurious re-indexing of ~10-20 source files when `swift build` writes a header to the build directory [rdar://128573306](rdar://128573306)

## Filing issues

If you hit any issues that are not mentioned above, please [file a GitHub issue](https://github.com/apple/sourcekit-lsp/issues/new/choose) and attach the following information, if possible:
If you hit any issues that are not mentioned above, please [file a GitHub issue](https://github.com/swiftlang/sourcekit-lsp/issues/new/choose) and attach the following information, if possible:
- A diagnostic bundle generated by running `path/to/sourcekit-lsp diagnose`.
- Your project including the `.index-build` folder, if possible.
2 changes: 1 addition & 1 deletion Documentation/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ After the message has been decoded, the `SourceKitLSPServer` handles it on its `

To provide language-specific functionality `SourceKitLSPServer` delegates to the types that implement `LanguageService`. This is either `SwiftLanguageService`, which implements language functionality for Swift files based on sourcekitd and swift-syntax, or `ClangLanguageService`, which launches a `clangd` process to provide functionality for C, C++, Objective-C and Objective-C++.

For requests that require knowledge about the project’s index, like call hierarchy or rename of global symbols, `SourceKitLSPServer` enriches the information returned from the language service with information from the [index](http://github.com/apple/indexstore-db/).
For requests that require knowledge about the project’s index, like call hierarchy or rename of global symbols, `SourceKitLSPServer` enriches the information returned from the language service with information from the [index](http://github.com/swiftlang/indexstore-db/).

### sourcekitd

Expand Down
8 changes: 4 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,14 @@ var dependencies: [Package.Dependency] {
let relatedDependenciesBranch = "main"

return [
.package(url: "https://github.com/apple/indexstore-db.git", branch: relatedDependenciesBranch),
.package(url: "https://github.com/apple/swift-package-manager.git", branch: relatedDependenciesBranch),
.package(url: "https://github.com/swiftlang/indexstore-db.git", branch: relatedDependenciesBranch),
.package(url: "https://github.com/swiftlang/swift-package-manager.git", branch: relatedDependenciesBranch),
.package(url: "https://github.com/apple/swift-tools-support-core.git", branch: relatedDependenciesBranch),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.2.2"),
.package(url: "https://github.com/apple/swift-syntax.git", branch: relatedDependenciesBranch),
.package(url: "https://github.com/swiftlang/swift-syntax.git", branch: relatedDependenciesBranch),
.package(url: "https://github.com/apple/swift-crypto.git", from: "3.0.0"),
// Not a build dependency. Used so the "Format Source Code" command plugin can be used to format sourcekit-lsp
.package(url: "https://github.com/apple/swift-format.git", branch: relatedDependenciesBranch),
.package(url: "https://github.com/swiftlang/swift-format.git", branch: relatedDependenciesBranch),
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ https://www.swift.org/tools has a list of popular editors that support LSP and c

## Reporting Issues

If you should hit any issues while using SourceKit-LSP, we appreciate bug reports on [GitHub Issue](https://github.com/apple/sourcekit-lsp/issues/new/choose).
If you should hit any issues while using SourceKit-LSP, we appreciate bug reports on [GitHub Issue](https://github.com/swiftlang/sourcekit-lsp/issues/new/choose).

> [!IMPORTANT]
> SourceKit-LSP does not update its global index in the background or build Swift modules in the background. Thus, a lot of cross-module or global functionality is limited if the project hasn't been built recently. To update the index or rebuild the Swift modules, build the project.
Expand Down
2 changes: 1 addition & 1 deletion Sources/Diagnose/DiagnoseCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public struct DiagnoseCommand: AsyncParsableCommand {
"""

Bundle created.
When filing an issue at https://github.com/apple/sourcekit-lsp/issues/new,
When filing an issue at https://github.com/swiftlang/sourcekit-lsp/issues/new,
please attach the bundle located at
\(bundlePath.path)
"""
Expand Down
4 changes: 2 additions & 2 deletions Sources/SKCore/BuildServerBuildSystem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,13 @@ extension BuildServerBuildSystem: BuildSystem {

public func sourceFiles() async -> [SourceFileInfo] {
// BuildServerBuildSystem does not support syntactic test discovery or background indexing.
// (https://github.com/apple/sourcekit-lsp/issues/1173).
// (https://github.com/swiftlang/sourcekit-lsp/issues/1173).
return []
}

public func addSourceFilesDidChangeCallback(_ callback: @escaping () async -> Void) {
// BuildServerBuildSystem does not support syntactic test discovery or background indexing.
// (https://github.com/apple/sourcekit-lsp/issues/1173).
// (https://github.com/swiftlang/sourcekit-lsp/issues/1173).
}
}

Expand Down
10 changes: 5 additions & 5 deletions Sources/SKSwiftPMWorkspace/SwiftPMBuildSystem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ extension SwiftPMBuildSystem: SKCore.BuildSystem {

public func defaultLanguage(for document: DocumentURI) -> Language? {
// TODO (indexing): Query The SwiftPM build system for the document's language.
// https://github.com/apple/sourcekit-lsp/issues/1267
// https://github.com/swiftlang/sourcekit-lsp/issues/1267
return nil
}

Expand Down Expand Up @@ -534,7 +534,7 @@ extension SwiftPMBuildSystem: SKCore.BuildSystem {

// Files that occur before the target in the topological sorting don't depend on it.
// Ideally, we should consult the dependency graph here for more accurate dependency analysis instead of relying on
// a flattened list (https://github.com/apple/sourcekit-lsp/issues/1312).
// a flattened list (https://github.com/swiftlang/sourcekit-lsp/issues/1312).
return self.targets.compactMap { (configuredTarget, value) -> ConfiguredTarget? in
if let minimumTargetIndex, value.index <= minimumTargetIndex {
return nil
Expand All @@ -548,7 +548,7 @@ extension SwiftPMBuildSystem: SKCore.BuildSystem {
logMessageToIndexLog: @escaping @Sendable (_ taskID: IndexTaskID, _ message: String) -> Void
) async throws {
// TODO (indexing): Support preparation of multiple targets at once.
// https://github.com/apple/sourcekit-lsp/issues/1262
// https://github.com/swiftlang/sourcekit-lsp/issues/1262
for target in targets {
await orLog("Preparing") { try await prepare(singleTarget: target, logMessageToIndexLog: logMessageToIndexLog) }
}
Expand All @@ -566,7 +566,7 @@ extension SwiftPMBuildSystem: SKCore.BuildSystem {
}

// TODO (indexing): Add a proper 'prepare' job in SwiftPM instead of building the target.
// https://github.com/apple/sourcekit-lsp/issues/1254
// https://github.com/swiftlang/sourcekit-lsp/issues/1254
guard let swift = toolchain.swift else {
logger.error(
"Not preparing because toolchain at \(self.toolchain.identifier) does not contain a Swift compiler"
Expand Down Expand Up @@ -741,7 +741,7 @@ extension SwiftPMBuildSystem: SKCore.BuildSystem {
public func sourceFiles() -> [SourceFileInfo] {
return fileToTargets.compactMap { (uri, targets) -> SourceFileInfo? in
// We should only set mayContainTests to `true` for files from test targets
// (https://github.com/apple/sourcekit-lsp/issues/1174).
// (https://github.com/swiftlang/sourcekit-lsp/issues/1174).
return SourceFileInfo(
uri: uri,
isPartOfRootProject: targets.contains(where: \.isPartOfRootPackage),
Expand Down
2 changes: 1 addition & 1 deletion Sources/SKTestSupport/SkipUnless.swift
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public actor SkipUnless {
}

/// SwiftPM moved the location where it stores Swift modules to a subdirectory in
/// https://github.com/apple/swift-package-manager/pull/7103.
/// https://github.com/swiftlang/swift-package-manager/pull/7103.
public static func swiftpmStoresModulesInSubdirectory(
file: StaticString = #filePath,
line: UInt = #line
Expand Down
4 changes: 2 additions & 2 deletions Sources/SemanticIndex/SemanticIndexManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ public final actor SemanticIndexManager {

// TODO (indexing): When we can index multiple targets concurrently in SwiftPM, increase the batch size to half the
// processor count, so we can get parallelism during preparation.
// https://github.com/apple/sourcekit-lsp/issues/1262
// https://github.com/swiftlang/sourcekit-lsp/issues/1262
for targetsBatch in sortedTargets.partition(intoBatchesOfSize: 1) {
let preparationTaskID = UUID()
let indexTask = Task(priority: priority) {
Expand All @@ -614,7 +614,7 @@ public final actor SemanticIndexManager {
for target in targetsBatch {
// TODO (indexing): Once swiftc supports indexing of multiple files in a single invocation, increase the
// batch size to allow it to share AST builds between multiple files within a target.
// https://github.com/apple/sourcekit-lsp/issues/1268
// https://github.com/swiftlang/sourcekit-lsp/issues/1268
for fileBatch in filesByTarget[target]!.partition(intoBatchesOfSize: 1) {
taskGroup.addTask {
await self.updateIndexStore(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public struct UpdateIndexStoreTaskDescription: IndexTaskDescription {
let filesToIndex = filesToIndex.sorted(by: { $0.file.sourceFile.stringValue < $1.file.sourceFile.stringValue })
// TODO (indexing): Once swiftc supports it, we should group files by target and index files within the same
// target together in one swiftc invocation.
// https://github.com/apple/sourcekit-lsp/issues/1268
// https://github.com/swiftlang/sourcekit-lsp/issues/1268
for file in filesToIndex {
await updateIndexStore(forSingleFile: file.file, in: file.target)
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/SourceKitLSPTests/PullDiagnosticsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ final class PullDiagnosticsTests: XCTestCase {
XCTAssertEqual(diagnostic.range, Position(line: 1, utf16index: 2)..<Position(line: 1, utf16index: 9))
}

/// Test that we can get code actions for pulled diagnostics (https://github.com/apple/sourcekit-lsp/issues/776)
/// Test that we can get code actions for pulled diagnostics (https://github.com/swiftlang/sourcekit-lsp/issues/776)
func testCodeActions() async throws {
let testClient = try await TestSourceKitLSPClient(
capabilities: ClientCapabilities(
Expand Down
2 changes: 1 addition & 1 deletion Tests/SourceKitLSPTests/WorkspaceSymbolsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class WorkspaceSymbolsTests: XCTestCase {
let response = try await project.testClient.send(WorkspaceSymbolsRequest(query: "funcFrom"))

// Ideally, the item from the current package (PackageB) should be returned before the item from PackageA
// https://github.com/apple/sourcekit-lsp/issues/1094
// https://github.com/swiftlang/sourcekit-lsp/issues/1094
XCTAssertEqual(
response,
[
Expand Down