Skip to content

Merge main into release/6.0 #1449

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 21 commits into from
Jun 7, 2024

Conversation

ahoppen added 21 commits June 5, 2024 23:13
Unfortunately, `setpriority` only allows reduction of a process’s priority and doesn’t support priority elevation (unless you are a super user). I still think that it’s valuable to set the process’s priority based on the task priority when it is launched because many indexing processes never get their priority escalated and should thus run in the background.

On Windows, we can elevate the process’s priority.

rdar://127474245
We can have two targets with the same name in a SwiftPM workspace, one for a build target and one for the destination. We need to be able to tell them apart based on the run destination.
This allows us to fix a toolchain when using a `SwiftPMBuildSystem`, which is critical to ensure that a target gets prepared using the same toolchain that is used to index it and that is used for sourcekitd.
I found that 2 markers sometimes chooses very close color combinations like red-yellow and red-orange. Let’s add a third emoji marker to make it even easier to tell the log lanes apart.
Use 3 emoji markers in the index log
…-plugin

Take run destinations into account for SwiftPM build targets
Set the priority of processes launched for background indexing
- Strip the `-index-system-modules` flag because it doesn’t work if no output file map is passed
- Remove `-primary-file` when we’re merging all `.swift` files into one file
- Fix an issue where errors during reduction would be rendered within the progress bar.
It looks to similar to the red and yellow emojis.
…dexing.md`

This frees the name `Background Indexing.md` to contain documentation about how background indexing works.
…swift build` invocations during preparation

The `BuildParameters` that we were previously inspecting contained some parameters that SwiftPM synthesizes and that weren’t specified on the command line. For example, it contains `-g` for all languages. This causes us to add `-Xswiftc -g -Xcc -g -Xcxx -g` to the `swift build` invocations for preparation, which is not necessary.
Remove orange emoji from the task ID emoji representation
…in-index-subcommand

Allow enabling experimental features in the `debug index` subcommand
Fix a couple issue in the `debug reduce-swift-frontend` subcommand
…xing-doc

Rename `Background Indexing.md` to `Enable Experimental Background Indexing.md`
Log the exit status of prepare and index processes to the index log
Inspect the build setup to determine the extra flags to pass to the `swift build` invocations during preparation
# Conflicts:
#	Sources/SKSwiftPMWorkspace/SwiftPMBuildSystem.swift
@ahoppen ahoppen requested a review from bnbarham June 7, 2024 16:30
@ahoppen ahoppen requested a review from benlangmuir as a code owner June 7, 2024 16:30
@ahoppen
Copy link
Member Author

ahoppen commented Jun 7, 2024

@swift-ci Please test

@ahoppen ahoppen merged commit cab5adc into swiftlang:release/6.0 Jun 7, 2024
3 checks passed
@ahoppen ahoppen deleted the 6.0/merge-main-2024-06-07 branch June 7, 2024 19:43
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