Skip to content

If a build server doesn’t specify -index-store-path in the SourceKit options, add it during background indexing #2000

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 2 commits into from
Feb 26, 2025

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Feb 25, 2025

Also, remove options to override the index store path and index database path. We should always infer these from the build system and I can’t think of a reason to override these settings.

We should always infer these from the build system and I can’t think of a reason to override these settings.
@ahoppen
Copy link
Member Author

ahoppen commented Feb 25, 2025

@swift-ci Please test

struct NoIndexStorePathError: Error {}
throw NoIndexStorePathError()
}
if let indexStorePath = args.firstIndex(of: "-index-store-path"), indexStorePath + 1 < args.count {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lastIndex in case there's multiple? lastIndexStorePathArgument could also use lastIndex rather than the reverse loop it has now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea.

@ahoppen ahoppen force-pushed the index-store-path-option branch from 8cbb868 to 4b6b243 Compare February 26, 2025 01:54
@ahoppen
Copy link
Member Author

ahoppen commented Feb 26, 2025

@swift-ci Please test

@ahoppen ahoppen enabled auto-merge February 26, 2025 01:54
@ahoppen ahoppen disabled auto-merge February 26, 2025 02:08
@ahoppen ahoppen enabled auto-merge February 26, 2025 02:08
@ahoppen
Copy link
Member Author

ahoppen commented Feb 26, 2025

@swift-ci Please test Windows

@ahoppen ahoppen force-pushed the index-store-path-option branch from 4b6b243 to a3086d7 Compare February 26, 2025 04:27
@ahoppen
Copy link
Member Author

ahoppen commented Feb 26, 2025

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Feb 26, 2025

@swift-ci Please test Windows

…t options, add it during background indexing
@ahoppen ahoppen force-pushed the index-store-path-option branch from a3086d7 to 628ce3c Compare February 26, 2025 06:46
@ahoppen
Copy link
Member Author

ahoppen commented Feb 26, 2025

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Feb 26, 2025

@swift-ci Please test Windows

@ahoppen ahoppen merged commit 66793ff into swiftlang:main Feb 26, 2025
3 checks passed
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.

2 participants