-
Notifications
You must be signed in to change notification settings - Fork 32
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
Proposal: Change the way of building native binaries #47
Comments
I was thinking about this yesterday when I was trying to build. What about just getting rid of the "AnyCPU" target and then just include the VC++ project directly? Still requires more than one build for full packaging, but builds quicker. |
@nschonni That's how it did it in the past, but it really makes the nuget packaging story pretty painful for downstream libraries that then had to split their packages into x86/x64 versions as well. |
Fair enough, looking at https://www.nuget.org/packages/Microsoft.TeamFoundationServer.ExtendedClient looks like they still use a |
@nschonni, I guess TFS package might not be the good example as it is tied to Windows and only supports full .NET Framework. For example, compare the Speaking of which if we search for S.IO.C: https://www.nuget.org/packages?q=System.IO.Compression we will find sea of packages starting with There is a well defined convention to get all this packaging done automatically by Nuget and then Nuget resolves the dependency from most specific to most general at restore time based on the target's RID (runtime ID). For example, like node-sass if we build Linux binary on CentOS, then we don't need to specialize RID for Fedora and MintOS etc. But in case of Alpine Linux, we would want to create a separate package as Alpine uses musl-libc instead of glibc etc. A lot of stuff that we were doing by hand in node-sass is handled by the latest Nuget (v4 is in RC stage), just need to follow few conventions (basically by mimicking how they are handling stuff in CoreFX, SDK and Core-Setup repos of dotnet organization). :) |
Makes sense, I'm looking at the base build right now since it's not compiling for me. I won't try anything to do with Core though 😉 |
Lol, I just wanted to have general feeling whether building for current-platform-only based on solution configurations. will submit a PR today or by tomorrow. :) |
Added an inline MSBuild task, which make use of a new CoreFX API `System.Runtime.InteropServices.RuntimeInformation` to obtain OS description and architecture information, then translates into `LibSassPlatform` (Win32 or Win64 etc.). Also added ability to cross compile, e.g. Win32 on 64-bit system. Additional OSes will be added with .NET Core support. Fixes sass#47.
Added an inline MSBuild task, which make use of a new CoreFX API `System.Runtime.InteropServices.RuntimeInformation` to obtain OS description and architecture information, then translates into `LibSassPlatform` (Win32 or Win64 etc.). Also added ability to cross compile, e.g. Win32 on 64-bit system. Additional OSes will be added with .NET Core support. Fixes sass#47.
Added an inline MSBuild task, which make use of a new CoreFX API `System.Runtime.InteropServices.RuntimeInformation` to obtain OS description and architecture information, then translates into `LibSassPlatform` (Win32 or Win64 etc.). Also added ability to cross compile, e.g. Win32 on 64-bit system. Additional OSes will be added with .NET Core support. Fixes sass#47.
Currently we are compiling both x64 and x86 libsass binaries (solution) build.
This needs to change in such a way that we compile only one binary for the given set of configuration with constant name (
libsass
) and avoid copying binaries around.This will help us when we build against other platform such as Linux and OSX.
node-sass has also this way of compiling one binary per build.
@darrenkopp,
This is the first step towards .NET Core support.
NuGet packaging would be also easier for multiple operating system, as it requires the same name but create the OS+Arch specific directory. Note that there is a platform inheritance involved in latest NuGet packaging when dealing with native binaries. For instance, Alpine Linux x64 inherits Linux x64, which has a sibling Linux x86 and parent Linux, which has Unix as parent and OSX and FreeBSD etc. at sibling nodes. NuGet handles all this at restore time, if we follow the right convention to package the bins.
I have few ideas about packaging that I would like to try once we get there. :)
Thoughts?
The text was updated successfully, but these errors were encountered: