Remove Identity-without-backing-file quirk from Static Web Assets#53819
Draft
Remove Identity-without-backing-file quirk from Static Web Assets#53819
Conversation
Contributor
|
Thanks for your PR, @@javiercn. |
- Simplify ComputeCandidateIdentity to always use the real file path as
identity, instead of synthesizing a path under the content root when
the file is not under it
- Remove CopyCandidates output from DefineStaticWebAssets and all
supporting infrastructure (CopyCandidate class, cache tracking)
- Simplify ResolveFile to only use Identity (remove OriginalItemSpec
fallback)
- Simplify CollectStaticWebAssetsToCopy to always use asset.Identity
as source (remove IsComputed branch with file-existence checks)
- Simplify ServiceWorker.targets to always use Identity (remove
Exists('%(Identity)') / OriginalItemSpec fallback pattern)
- Simplify AssetToCompress to only use RelatedAsset (remove
RelatedAssetOriginalItemSpec fallback)
- Remove RelatedAssetOriginalItemSpec metadata from ResolveCompressedAssets
- Fix _ComputeScopedCssStaticWebAssets to depend on _ProcessScopedCssFiles
ensuring scoped CSS output files exist before asset definition
- Update test for new identity behavior
24c42a8 to
5a9b471
Compare
… fallback Remove tests that validated the removed RelatedAssetOriginalItemSpec fallback behavior and update remaining tests to match the simplified TryFindInputFilePath that only uses RelatedAsset.
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.
Remove the legacy quirk where static web asset Identity could point to a non-existent file, with OriginalItemSpec used as a fallback source.
Changes
Core simplifications:
ComputeCandidateIdentityalways returns the real file path — no more synthesizing identities under the content rootCopyCandidatesoutput fromDefineStaticWebAssetsand all supporting infrastructure (CopyCandidateclass, cache tracking)ResolveFileonly uses Identity (removed OriginalItemSpec fallback)CollectStaticWebAssetsToCopyalways usesasset.Identityas source (removedIsComputedbranch with file-existence checks)Target/downstream simplifications:
ServiceWorker.targets: removedExists('%(Identity)')/OriginalItemSpecfallback patternAssetToCompress: removedRelatedAssetOriginalItemSpecfallbackResolveCompressedAssets: removedRelatedAssetOriginalItemSpecmetadata emissionTarget ordering fix:
_ComputeScopedCssStaticWebAssetsnow depends on_ProcessScopedCssFilesto ensure scoped CSS output files exist before asset definition9 files changed, 36 insertions, 181 deletions.