bitplatform icon indicating copy to clipboard operation
bitplatform copied to clipboard

Make solution compile-able on MacOS

Open linkdotnet opened this issue 3 years ago • 6 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

The current solution is in .net6.0, but it cannot be built on MacOS (and presumably Linux).

The reason for this is the package BuildWebCompiler2022 which is only available in .netcoreapp3.1 and not .net6.0. Furthermore, the package tries hard to access "cmd.exe", which of course is not available on MacOS, nor on Linux.

Describe the solution you'd like

The solution would replace BuildWebCompiler2022 with platform-independent solution.

Additional context

image

linkdotnet avatar Aug 03 '22 07:08 linkdotnet

@linkdotnet thanks for submitting this issue. it seems the nuget package that we are using for compiling .scss files (BuildWebCompiler2022) is only for Windows. we need to investigate it and find a proper solution.

msynk avatar Aug 03 '22 09:08 msynk

Part of the issue has been resolved by #2893

ysmoradi avatar Aug 04 '22 11:08 ysmoradi

Small input from my side as I fiddled around on my MAC: This seems a potential candidate: https://github.com/koenvzeijl/AspNetCore.SassCompiler

The problem with LibSassBuilder (cc @ysmoradi) is that it does not support arm64 architecture (issue gets tracked here). There is a newer version DartSassBuilder but this seems to have a high risk of not being maintained very long.

linkdotnet avatar Aug 07 '22 12:08 linkdotnet

We rely on BuildWebCompiler2022+ in the following scenarios: 1- Building CSS files from SASS files 2- Minifying JavaScript output of the TypeScript compiler To make the solution compilable on Mac / Linux, we need replacement(s) for both usages


At the moment, we've removed javascript minification from our project templates (TodoTemplate and AdminPanel), and we've replaced BuildWebCompiler2022+ with LibSassBuilder so we do expect people would be able to build our project templates on all operating systems.


Note that ProjectTemplates and even Bit Blazor UI demo project (Called Playground) have an App project which is a blazor hybrid project and at the moment, you've to unload that and we don't have a short-term plan to support blazor hybrid in IDE/Platform other than VIsual Studio / Windows


P.S. It seems that LibSassBuilder itself won't work on new mac devices as you mentioned before. I can create a temporary branch that contains project templates with DartScssBuilder so we can make sure that project templates are good to go


For Bit Blazor UI and its demo project, we need to figure out what is/are replacement(s) for BuildWebCompiler2022+ that fulfill our requirements (javascript minification and SASS to CSS compilation)

@linkdotnet

ysmoradi avatar Aug 07 '22 15:08 ysmoradi

Thanks for the input @ysmoradi.

Please don't consider this with urgency. Seems like not that many people have that problem and for my part, I do have a spare windows notebook. So that is more of a luxury problem ;)

linkdotnet avatar Aug 07 '22 15:08 linkdotnet

Note that projects that are being created using bit project templates are now compilable on all platforms thanks to Abstractions Sass Compiler nuget package Need more work on Bit Blazor UI & its demo project

ysmoradi avatar Sep 11 '22 06:09 ysmoradi

Closed by #4529

ysmoradi avatar Jun 14 '23 13:06 ysmoradi