!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

126 Members
24 Servers

Load older messages


SenderMessageTime
10 Jan 2025
@gggkiller:matrix.orgGGGUnless if they're doing AOT14:22:03
@corngood:corngood.comCorngoodI agree that it's not very nix-like. I just don't think it's practical to avoid it completely.14:22:37
@gggkiller:matrix.orgGGGI mean, we can have an escape hatch, but I don't see a reason to provide first class support for it14:23:07
@corngood:corngood.comCorngoodI don't see what we gain by breaking it. Just removing those packages? We could make them opt-in without breaking it.14:24:05
@gggkiller:matrix.orgGGGNot really, it'd just avoid some overhead really 14:37:04
@gggkiller:matrix.orgGGGDon't know if it is significant enough to justify removing it14:40:22
@6pak:matrix.org6pakimo it should be possible to build self-contained apps with nix, so you can use nix as a build tool and distribute for non-nixos14:42:03
@6pak:matrix.org6pakbut none of the packages in nixpkgs should be self contained, yeah14:42:13
@6pak:matrix.org6pakand ideally the dependencies would be used from nix store aswell, not bundled14:42:39
@6pak:matrix.org6paknot removing the package itself14:42:58
@6pak:matrix.org6pakjust not outputting an apphost for buildDotnetModule apps in nixpkgs14:43:16
@6pak:matrix.org6pakwhich is just UseAppHost=false14:43:54
@6pak:matrix.org6pak and instead make our own "apphost" with makeBinaryWrapper that just dotnet execs the dll 14:44:14
@corngood:corngood.comCorngoodThe (non-self-contained) apphost is pretty lightweight, so what do we gain from that?14:45:46
@6pak:matrix.org6paktbf not much, but it's just unnecessary14:46:28
@6pak:matrix.org6pak the question about roslyn-ls is why it needs useDotnetFromEnv 14:46:53
@6pak:matrix.org6pak * the question about roslyn-ls was why it needs useDotnetFromEnv 14:47:03
@corngood:corngood.comCorngoodIt probably uses DOTNET_ROOT to find the available SDK(s).14:48:11
@corngood:corngood.comCorngood

and ideally the dependencies would be used from nix store aswell, not bundled

This is on my radar. I've experimented with msbuild options for symlinking outputs, so that they would link back to the package they came from. I had a lot of trouble with it though.

14:48:34
@corngood:corngood.comCorngood *

and ideally the dependencies would be used from nix store aswell, not bundled

This is on my radar. I've experimented with msbuild options for symlinking outputs, so that they would link back to the package they came from. I had a lot of trouble with it though.

edit: alternatively we could try to replace them after build, but that's not ideal.

14:49:15
@gggkiller:matrix.orgGGGTechnically, using the source built SDK we could patch nuget to link instead of copy, but I don't like having to maintain a patch set, feels like too much work15:01:35
@corngood:corngood.comCorngood It already has UseSymbolicLinksIfPossible etc. I just found that various things break when it's used. 15:04:10
@gggkiller:matrix.orgGGGHuh15:13:16
@gggkiller:matrix.orgGGGWeird, why would those break15:13:24
@gggkiller:matrix.orgGGGDoes it not copy the native libs?15:13:32
@corngood:corngood.comCorngoodI can't remember exactly. One problem with it is that nuget packages typically have a bunch of versions of things, and you're only linking to one of them, but pulling the whole package into the closure.15:14:26
@gggkiller:matrix.orgGGGOh yeah, the ones that have native libraries package the binaries for all runtimes15:18:15
@corngood:corngood.comCorngoodSome do. Some have dependent packages like skiasharp.native.linux, but there's also all the TFM variants of assemblies.16:04:17
@gggkiller:matrix.orgGGGI don't think there's much we can do without actually reproducing nuget's logic for restoring packages to know what will actually be used16:09:35
@gggkiller:matrix.orgGGGAnd even if we did, one package could use the net8.0 assembly and the other could use net7.016:10:14

Show newer messages


Back to Room ListRoom Version: 9