Validate traits in target build setting conditions on manifest load#9980
Open
bripeticca wants to merge 4 commits into
Open
Validate traits in target build setting conditions on manifest load#9980bripeticca wants to merge 4 commits into
bripeticca wants to merge 4 commits into
Conversation
Contributor
Author
|
@swift-ci test |
Contributor
|
@swift-ci test self hosted windows |
bkhouri
reviewed
Apr 28, 2026
| let observability = ObservabilitySystem.makeForTesting() | ||
| let (_, validationDiagnostics) = try await loadAndValidateManifest(content, observabilityScope: observability.topScope) | ||
| XCTAssertNoDiagnostics(observability.diagnostics) | ||
| let firstDiagnostic = try XCTUnwrap(validationDiagnostics[0]) |
Contributor
There was a problem hiding this comment.
out of curiosity, why don't we emit the diagnostics via the observability diagnostics property?
Contributor
Author
There was a problem hiding this comment.
Good question -- it seems like there is a pre-existing practice involved with the Manifest validation step here (see ManifestLoader+Validation.swift), so I continued to follow that for this change since I make the checks for these traits within those same validation methods.
Contributor
Author
|
@swift-ci test |
Contributor
Author
|
@swift-ci test windows |
Contributor
Author
|
@swift-ci smoke test macOS |
Contributor
Author
|
@swift-ci test macOS |
Contributor
Author
|
@swift-ci test |
Contributor
Author
|
@swift-ci test windows |
2 similar comments
Contributor
Author
|
@swift-ci test windows |
Contributor
Author
|
@swift-ci test windows |
This file contains hidden or 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
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.
Traits for a target's build setting conditions were not being validated upon loading the manifest; while the trait enablement for these conditions is checked later on (post-resolution) and is not actually validated here either, we should really be validating the traits referenced in the target build setting conditions immediately after loading the manifest itself.