-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotnet-sdk_3: 3.1.19 -> 3.1.21 + dotnet-sdk_5: 5.0.10 -> 5.0.12 #142468
Conversation
8c4652e
to
8c27f5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10 packages failed to build:
discordchatexporter-cli eventstore github-runner msbuild omnisharp-roslyn osu-lazer python-language-server roslyn ryujinx wasabibackend
17 packages built:
azure-functions-core-tools btcpayserver depotdownloader dotnet-aspnetcore dotnet-runtime dotnet-sdk dotnet-sdk_3 dotnetCorePackages.aspnetcore_3_1 dotnetCorePackages.runtime_3_1 jellyfin jetbrains.rider nbxplorer
opentabletdriver prowlarr radarr vscode-extensions.ms-vsliveshare.vsliveshare wasabiwallet
As far as I can see all the errors, like the one below, are the same kind of dependency errors:
> /build/source/Ryujinx/Ryujinx.csproj : error NU1102: Unable to find package Microsoft.AspNetCore.App.Runtime.osx-x64 with version (= 5.0.11) [/build/source/Ryujinx.sln]
> /build/source/Ryujinx/Ryujinx.csproj : error NU1102: - Found 1 version(s) in nixos [ Nearest version: 5.0.10 ] [/build/source/Ryujinx.sln]
You need to update the dependencies for those packages like in previous updates:
#138296
Also, the commits should follow this naming instead:
dotnetCorePackages.*_5*: 5.0.10 -> 5.0.11
8c27f5b
to
ce7adaa
Compare
yea, that's the painful part of dotnet+nix, is that some dependent packages need to be manually re-generated. :( |
Result of 10 packages failed to build:
17 packages built:
|
ce7adaa
to
9befd96
Compare
@prusnak I see that you updated this PR to upgrade to later versions. Are you working on updating the hashes of dependent packages or do you need a helping hand? |
Helping hand would be great! I don't have access to my x86_64 machine at the moment, so it would be very problematic for me to update these. |
9befd96
to
a3cda2c
Compare
@prusnak I have started to update dependent packages. Got stuck on msbuild where I still need to figure out how the update script should be called. See prusnak/nixpkgs@dotnet-update...avdv:dotnet-update TODO:
22 packages built: |
Result of 30 packages built:
|
@avdv Thank you very much for your work! Pulled in changes from your branch into this PR. |
2b2b66f
to
c72bbcd
Compare
I updated commit c72bbcd3f5f62ad4eefe259435e1efbbea3ed8b2 to enable linux-arm64 build of github-runner |
@avdv I'm sorry it's such a pain to update the dependencies for msbuild. You basically need to unpack, patch and build, but without the local nuget sources, then run create-deps.sh. I threw together something quick that should work as an example:
should create So much of the build process is required that I'm not sure how best to split this between the derivation and the shell script. Any ideas? |
Thank you @corngood! I think this is what I ended up doing somehow, but the deps.nix created were identical to the existing deps.nix... and then re-trying to build msbuild simply succeeded. 🤷
Thanks, I'll give this a spin... |
c72bbcd
to
2d66b3c
Compare
and do not add nuget.build.tasks.pack ``` /build/source/src/NuGet/Microsoft.Net.Compilers.Toolset/Microsoft.Net.Compilers.Toolset.Package.csproj : error NU1100: Unable to resolve nuget.build.tasks.pack (>= 5.10.0-preview.2.7169)' for '.NETCoreApp,Version=v3.1'. /build/source/src/NuGet/Microsoft.Net.Compilers.Toolset/Microsoft.Net.Compilers.Toolset.Package.csproj : error NU1100: Unable to resolve 'nuget.build.tasks.pack (>= 5.10.0-preview.2.7169)' for '.NETFramework,Version=v4.7.2'. ```
The old version of the script tried to parse the output of the dotnet tool, but apparently, that output changed and thus the list of dependencies was empty.
2d66b3c
to
5913fdb
Compare
Thanks @avdv ! Going to merge this as msbuild builds just fine. |
Thank you @prusnak ! @corngood I ran the |
Could you tell what URL it was fetching, and what the error code was? If we're using unreliable sources that's going to be a problem for builds as well down the road. It would be nice to have a proper mirror list, but I've found that in practice the different mirrors don't have identical content for the packages. At some point I'd like to do some work to unify all the nuget dependency gathering logic for all these packages. #133588 might be interesting |
The only diagnostic output from the script was:
and
Looking these up in the deps.nix file yields:
To avoid fetching the artifacts twice in the create-deps script I modified it thusly: diff --git a/pkgs/development/tools/build-managers/msbuild/create-deps.sh b/pkgs/development/tools/build-managers/msbuild/create-deps.sh
index c9bd4ba7eb6..15b997b2af5 100755
--- a/pkgs/development/tools/build-managers/msbuild/create-deps.sh
+++ b/pkgs/development/tools/build-managers/msbuild/create-deps.sh
@@ -15,9 +15,21 @@ mapfile -t repos < <(
done
)
-find .packages fake-home/.nuget/packages -name \*.nupkg -printf '%P\n' | sort -u |
- while IFS= read file
- do
+
+find .packages fake-home/.nuget/packages -name \*.nupkg -printf '%p\n' |
+ (
+ declare -A nupkg
+
+ while IFS= read file
+ do
+ ponly="${file#*?packages/}"
+ nupkg["$ponly"]="$file"
+ done
+
+ declare -a sorted
+ IFS=$'\n' sorted=( $(sort -u <<<"${!nupkg[*]}") )
+
+ for file in "${sorted[@]}"; do
packagedir=$(dirname $file)
version=$(basename $packagedir)
package=$(dirname $packagedir)
@@ -38,8 +50,8 @@ find .packages fake-home/.nuget/packages -name \*.nupkg -printf '%P\n' | sort -u
echo "couldn't find $package $version" >&2
exit 1
fi
+ sha256="$(nix-hash --type sha256 --flat --base32 "${nupkg["$file"]}")"
- sha256=$(nix-prefetch-url "$url" 2>/dev/null)
cat << EOL
{
name = "$package";
@@ -50,7 +62,8 @@ find .packages fake-home/.nuget/packages -name \*.nupkg -printf '%P\n' | sort -u
};
}
EOL
- done
+ done
+ )
cat << EOL
] which uses the already downloaded files instead of fetching it again.
At least, that explains why my modified script turned up a different hash for a single dependency, probably because it was downloaded from a different mirror before: --- deps.nix 2021-11-11 16:22:53.500281686 +0100
+++ /tmp/newdeps 2021-11-12 09:37:45.439595602 +0100
@@ -364,7 +364,7 @@
version = "16.6.1";
src = fetchurl {
url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.net.test.sdk/16.6.1/microsoft.net.test.sdk.16.6.1.nupkg";
- sha256 = "0jjdg468jc6pv2z764f3xc19lcr772nzjm9cjfqq3bqw8vkpzmhv";
+ sha256 = "188dd2imzd6iwhfxz5b8hfis3i0xgwjkpf3hd08vcvxy095ixb2b";
};
}
{ |
Also on my TODO list 😄
Yes, but it does not support different sources, AFIACS. |
It would be great if you could also update the dependencies for ArchiSteamFarm in the future when updating dotnet, which was recently converted to not build from release binaries. #145542 |
Of course. This will be the case in the future, since all dependent packages will be rebuild with nixpkgs-review. It just broke on Hydra because both modifications were done in parallel. |
Motivation for this change
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)