johan-v-r / LibSassBuilder

Sass builder for .NET projects
MIT License
98 stars 14 forks source link

2.0.3 build fails on Ubuntu - tool/LibSassBuilder: not found #59

Closed centreboard closed 1 year ago

centreboard commented 1 year ago

We have a .NET 6 project that is build on both Windows and Ubuntu agents in Azure Devops. On updating from 2.0.2 to 2.0.3 the windows build is fine while the ubuntu build now fails:

/usr/bin/sh: 2: /tmp/MSBuildTempvsts/tmp58991d4476b74471866cdfb25fa0278f.exec.cmd: /home/vsts/.nuget/packages/libsassbuilder/2.0.3/build/../tool/LibSassBuilder: not found

[error]/home/vsts/.nuget/packages/libsassbuilder/2.0.3/build/LibSassBuilder.targets(95,5): Error MSB3073: The command ""/home/vsts/.nuget/packages/libsassbuilder/2.0.3/build/../tool/LibSassBuilder" files "[a series of .scss files]" --outputstyle compressed --level default " exited with code 127.

/home/vsts/.nuget/packages/libsassbuilder/2.0.3/build/LibSassBuilder.targets(95,5): error MSB3073: The command ""/home/vsts/.nuget/packages/libsassbuilder/2.0.3/build/../tool/LibSassBuilder" files "[a series of .scss files]" --outputstyle compressed --level default " exited with code 127.

I assume this is due to changes in #41

johan-v-r commented 1 year ago

@JelleHissink any thoughts here?

JelleHissink commented 1 year ago

Hmm, I tried to reproduce it. When I built libsassbuilder tool on linux I got an executable without extension. However in the package there is LibSassBuilder with the .exe extension. It is not part of the build output of this PR.

When the tool was compiled using ubuntu it did not have a file extension (build in PR #41, https://github.com/johan-v-r/LibSassBuilder/pull/41/checks ). When I open the .nupkg file however I only get the .exe output, that will only run on windows. I noticed the release build used a windows build agent. That produced only a LibSassBuilder.exe, that file is not compatible with linux however. So I am a bit at a loss on how this while build pipeline works. What do you normally do to release a version? Where can I get the output of the pipeline? Can I download the .nupkg of the builds somewhere?

johan-v-r commented 1 year ago

I publish the artifact from my Publish GitHub Action - you can download it here, or just inspect the download from NuGet.

The same package needs to be runnable on all 3 OS - so it gets built (dotnet publish) without a specific RID.

JelleHissink commented 1 year ago

I understand the requirement to be able to run it on any os. I don't have time today, but I was planning to make some time to invest in the whole build experience for LibSassBuilder, I will put this on top of my list. My hope is if we get this build integration in VS and build pipeline better this would transfer to LibDartBuilder later without major issues.

JelleHissink commented 1 year ago

I made some time anyway, because I don't like people running into issues because of this

johan-v-r commented 1 year ago

Thanks Jelle! I have unlisted and deprecated v2.0.3 - will review & publish that new change soon

johan-v-r commented 1 year ago

@centreboard can you please test with latest v2.1.0?

centreboard commented 1 year ago

Thanks @JelleHissink and @johan-v-r

v2.1.0 builds on both Windows and Ubuntu agents for us.