!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

122 Members
23 Servers

Load older messages


SenderMessageTime
5 Dec 2024
@corngood:corngood.comCorngood it looks like it's targeting 8.0.1 explicitly or something? 23:59:26
6 Dec 2024
@corngood:corngood.comCorngoodweird https://github.com/vrc-get/vrc-get/blob/af1eee8c46e2bf7f0427a2dc5bac7b1bc99e039b/vrc-get-litedb/dotnet/vrc-get-litedb.csproj#L600:00:21
@gggkiller:matrix.orgGGGdoesn't seem to be the case00:01:47
@gggkiller:matrix.orgGGGoh nvm00:02:07
@gggkiller:matrix.orgGGG $(RuntimeFrameworkVersion) and <RuntimeFrameworkVersion>8.0.1</RuntimeFrameworkVersion> 00:02:14
@corngood:corngood.comCorngood

needs something like:

    dotnetFlags = [ "-p:RuntimeFrameworkVersion={dotnetCorePackags.runtime_8_0}" ];
00:02:43
@gggkiller:matrix.orgGGGprobably00:02:49
@gggkiller:matrix.orgGGGI also kinda regret using the maintainer upgrade script00:03:26
@corngood:corngood.comCorngood *

needs something like:

    dotnetFlags = [ "-p:RuntimeFrameworkVersion=${dotnetRuntime.version}" ];
00:03:33
@gggkiller:matrix.orgGGG should've made a quick bash script that runs nix eval --impure --json --expr 'import ./pkgs/by-name/ro/roslyn/deps.nix {fetchNuGet = id: id;}' | jq . > deps.json 00:03:34
@gggkiller:matrix.orgGGG * should've made a quick bash script that runs nix eval --impure --json --expr 'import ./deps.nix {fetchNuGet = id: id;}' | jq . > deps.json 00:03:52
@gggkiller:matrix.orgGGGso many packages have eval errors on master that I'm gonna have to do it manually for a lot of them anyways00:04:10
@6pak:matrix.org6pak
In reply to @lostmsu:matrix.org
Hey guys, I'm trying to see if there's a way to improve experience with C# code that has any kind of native dependencies (hi Avalonia).

Would love you to chime in before I jumped to experimentation: https://github.com/NixOS-NET/Nix.NET/issues/1
one idea I suggested before is making an IL patcher that patches all DllImport/NativeLibrary/dlopen uses and/or injects a DllImportResolver
15:36:55
@6pak:matrix.org6paksimilar to patchelf15:36:59
7 Dec 2024
@gggkiller:matrix.orgGGG the issue with that is NativeLibrary, it uses a dynamic string so we can't just detect what it's doing 21:57:18
@gggkiller:matrix.orgGGGsure, this isn't in C#, but still in .NET, look at this: https://github.com/dotnet/dotnet/blob/083e05a29d2b88f0d42bbca8f0b7ab33f4cfb7ab/src/runtime/src/native/libs/System.Security.Cryptography.Native/opensslshim.c#L67-L15721:57:53
@gggkiller:matrix.orgGGG However, even if it's just DllImport, I think it'd be beneficial to have it. And since we'll be scanning the source code anyways, we could change NativeLibrary calls with static strings and have an option to emit warnings for ones with dynamic ones (for debugging/packaging) 22:08:06
@gggkiller:matrix.orgGGGAfter I'm done with 361450 and 362278 I'll look into it.22:08:38
@gggkiller:matrix.orgGGGAlso, god, I can't wait for CA derivations, having to rebuild thousands of packages because of my changes that shouldn't affect anything in 361450 is becoming a major paint22:19:37
@gggkiller:matrix.orgGGG * Also, I can't wait for CA derivations, having to rebuild thousands of packages because of my changes that shouldn't affect anything in 361450 is becoming a major paint22:27:11
@gggkiller:matrix.orgGGG * Also, I can't wait for CA derivations, having to rebuild thousands of packages because of my changes that shouldn't affect anything in 361450 is becoming a major pain22:27:21
@6pak:matrix.org6pak
In reply to @gggkiller:matrix.org
the issue with that is NativeLibrary, it uses a dynamic string so we can't just detect what it's doing
that's where "injects a DllImportResolver" would come in
23:13:11
@6pak:matrix.org6pak and if it's a simple NativeLibrary.Load("static string") we can detect that easily 23:14:24
@gggkiller:matrix.orgGGGregistering a resolver would be a major pain though, since it has to be done per assembly23:16:56
@gggkiller:matrix.orgGGGwe could do it, but it'd be very annoying23:17:01
@gggkiller:matrix.orgGGGI think for dynamic libraries it's just easier to edit the LD_PRELOAD_PATH and/or RPATH of the apphost23:19:23
@gggkiller:matrix.orgGGGthough I understand that'd be annoying for libraries23:20:21
@6pak:matrix.org6pak
In reply to @gggkiller:matrix.org
registering a resolver would be a major pain though, since it has to be done per assembly
but it also means you can safely inject a native dep to a nuget dependency knowing it wont break anything else
23:20:48
@gggkiller:matrix.orgGGGtrue, but for multi-assembly packages it'd become annoying I assume23:22:16
@6pak:matrix.org6pakI doubt multi assembly packages will dynamically load the same native lib in different managed assemblies23:23:01

Show newer messages


Back to Room ListRoom Version: 9