Move asset compression to the StaticWebAssets SDK#31559
Merged
MackinnonBuck merged 17 commits intomainfrom Apr 14, 2023
Merged
Conversation
|
Thanks for your PR, @MackinnonBuck. |
MackinnonBuck
commented
Mar 31, 2023
src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets
Outdated
Show resolved
Hide resolved
javiercn
reviewed
Mar 31, 2023
src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets
Outdated
Show resolved
Hide resolved
javiercn
reviewed
Mar 31, 2023
src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets
Outdated
Show resolved
Hide resolved
javiercn
reviewed
Mar 31, 2023
javiercn
reviewed
Mar 31, 2023
javiercn
reviewed
Mar 31, 2023
javiercn
reviewed
Mar 31, 2023
Member
Author
|
Source build failures seem unrelated. They're happening in |
javiercn
reviewed
Apr 11, 2023
src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.Compression.targets
Outdated
Show resolved
Hide resolved
javiercn
reviewed
Apr 11, 2023
src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.Compression.targets
Outdated
Show resolved
Hide resolved
javiercn
reviewed
Apr 11, 2023
src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.Compression.targets
Outdated
Show resolved
Hide resolved
javiercn
reviewed
Apr 11, 2023
javiercn
reviewed
Apr 13, 2023
| <RewriteCss | ||
| FilesToTransform="@(_ScopedCss)" | ||
| ToolAssembly="$(_StaticWebAssetsSdkToolAssembly)" | ||
| ToolAssembly="$(_StaticWebAssetsSdkRazorToolAssembly)" |
Member
There was a problem hiding this comment.
Is Razor needed for a reason here?
javiercn
reviewed
Apr 13, 2023
src/StaticWebAssetsSdk/Targets/Sdk.StaticWebAssets.CurrentVersion.targets
Show resolved
Hide resolved
javiercn
reviewed
Apr 13, 2023
javiercn
reviewed
Apr 13, 2023
javiercn
approved these changes
Apr 13, 2023
Member
javiercn
left a comment
There was a problem hiding this comment.
A few minor details, but otherwise looks great!
maraf
approved these changes
Apr 13, 2023
javiercn
approved these changes
Apr 14, 2023
radical
added a commit
that referenced
this pull request
Apr 19, 2023
- For blazor AOT, the blazor targets explicitly skip
`Microsoft.JSInterop.WebAssembly.dll` in `_GatherBlazorFilesToPublish` target.
- it is done by marking the assembly item in
`@(WasmAssembliesToBundle)` with `%(AOT_InternalForceToInterpret)="true"`.
- this target needs to run after `_GatherWasmFilesToPublish` which builds
the list of assemblies to AOT in `@(WasmAssembliesToBundle)`
- the order of these two targets was corrected in #31640
- but the changes in #31559 added the
target twice, resulting in the order:
`_GatherBlazorFilesToPublish;_GatherWasmFilesToPublish;_GatherBlazorFilesToPublish`
1. in which the first `_GatherBlazorFilesToPublish` tries to remove
the assembly from an empty list
2. then `_GatherWasmFilesToPublish` populates the list
3. and the last instance of `_GatherBlazorFilesToPublish` target
doesn't run because it has already run before in (2).
- thus the assembly never gets removed from the list.
Fixes: dotnet/runtime#85010
radical
added a commit
that referenced
this pull request
Apr 19, 2023
- For blazor AOT, the blazor targets explicitly skip `Microsoft.JSInterop.WebAssembly.dll` in `_GatherBlazorFilesToPublish` target. - it is done by marking the assembly item in `@(WasmAssembliesToBundle)` with `%(AOT_InternalForceToInterpret)="true"`. - this target needs to run after `_GatherWasmFilesToPublish` which builds the list of assemblies to AOT in `@(WasmAssembliesToBundle)` - the order of these two targets was corrected in #31640 - but the changes in #31559 added the target twice, resulting in the order: `_GatherBlazorFilesToPublish;_GatherWasmFilesToPublish;_GatherBlazorFilesToPublish` 1. in which the first `_GatherBlazorFilesToPublish` tries to remove the assembly from an empty list 2. then `_GatherWasmFilesToPublish` populates the list 3. and the last instance of `_GatherBlazorFilesToPublish` target doesn't run because it has already run before in (2). - thus the assembly never gets removed from the list. Fixes: dotnet/runtime#85010
MackinnonBuck
added a commit
that referenced
this pull request
May 8, 2023
This was referenced Sep 1, 2023
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.
Move asset compression to the StaticWebAssets SDK
This PR moves the asset compression feature from the BlazorWebAssembly SDK to the StaticWebAssets SDK.
List of major changes
StaticWebAssetdefinitions before the actual compression happens.AssetsToCompressitem groupStaticWebAssetitems have been addedResolveCompressedAssetstaskBrotliCompressandGZipCompresstasks toM.NET.Sdk.StaticWebAssets.Tasksand updated them accordinglyComputeBlazorFilesToCompresstask and its corresponding tests.Fixes dotnet/aspnetcore#46998