Skip to content

Conversation

@MaxDesiatov
Copy link
Contributor

Yet another environment variable that shouldn't trigger full package rebuilds.

Resolves rdar://107029374

Yet another environment variable that shouldn't trigger full package rebuilds.

Resolves rdar://107029374
@MaxDesiatov MaxDesiatov self-assigned this Jan 18, 2024
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov MaxDesiatov requested a review from bnbarham January 18, 2024 16:37
@MaxDesiatov MaxDesiatov enabled auto-merge (squash) January 18, 2024 20:43
extension EnvironmentVariables {
// internal for testing
internal static let nonCachableKeys: Set<String> = [
static let nonCachableKeys: Set<String> = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to have an list that we know should cause rebuilds rather than the other way around?

Copy link
Contributor Author

@MaxDesiatov MaxDesiatov Jan 18, 2024

Choose a reason for hiding this comment

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

Not until we support something like package traits to customise packages through predefined configuration values. Implementing that requires major changes to package graph resolution and manifest evaluation code.

Right now the only way for users to configure packages at build time is to pass an environment variable to swift build and read that variable in Package.swift. We can't know upfront which environment variables will be used for customisation by an arbitrary package, and changes in such variables have to cause rebuilds for these customisations to work in the first place.

@MaxDesiatov MaxDesiatov merged commit c0d1c6b into main Jan 18, 2024
@MaxDesiatov MaxDesiatov deleted the maxd/ssh-auth-sock branch January 18, 2024 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants