Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GenerateScopedCss: CompileSass task hangs if 50 or more SCSS files have to get compiled #71

Closed
adiessl opened this issue Apr 28, 2022 · 1 comment · Fixed by #72
Closed

Comments

@adiessl
Copy link
Contributor

adiessl commented Apr 28, 2022

Describe the bug

If AspNetCore.SassCompiler is used in a project that has at least 50 SCSS files that have to be compiled it cannot be built.

To Reproduce

Steps to reproduce the behavior

Checkout the following repository: https://github.com/adiessl/SassCompilerTest

dotnet build .\BlazorApp\BlazorApp.csproj --> 50 of 250 SCSS files get compiled, then it hangs

Attempting to stop the build via Ctrl + C does not work, gives the following output:

Attempting to cancel the build...
C:\Users\{UserName}\.nuget\packages\aspnetcore.sasscompiler\1.51.0\build\AspNetCore.SassCompiler.targets(7,5): warning MSB4220: Waiting for the currently executing task "CompileSass" to cancel. [C:\{PathToRepo}\SassCompilerTest\BlazorApp\BlazorApp.csproj]

Killing the process dart.exe via Task Manager makes the build fail eventually.

dotnet build .\BlazorApp\BlazorApp.csproj --> another 50 SCSS files get compiled, then it hangs again.

Stopping the build has to be done the same way than above.


Remarks

  1. Via Process Explorer one can find out that dart.exe is called as follows:

    "C:\Users\{UserName}\.nuget\packages\aspnetcore.sasscompiler\1.51.0\build\..\runtimes\win-x64\src\dart.exe" "C:\Users\{UserName}\.nuget\packages\aspnetcore.sasscompiler\1.51.0\build\..\runtimes\win-x64\src\sass.snapshot" --style=expanded --no-source-map --no-error-css --stop-on-error --no-unicode Components --update
    

    Executing this command directly via PowerShell for example compiles all 250 SCSS files without a problem.

  2. Deleting 201 components with their SCSS files makes the build succeed. That means ...

    • ... 49 components: build succeeds.
    • ... 50 components: build hangs

Expected behavior

The compilation should work and the build should continue.

System info

dotnet --info

.NET SDK (reflecting any global.json):
 Version:   6.0.202
 Commit:    f8a55617d2

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19044
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.202\

Host (useful for support):
  Version: 6.0.4
  Commit:  be98e88c76
@adiessl
Copy link
Contributor Author

adiessl commented Apr 28, 2022

I debugged it and found the solution, see PR #72.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant