Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Sources/Basics/EnvironmentVariables.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ extension EnvironmentVariables {
// rdar://107029374
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.

"TERM",
"TERM_PROGRAM",
"TERM_PROGRAM_VERSION",
Expand All @@ -79,6 +79,7 @@ extension EnvironmentVariables {
"LS_COLORS",
"VSCODE_IPC_HOOK_CLI",
"HYPERFINE_RANDOMIZED_ENVIRONMENT_OFFSET",
"SSH_AUTH_SOCK",
]

public var cachable: EnvironmentVariables {
Expand Down