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
dotnet-sdk_3: init at 3.0.100 #69392
Conversation
I tested the patch, but building a simple app results in:
I get the same error with both I also tried overriding
The failure of Under Windows everyting works. |
Interesting, I'll take a look at it. Thanks for reviewing @juselius |
Is the source open? i would like to debug this |
31088b1
to
c397835
Compare
I was able to build a few sample projects, the only problem is that it's currently limited in the the number of target frameworks that it supports:
|
I have the following issue when using dotnet-sdk_3 from this pull request: I copied the dotnet installation folder, applied the proposed |
The problem is that it just has the newest frameworks, if you have the older v2 frameworks, then it will try to write the frameworks at Since nixpkgs installs at a readonly path, then it doesn't work. |
I now have a fully working dotnet-sdk for .NET Core 3.0.100 available at https://github.com/juselius/nixpkgs/blob/dotnet-sdk-3/pkgs/development/compilers/dotnet/sdk/3.nix. It's a bit of an ugly hack, but it works. The main problem is that dotnet wants copy, and locally modify the "apphost" binary into the obj directory. If apphost is copied with read-only permissions from the store, the build fails since the binary cannot be modified. The solution is to wrap the dotnet binary with a script which points DOTNET_ROOT to a local sdk in I should point out that I have only tested with netcoreapp3.0 and netstandard2.0. |
it's unfortunate that's the case, but i guess in most FHS systems, this wouldn't be an issue |
the most proper thing would probably be to use makeFHSenv and let it do it's thing in a sandbox |
Perhaps. I'm not a super fan of FHSenv, but I can give it a try. |
No luck with
|
interesting... not the error i was expecting to see |
I tried building a more substantial project using my homedir hack, and again it failed with permission denied trying to create AppHost. When I copy the whole sdk directory to $HOME/.dotnet/sdk, and run |
I think FHS is a dead end. Even if we could work past the runtime errors, everything is still installed RO, which causes the CreateAppHost target to fail. I'm starting to think that patching the dotnet sources is the only real option. Here is the latest (fully working) netcore3.0 hack: https://github.com/juselius/nixpkgs/blob/dotnet-sdk-3/pkgs/development/compilers/dotnet/sdk/3.nix |
Copying the entire directory to a tmp directory each invocation is unacceptable to me. There must be another solution. |
It seems some of the underlying issues will get fixed in 3.1 (fingers crossed). I'll settle for this solution for now, since it allows me to do my job. But I really dislike the situation. |
I think I'll keep this open until 3.1, then bump it. For now I would just use an overlay as I don't feel comfortable with this going into mainline nixpkgs for the time being. |
I totally agree. Anyone in need of version 3 can just pop the configs from here. |
I also agree with postponing the SDK release. |
@felschr have you tried updating it? I don't have any experience with |
@juselius @jonringer There is now a preview of 3.1 available. Can you please check if the issues are fixed? Another note: Would it make sense to move common code to |
I would much rather wait for a stable release instead of adding something, then potentially breaking people when they bump |
Hi @jonringer, would you by any chance want to become a maintainer for dotnet in nixpkgs? More specifically these ones:
I had long moved to a completely different tech stack which is not making me a good maintainer for these packages. Please consider taking it over. |
I work at microsoft, so it's likely that I will need to use dotnet soon. I probably will in time. |
3.1 has been released a week ago, can we update this PR please? |
I'm probably going to close this in favor of #73262, solves the issue of the default installation not being able to install different sdks. I think there was supposed to be a fix in 3.1 to use a local directory, but haven't verified if this is has been fixed |
closing in favor of #73262 |
Motivation for this change
https://devblogs.microsoft.com/dotnet/announcing-net-core-3-0/
leaving the previous dotnet-sdk as everything that use the dotnet-clr will likely need it still.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @