!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

125 Members
23 Servers

Load older messages


SenderMessageTime
19 Dec 2024
@gggkiller:matrix.orgGGGthat's pretty fucked up12:28:13
@6pak:matrix.org6pak * I thought that when I add nuget.org first then all the regular dependencies will be official12:28:54
20 Dec 2024
@whovian9369:matrix.orgWhovian9369

Hey gang, me again :P Anyone up for helping me troubleshoot dotnet stuff that I brought up yesterday? I'm having issues with the lts output of https://github.com/Whovian9369/aaru-nix-flake

Log showing the issue: https://termbin.com/kq8r

21:28:53
@whovian9369:matrix.orgWhovian9369 *

Hey gang, me again :P Anyone up for helping me troubleshoot dotnet stuff that I brought up recently? I'm having issues with the lts output of https://github.com/Whovian9369/aaru-nix-flake

Log showing the issue: https://termbin.com/kq8r

21:31:22
23 Dec 2024
@corngood:corngood.comCorngoodIt looks like it's some sort of incompatibility with EntityFramework. Do you know which the upstream project was meant to build with?00:43:00
@corngood:corngood.comCorngood* It looks like it's some sort of incompatibility with EntityFramework. Do you know which SDK the upstream project was meant to build with?00:43:11
@whovian9369:matrix.orgWhovian9369 (Good timing, I was just about to close Element, haha.)
iirc upstream's LTS (v5.3.2) is meant to build with netcoreapp3.1, but can be forced into playing nice with Net 7 by swapping out the TargetFramework with the wanted version
00:45:07
@whovian9369:matrix.orgWhovian9369 Which I do to multiple csproj in the flake via substituteInPlace at https://github.com/Whovian9369/aaru-nix-flake/blob/620ef8866395544b5aad55b7dac83fa63a988731/lts.nix#L58-L78 00:46:01
@whovian9369:matrix.orgWhovian9369(I remember consulting the upstream dev at the time, and that's what was suggested.)00:47:02
@6pak:matrix.org6paktry updating efcore00:47:18
@whovian9369:matrix.orgWhovian9369Sorry, what's efcore?00:49:03
@6pak:matrix.org6pakEntityFrameworkCore, the package that's crashing in your log00:49:24
@whovian9369:matrix.orgWhovian9369Ah I'll try to look into how to do that. Thank you for the suggestion!00:50:15
@corngood:corngood.comCorngoodWell judging by the lock file it seems to be using the same version as pre release. So if anything I think maybe it was meant to work with an older version?00:51:01
@6pak:matrix.org6pakwait why does it reference both ef6 and efcore00:51:38
@6pak:matrix.org6pak it doesn't 00:52:41
@6pak:matrix.org6paklts uses 3.1, prerelease uses 7.000:52:46
@6pak:matrix.org6pak * lts uses 3.1.5, prerelease uses 7.0.100:53:01
@6pak:matrix.org6pakthe ef6 reference is just for decoration I guess00:53:23
@corngood:corngood.comCorngoodAh, I was looking at `pname = "EntityFramework"; version = "6.4.4"`00:53:47
@corngood:corngood.comCorngoodI'm not familiar with these packages at all. I also don't remember what happened when it was left targeting netcoreapp3.1. that should be possible with a newer sdk, right?00:54:53
@whovian9369:matrix.orgWhovian9369I'll see if I can play around with any of this at some point. Thank you both so much for the thoughts!01:05:25
@whovian9369:matrix.orgWhovian9369
  patchPhase = ''
    # Fix Net build
    substituteInPlace \
      "Aaru/Aaru.csproj" \
      "Aaru.Database/Aaru.Database.csproj" \
      --replace-fail 'Version="3.1.5"' 'Version="7.0.1"'

    substituteInPlace \
      "Aaru.Database/Aaru.Database.csproj" \
      --replace-fail 'Version="1.1.6"' 'Version="2.0.0-preview1-final"'
  '';

So this worked!

$  aaru --version
Creating main database
Adding USB vendors
Added 3410 usb vendors
Adding USB products
Added 19812 usb products
Adding CompactDisc read offsets
Added 4630 CompactDisc read offsets
Adding known devices
Added 354 known devices
Saving changes...
In compliance with the European Union General Data Protection Regulation 2016/679 (GDPR),
we must give you the following information about Aaru and ask if you want to opt-in
in some information sharing.
...
...
5.3.2.0+f4fef21d

$  aaru --version
5.3.2.0+f4fef21d
03:50:00
@whovian9369:matrix.orgWhovian9369 (I removed a bunch from patchPhase for the above example) 03:53:18
@gggkiller:matrix.orgGGG I'd recommend using patch files whenever possible instead of substituteInPlace 03:58:38
@gggkiller:matrix.orgGGGbut if you've ensured that it only changes the versions of what you want then it should be fine03:59:01
@whovian9369:matrix.orgWhovian9369That's a good tip, thanks03:59:59
@whovian9369:matrix.orgWhovian9369
$  cd "$(nix eval --raw .#lts.src.outPath)"
$  rg -F 'Version="1.1.6"'
Aaru.Database/Aaru.Database.csproj
48:    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="1.1.6"/>
$  rg -F 'Version="3.1.5"'
Aaru/Aaru.csproj
167:    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.5" />

Aaru.Database/Aaru.Database.csproj
45:    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.5"/>
46:    <PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="3.1.5"/>
47:    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.5"/>

As far as I can tell, the only things that I'm changing are what I intend to, so I should be good.

04:01:22
@whovian9369:matrix.orgWhovian9369 (Honestly I just prefer substituteInPlace since it leaves a cleaner directory, but honestly I should just use patch files instead since that will make the actual derivation cleaner.) 04:02:14
@gggkiller:matrix.orgGGGI myself prefer patch files because they ensure that things break if the file isn't the same anymore04:02:34

Show newer messages


Back to Room ListRoom Version: 9