Skip to content

dotnet: migrate nuget lockfiles to JSON#362278

Merged
Atemu merged 8 commits into
NixOS:masterfrom
GGG-KILLER:nuget-lockfile-to-json
Dec 18, 2024
Merged

dotnet: migrate nuget lockfiles to JSON#362278
Atemu merged 8 commits into
NixOS:masterfrom
GGG-KILLER:nuget-lockfile-to-json

Conversation

@GGG-KILLER

@GGG-KILLER GGG-KILLER commented Dec 6, 2024

Copy link
Copy Markdown
Contributor

This changes the buildDotnetModule lockfiles to be JSON instead of Nix.

Changes were made in a backwards-compatible fashion, however a warning was added to guide users to migrate to the new format.

Existing in-tree packages were migrated to the new format using a helper script and manual changes for places that didn't have the file directly specified.

cc: @NixOS/dotnet @MattSturgeon @UlyssesZh @TomaSajt @SuperSandro2000 @Atemu

Closes #362182, closes #325053.
Fixes #358025.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions Bot added 6.topic: python Python is a high-level, general-purpose programming language. 8.has: documentation This PR adds or changes documentation 6.topic: games Gaming on NixOS 6.topic: dotnet Language: .NET labels Dec 6, 2024
@nix-owners nix-owners Bot requested review from RaghavSood and mmahut December 6, 2024 02:00
@GGG-KILLER GGG-KILLER force-pushed the nuget-lockfile-to-json branch from 466c5b9 to f7e34db Compare December 6, 2024 02:01
@GGG-KILLER GGG-KILLER changed the title Migrate NuGet lockfiles to JSON dotnet: migrate nuget lockfiles to JSON Dec 6, 2024
@GGG-KILLER GGG-KILLER force-pushed the nuget-lockfile-to-json branch from f7e34db to a91a587 Compare December 6, 2024 02:06
@github-actions github-actions Bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Dec 6, 2024
@GGG-KILLER GGG-KILLER force-pushed the nuget-lockfile-to-json branch from a91a587 to 4996549 Compare December 6, 2024 02:14
@github-actions github-actions Bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. and removed 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Dec 6, 2024
@GGG-KILLER GGG-KILLER force-pushed the nuget-lockfile-to-json branch from 4996549 to a29b4ca Compare December 6, 2024 02:44
@GGG-KILLER

This comment was marked as outdated.

@github-actions github-actions Bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. and removed 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Dec 6, 2024

@MattSturgeon MattSturgeon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial minor questions/suggestions. Thanks for working on this, it's looking good from my perspective!

Comment thread pkgs/build-support/dotnet/make-nuget-deps/default.nix Outdated
Comment thread pkgs/build-support/dotnet/make-nuget-deps/default.nix Outdated
Comment thread pkgs/by-name/nu/nuget-to-json/package.nix Outdated
Comment thread pkgs/build-support/dotnet/add-nuget-deps/default.nix Outdated
Comment thread pkgs/by-name/nu/nuget-to-json/nuget-to-json.sh Outdated
Comment thread pkgs/by-name/nu/nuget-to-json/nuget-to-json.sh Outdated
Comment thread pkgs/build-support/dotnet/make-nuget-deps/default.nix Outdated
Comment thread pkgs/by-name/nu/nuget-to-json/nuget-to-json.sh Outdated

@Atemu Atemu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small notes

Comment thread pkgs/build-support/dotnet/add-nuget-deps/default.nix Outdated
Comment thread pkgs/build-support/dotnet/add-nuget-deps/default.nix Outdated
Comment thread pkgs/build-support/dotnet/add-nuget-deps/default.nix Outdated
Comment thread pkgs/build-support/dotnet/add-nuget-deps/default.nix Outdated
@ofborg ofborg Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 6, 2024
Comment thread doc/languages-frameworks/dotnet.section.md Outdated
@UlyssesZh UlyssesZh mentioned this pull request Dec 7, 2024
13 tasks
@corngood

Copy link
Copy Markdown
Contributor

I disagree, because the change happened after 24.11 was released, so it doesn't make sense to me to be in its release notes.

I thought about that, but it looks like release notes have been updated recently for older releases.

@corngood

Copy link
Copy Markdown
Contributor

The only blocker for this really is combine-deps.nix, if that's changed to support JSON instead of nix files, we could already put it into practice.

Yeah, I'll try to do that at least for the next SDK updates.

@GGG-KILLER

Copy link
Copy Markdown
Contributor Author

The only blocker for this really is combine-deps.nix, if that's changed to support JSON instead of nix files, we could already put it into practice.

Yeah, I'll try to do that at least for the next SDK updates.

Thanks, sorry I didn't do it myself but I really don't feel confident to even attempt it. I feel like I'd just end up breaking everything instead 😅

@gepbird gepbird added the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 17, 2024
@GGG-KILLER GGG-KILLER force-pushed the nuget-lockfile-to-json branch from 7856eeb to 2b4190a Compare December 17, 2024 22:49
@GGG-KILLER GGG-KILLER removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 17, 2024

@corngood corngood left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good. I added the backport label even though it's almost certainly going to fail the automatic backport. I'm sure some of the treewide changes will backport, but we'll have to do a pass on the rest.

@corngood

Copy link
Copy Markdown
Contributor

Thanks for all the work on this. I'd like to merge it soon, but I just wanted to give anyone a last chance to raise an objection.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Dec 18, 2024
@Atemu

Atemu commented Dec 18, 2024

Copy link
Copy Markdown
Member

The backport will probably have to be done manually.

We could also opt to not backport the tree-wide (as the Nix files still work) but that'd necessitate every update backport for dotnet packages to be backported manually.

Given that we have nearly perfect QA for this (eval is the same), I don't see a great risk.

@Atemu Atemu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that every user involved in this thread reacted with a rocket, I think we're good to go ;)

@Atemu Atemu merged commit 83a5427 into NixOS:master Dec 18, 2024
@nixpkgs-ci

nixpkgs-ci Bot commented Dec 18, 2024

Copy link
Copy Markdown
Contributor

Backport failed for release-24.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-24.11
git worktree add -d .worktree/backport-362278-to-release-24.11 origin/release-24.11
cd .worktree/backport-362278-to-release-24.11
git switch --create backport-362278-to-release-24.11
git cherry-pick -x 1726304559622bcd20c8e3b7006b41a09bada599 3cc4563eb2f435ddc0da0a4a39f509a7ff7ffb7c bccae9e7c0f234d41ae7c9aebbaaf4f65a27282c c94c5087cc19cc8339e2c4b3e7a1546f6e990fcc 8ea76507abb96c2bdb971b4f7fdadebeea627324 318b37a8d6d1991369606455b4b446a34811f49f 1cd9516969553291792021f1b327f0e2e2775b3c 2b4190a2c20a7d33062f5806b0a0f879082b2340

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: dotnet Language: .NET 6.topic: games Gaming on NixOS 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: python Python is a high-level, general-purpose programming language. 8.has: changelog This PR adds or changes release notes 8.has: clean-up This PR removes packages or removes other cruft 8.has: documentation This PR adds or changes documentation 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nuget-to-nix: Generated file not formatted

6 participants