!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

123 Members
23 Servers

Load older messages


SenderMessageTime
18 May 2025
@6pak:matrix.org6pakwhat is your actual case?22:48:21
@6pak:matrix.org6pakis the global.json pinning a exactly specific version?22:48:32
@6pak:matrix.org6pakor just the major/feature band22:48:39
@whovian9369:matrix.orgWhovian9369Specific version22:48:49
@whovian9369:matrix.orgWhovian9369
$  PAGER= nix log .#git
warning: Git tree '/home/whovian/.flakes/aaru' is dirty
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/czn1ndgzbim47hr5yaqsaagns42854yp-source
source root is source
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: configureNuget
@nix { "action": "setPhase", "phase": "configureNuget" }
The command could not be loaded, possibly because:
  * You intended to execute a .NET application:
      The application 'new' does not exist.
  * You intended to execute a .NET SDK command:
      A compatible .NET SDK was not found.

Requested SDK version: 9.0.100
global.json file: /build/source/global.json

Installed SDKs:
9.0.203 [/nix/store/j7w50zcrv5rybkj23vqw062zry8gn1wx-dotnet-sdk-9.0.203/share/dotnet/sdk]

Install the [9.0.100] .NET SDK or update [/build/source/global.json] to match an installed SDK.

Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found
22:48:59
@6pak:matrix.org6pakI'd just rm the global.json22:49:32
@6pak:matrix.org6pakassuming the build still works on 9.0.2xx22:49:42
@whovian9369:matrix.orgWhovian9369 My flake is https://github.com/Whovian9369/aaru-nix-flake (Updating it which is why I'm encountering this)
Upstream is https://github.com/aaru-dps/Aaru
global.json was introduced with https://github.com/aaru-dps/Aaru/commit/8ee0926210df8e3a443456b567e17ad6f319125f
22:50:07
@6pak:matrix.org6pakthat global.json doesn't make much sense22:50:55
@6pak:matrix.org6pak it would be better to rollForward=latestPatch (aka 9.0.1xx instead) to still receive bug fixes while avoiding bumping the feature band 22:52:07
@6pak:matrix.org6pak * it would be better to rollForward=latestPatch (aka 9.0.1xx) to still receive bug fixes while avoiding bumping the feature band 22:52:16
@6pak:matrix.org6pak * it would be better to rollForward=latestPatch (aka 9.0.1xx) to still receive bug fixes assuming avoiding the feature band bump was the intention 22:53:01
@whovian9369:matrix.orgWhovian9369Are you saying in respect to what Upstream should do, or what I should do for my Nix packaging?22:53:28
@6pak:matrix.org6pakwhat upstream should do22:53:50
@6pak:matrix.org6pakyou probably should just ^22:53:57
@6pak:matrix.org6pakglobal.json doesn't really matter because you specify the sdk version in nix anyway22:54:26
@6pak:matrix.org6pak and if the build really breaks (or anything other unwanted) on 9.0.2xx, just specify sdk_9_0_1xx in nix 22:55:07
@whovian9369:matrix.orgWhovian9369

I imagine this would still be an issue with rollForward=latestPatch due to our dotnet version being newer, but I'd agree (from my non-programming background) that it sounds like a reasonable suggestion.

$  nix develop .#git
warning: Git tree '/home/whovian/.flakes/aaru' is dirty

[whovian@nixos-wsl:~/.flakes/aaru]$ dotnet --version
9.0.203
22:55:26
@6pak:matrix.org6pak * and if the build really breaks (or anything other unwanted happens) on 9.0.2xx, just specify sdk_9_0_1xx in nix 22:55:31
@whovian9369:matrix.orgWhovian9369Cool, thank you very much!22:55:33
@6pak:matrix.org6pak you'd specify sdk_9_0_1xx then, yeah 22:56:16
@whovian9369:matrix.orgWhovian9369Thank you for the thoughts!22:57:15
@6pak:matrix.org6pak fyi (at least for now) the 1xx feature band is supported for the whole .net version lifetime 22:57:15
@6pak:matrix.org6pak while 2xx and 3xx get EOLed until you land on 4xx 22:57:27
@whovian9369:matrix.orgWhovian9369That seems interesting.22:57:59
@6pak:matrix.org6pak because source build officially supports only 1xx 22:58:36
@6pak:matrix.org6pakso newer feature bands are MS binaries only22:58:51
@6pak:matrix.org6pak* so later feature bands are MS binaries only22:58:58
@whovian9369:matrix.orgWhovian9369
  patchPhase = ''
    # Remove global.json to prevent build issues stemming from its existence.
    # We're pinning to an SDK version by using Nix anyway, so it's not super
    # important to worry about Upstream's set version.
    rm global.json
'';

So this seems to have worked fine. Thank you again for the thoughts!

23:10:35
@whovian9369:matrix.orgWhovian9369That's very interesting. Thank you for the thoughts!23:10:47

Show newer messages


Back to Room ListRoom Version: 9