-
Couldn't load subscription status.
- Fork 29
Description
Describe the bug
Please see #218 for context
That PR fixed a race condition that could lock input/output files when dart-sass was running concurrently.
For example when dotnet packing a multi-targeted build.
By adding the mutex it seems that although the race condition with regards to file locking is fixed, ocassionally the css was not included in dotnet pack. It appears depending on which framework was building the css it might not get included.
I am assuming this is due to the --update flag of dart sass which will result in no stdout when building the scss --> css a second time.
Also related #178
My theory is that this behaviour is to do with the logic that msbuild uses to pickup the staticwebassets for packing in a Blazor library.
Presumably the way in which the staticwebassets is determined is somehow tied to one of the frameworks in a multi-target library.
To test this theory I set our project to unconditionally add MudBlazor.min.css after SassCompiler had run.
See MudBlazor/MudBlazor#10643
To Reproduce
Steps to reproduce the behavior:
-
Download HEAD of MudBlazor (uses SassCompiler 1.83.0 no mutex)
-
Always includes
MudBlazor.min.cssindotnet pack -
Update SassCompiler package to 1.83.1
-
Sometimes omits
MudBlazor.min.cssindotnet pack -
Download Build: Fix for missing MudBlazor.min.css in SassCompiler MudBlazor/MudBlazor#10643
-
Always includes
MudBlazor.min.cssindotnet pack
Expected behavior
Always includes MudBlazor.min.css in dotnet pack
Solution
Determine output css from sasscompiler.json. And always include in the Content Items. For folders this would require a bit of logic.
I can do a PR if required.