Skip to content

cache DriverSupport capabilities across targets #7057

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 5 commits into from
Nov 8, 2023

Conversation

tomerd
Copy link
Contributor

@tomerd tomerd commented Nov 7, 2023

motivation: DriverSupport capabilities require shelling, which was called for every target, while it can be cached across them

changes: make DriverSupport a static util

@tomerd tomerd force-pushed the cache-driver-capabilities branch 2 times, most recently from c0ac167 to b821567 Compare November 7, 2023 01:22
@tomerd
Copy link
Contributor Author

tomerd commented Nov 7, 2023

@swift-ci test

@tomerd tomerd self-assigned this Nov 7, 2023
@tomerd
Copy link
Contributor Author

tomerd commented Nov 7, 2023

@swift-ci test

1 similar comment
@tomerd
Copy link
Contributor Author

tomerd commented Nov 7, 2023

@swift-ci test

motivation: DriverSupport capabilities require shelling, which was called for every target, while it can be cached across them

motivation:
* reuse DriverSupport across targets
* plumb DriverSupport from SwiftTool all the way to the build system
@tomerd tomerd force-pushed the cache-driver-capabilities branch from 02e2422 to 05d909e Compare November 7, 2023 22:29
@tomerd
Copy link
Contributor Author

tomerd commented Nov 7, 2023

@swift-ci test

@tomerd tomerd enabled auto-merge (squash) November 7, 2023 22:40
public class DriverSupport {
private var flagsMap = ThreadSafeBox<[String: Set<String>]>()
public init() {}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the key change, it basically means the information is cached foe the entire process which IMO is the desired effect

@tomerd
Copy link
Contributor Author

tomerd commented Nov 7, 2023

@swift-ci test

@MaxDesiatov
Copy link
Contributor

@swift-ci test windows

@tomerd tomerd merged commit 4c538f9 into swiftlang:main Nov 8, 2023
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