-
Notifications
You must be signed in to change notification settings - Fork 276
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
Merge main
into release/6.0
#1217
Merged
ahoppen
merged 9 commits into
swiftlang:release/6.0
from
ahoppen:6.0/merge-main-2024-05-03
May 3, 2024
Merged
Merge main
into release/6.0
#1217
ahoppen
merged 9 commits into
swiftlang:release/6.0
from
ahoppen:6.0/merge-main-2024-05-03
May 3, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The scheduler isn’t actually being used yet but it’s complex and generic enough that it’s possible to review it by itself.
This introduces an abstraction layer around `IndexStoreDB` (yes, I known another one …) that consults the underlying `IndexStoreDB` and then checks whether the entries are up-to-date with respect to some `IndexCheckLevel`. Requests can specify how picky they want to be about declaring results from the index out-of-date. The default choice right now is to not include index entries from source files that have been deleted (because those are definitely from lingering unit files) but include results even if the source file has been modified after it was last indexed. We do include results from files that have been modified since they were last indexed because: When a file gets modified, it's likely that some of the line:column locations in it are still correct – eg. if only one line is modified and if lines are inserted/deleted all locations above are still correct. For locations that are out of date, showing stale results is one of the best ways of communicating to the user that the index is out-of-date and that they need to rebuild. We might want to reconsider this default when we have background indexing. rdar://125230833 rdar://126622963
Filter index entries for deleted source files
Add a task scheduler for background indexing and preparation
Creating `Process` on Amazon Linux fails with: `workingDirectory is not supported in this platform`. Instead of setting a working directory, pass the working directory as `-C` to `git` when creating a `SwiftPMDependencyProject`.
…ndex When the semantic index is out-of-date, we currently purely rely on the syntactic index to discover tests and completely ignore data from the semantic index. This may lead to confusing behavior. For example if you have ``` class MightInheritFromXCTestCaseOrNot {} class MyClass: MightInheritFromXCTestCaseOrNot { func testStuff() {} } ``` Then we don’t return any tests when the semantic index is up-to-date. But once the file is modified (either on disk or in-memory), we purely rely on the syntactic index, which reports `testStuff` as a test method. After a build / background indexing finishes, the test method disappears again. We can mitigate this problem as follows: If we have stale semantic index data for the test file, for every test method found by the syntactic index, check if we have an entry for this method in the semantic index. If we do, but that entry is not marked as a test class/method, we know that the semantic index knows about this method but decided that it’s not a test method for some reason. So we should ignore it. rdar://126492948
Don’t use `workingDirectory` when creating a `SwiftPMDependencyProject`
…ic-tests-based-on-outdated-index Enhance syntactic test discovery with information from the semantic index
@swift-ci Please test |
bnbarham
approved these changes
May 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Merge the following PRs into
release/6.0
:workingDirectory
when creating aSwiftPMDependencyProject
#1215