-
Notifications
You must be signed in to change notification settings - Fork 516
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] Create and ship a WorkloadDependencies.json file. Fixes #21768. #21779
Conversation
Checking the produced content: $ cd _build/nupkgs
$ for i in *NET*; do echo "### $i"; echo ""; echo '```json'; unzip -p $i data/WorkloadDependencies.json; echo '```'; echo ""; done Microsoft.NET.Sdk.MacCatalyst.Manifest-9.0.100.18.1.9209-ci.workloaddependencies-json.nupkg{
"microsoft.net.sdk.maccatalyst": {
"workload": {
"alias": [ "maccatalyst" ],
"version": "18.1.9209-ci.workloaddependencies-json"
},
"xcode": {
"version": "[16.1,)",
"recommendedVersion": "16.1"
},
"sdk": {
"version": "18.1"
}
}
} Microsoft.NET.Sdk.iOS.Manifest-9.0.100.18.1.9209-ci.workloaddependencies-json.nupkg{
"microsoft.net.sdk.ios": {
"workload": {
"alias": [ "ios" ],
"version": "18.1.9209-ci.workloaddependencies-json"
},
"xcode": {
"version": "[16.1,)",
"recommendedVersion": "16.1"
},
"sdk": {
"version": "18.1"
}
}
} Microsoft.NET.Sdk.macOS.Manifest-9.0.100.15.1.9209-ci.workloaddependencies-json.nupkg{
"microsoft.net.sdk.macos": {
"workload": {
"alias": [ "macos" ],
"version": "15.1.9209-ci.workloaddependencies-json"
},
"xcode": {
"version": "[16.1,)",
"recommendedVersion": "16.1"
},
"sdk": {
"version": "15.1"
}
}
} Microsoft.NET.Sdk.tvOS.Manifest-9.0.100.18.1.9209-ci.workloaddependencies-json.nupkg{
"microsoft.net.sdk.tvos": {
"workload": {
"alias": [ "tvos" ],
"version": "18.1.9209-ci.workloaddependencies-json"
},
"xcode": {
"version": "[16.1,)",
"recommendedVersion": "16.1"
},
"sdk": {
"version": "18.1"
}
}
} |
|
||
using (var writer = new StreamWriter (outputPath)) { | ||
writer.WriteLine ($"{{"); | ||
writer.WriteLine ($" \"microsoft.net.sdk.{platformLowerCase}\": {{"); |
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.
Is microsoft.net.sdk.[platform]
the right key? Or should it be the workload name?
I think we want a mapping "required Xcode" -> iOS workload, and not a relationship between a "required Xcode" -> "workload manifest"?
Mainly thinking if we need .NET SDK team to review.
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.
Yeah, you could have multiple workloads within one manifest, that has different requirements per workload?
For example, we might have a android-nativeaot
workload one day that requires the Android NDK and the plain android
workload doesn't.
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.
I think we do want the actual workload identifier here as is in the PR. The aliases were meant to capture the name we might use in the CLI, but for looking up this type of info, for example, C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.ios\[version]\WorkloadDependencies.json
is where i'd expect to find the info, so I think it makes sense for the key in this file to match the id here.
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.
How would we define one workload as having different requirements as the other?
For example, here in .NET 9 Preview 6:
We would require API-34 for the android
workload and API-35 for the preview android-35
workload.
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.
I think we've mostly sorted this out for now. Android is listing these as optional, and we'll eventually add a way to query the context for a given project state (probably invoking a specific msbuild target on a project) at which point having a net9.0-android35.0
TFM for example could cause the returned info to require the sdk package for android 35 instead of the default 34 for net9.0
as per the file in the workload.
In the case of macios, I don't think this will be a problem as the workload doesn't differentiate anywhere at this point that different xcode versions would be needed for different target platform versions for example.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ API diff for current PR / commit.NET (No breaking changes)✅ API diff vs stable.NET (No breaking changes)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
Context: [`Releases.json` loop][0] Context: xamarin/xamarin-macios#21779 (comment) There is a desire to have the .NET Workloads have a machine readable description of what dependencies they require in order to run, in order to facilitate tooling that would check for these dependencies. Add `tools/workload-dependencies`, a new tool which parses a "Xamarin Manifest" to generate `workload-dependencies.json`. The "canonical" location for the "Xamarin Manifest" is within `external/android-platform-support/Feeds/AndroidManifestFeed_d17.12.xml`; failing that, <https://aka.ms/AndroidManifestFeed/d17-12> can be used. Output of the tool is a JSON document specifying ther required JDK and Android SDK packages which the .NET for Android workload requires: { "microsoft.net.sdk.android": { "workload": { "alias": [ "android" ], "version": "35.0.100" }, "jdk": { "version": "[17.0,18.0)", "recommendedVersion": "17.0.12" }, "androidsdk": { "packages": [ { "desc": "Android SDK Build-Tools 35", "sdkPackage": { "id": "build-tools;*", "version": "[30.0.2,30.0.3,31.0.0,32.0.0,33.0.0,33.0.1,33.0.2,33.0.3,34.0.0,35.0.0]", "recommendedId": "build-tools;35.0.0", "recommendedVersion": "35.0.0" }, "optional": "false" }, { "desc": "Android SDK Command-line Tools", "sdkPackage": { "id": "cmdline-tools;*", "version": "[5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0]", "recommendedId": "cmdline-tools;13.0", "recommendedVersion": "13.0" }, "optional": "false" }, { "desc": "Android SDK Platform 28", "sdkPackage": { "id": "platforms;android-*", "version": "[1,1,1,2,2,2,2,3,3,3,3,3,3,5,6]", "recommendedId": "platforms;android-28", "recommendedVersion": "6" }, "optional": "false" }, { "desc": "Android SDK Platform-Tools", "sdkPackage": { "id": "platform-tools", "version": "[33.0.2,33.0.3,34.0.1,34.0.3,34.0.4,34.0.5,35.0.1,35.0.2]", "recommendedId": "platform-tools", "recommendedVersion": "35.0.2" }, "optional": "false" }, … ] } } } [0]: https://loop.cloud.microsoft/p/eyJ1IjoiaHR0cHM6Ly9taWNyb3NvZnQuc2hhcmVwb2ludC1kZi5jb20vc2l0ZXMvYzIyZmVjMDMtN2I4OS00OTJhLTgzNzQtZmZjMTI4YjMwMWRhP25hdj1jejBsTWtaemFYUmxjeVV5Um1NeU1tWmxZekF6TFRkaU9Ea3RORGt5WVMwNE16YzBMV1ptWXpFeU9HSXpNREZrWVNaa1BXSWxNakZXTUhSeU9XY3dRbk5WYlhVdFJWUjNRVEZNY0dOSmQwdG1VVEZUZFVFeFRuRk5XbVZ3TUhVd1dUaEhkVVpKVlRSUGIxWnlVMWxoZFRaT2RFODRTamhISm1ZOU1ERlhSelkwU0RNMU56TlZRbEpITWs1TU1rSkdTemRZV1ZCWFJqSlNTRVJQVENaalBTVXlSaVpoUFV4dmIzQkJjSEFtY0QwbE5EQm1iSFZwWkhnbE1rWnNiMjl3TFhCaFoyVXRZMjl1ZEdGcGJtVnlKbmc5SlRkQ0pUSXlkeVV5TWlVelFTVXlNbFF3VWxSVlNIaDBZVmRPZVdJelRuWmFibEYxWXpKb2FHTnRWbmRpTW14MVpFTXhhMXBwTldwaU1qRTRXV2xHVjAxSVVubFBWMk4zVVc1T1ZtSllWWFJTVmxJelVWUkdUV05IVGtwa01IUnRWVlJHVkdSVlJYaFVia1pPVjIxV2QwMUlWWGRYVkdoSVpGVmFTbFpVVWxCaU1WcDVWVEZzYUdSVVdrOWtSVGcwVTJwb1NHWkVRWGhXTUdNeVRrVm5lazU2VGtwVU1WRXdWMnQwUmxGNldrdFRSbXhaVlRCYVVWUlZhRlJXUlVaRFYyeEZKVE5FSlRJeUpUSkRKVEl5YVNVeU1pVXpRU1V5TWprNE5HUXhZMlpoTFRnMVpXUXROR1kyWXkxaU9EWmlMVFJtTXpZMU1EQXlaak5tTnlVeU1pVTNSQT09In0%3D?ct=1728330820992&
Context: [`Releases.json` loop][0] Context: xamarin/xamarin-macios#21779 (comment) There is a desire to have the .NET Workloads have a machine readable description of what dependencies they require in order to run, in order to facilitate tooling that would check for these dependencies. Add `tools/workload-dependencies`, a new tool which parses a "Xamarin Manifest" to generate `workload-dependencies.json`. The "canonical" location for the "Xamarin Manifest" is within `external/android-platform-support/Feeds/AndroidManifestFeed_d17.12.xml`; failing that, <https://aka.ms/AndroidManifestFeed/d17-12> can be used. Output of the tool is a JSON document specifying ther required JDK and Android SDK packages which the .NET for Android workload requires: { "microsoft.net.sdk.android": { "workload": { "alias": [ "android" ], "version": "35.0.100" }, "jdk": { "version": "[17.0,18.0)", "recommendedVersion": "17.0.12" }, "androidsdk": { "packages": [ { "desc": "Android SDK Build-Tools 35", "sdkPackage": { "id": "build-tools;*", "version": "[30.0.2,30.0.3,31.0.0,32.0.0,33.0.0,33.0.1,33.0.2,33.0.3,34.0.0,35.0.0]", "recommendedId": "build-tools;35.0.0", "recommendedVersion": "35.0.0" }, "optional": "false" }, { "desc": "Android SDK Command-line Tools", "sdkPackage": { "id": "cmdline-tools;*", "version": "[5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0]", "recommendedId": "cmdline-tools;13.0", "recommendedVersion": "13.0" }, "optional": "false" }, { "desc": "Android SDK Platform 28", "sdkPackage": { "id": "platforms;android-*", "version": "[1,1,1,2,2,2,2,3,3,3,3,3,3,5,6]", "recommendedId": "platforms;android-28", "recommendedVersion": "6" }, "optional": "false" }, { "desc": "Android SDK Platform-Tools", "sdkPackage": { "id": "platform-tools", "version": "[33.0.2,33.0.3,34.0.1,34.0.3,34.0.4,34.0.5,35.0.1,35.0.2]", "recommendedId": "platform-tools", "recommendedVersion": "35.0.2" }, "optional": "false" }, … ] } } } [0]: https://loop.cloud.microsoft/p/eyJ1IjoiaHR0cHM6Ly9taWNyb3NvZnQuc2hhcmVwb2ludC1kZi5jb20vc2l0ZXMvYzIyZmVjMDMtN2I4OS00OTJhLTgzNzQtZmZjMTI4YjMwMWRhP25hdj1jejBsTWtaemFYUmxjeVV5Um1NeU1tWmxZekF6TFRkaU9Ea3RORGt5WVMwNE16YzBMV1ptWXpFeU9HSXpNREZrWVNaa1BXSWxNakZXTUhSeU9XY3dRbk5WYlhVdFJWUjNRVEZNY0dOSmQwdG1VVEZUZFVFeFRuRk5XbVZ3TUhVd1dUaEhkVVpKVlRSUGIxWnlVMWxoZFRaT2RFODRTamhISm1ZOU1ERlhSelkwU0RNMU56TlZRbEpITWs1TU1rSkdTemRZV1ZCWFJqSlNTRVJQVENaalBTVXlSaVpoUFV4dmIzQkJjSEFtY0QwbE5EQm1iSFZwWkhnbE1rWnNiMjl3TFhCaFoyVXRZMjl1ZEdGcGJtVnlKbmc5SlRkQ0pUSXlkeVV5TWlVelFTVXlNbFF3VWxSVlNIaDBZVmRPZVdJelRuWmFibEYxWXpKb2FHTnRWbmRpTW14MVpFTXhhMXBwTldwaU1qRTRXV2xHVjAxSVVubFBWMk4zVVc1T1ZtSllWWFJTVmxJelVWUkdUV05IVGtwa01IUnRWVlJHVkdSVlJYaFVia1pPVjIxV2QwMUlWWGRYVkdoSVpGVmFTbFpVVWxCaU1WcDVWVEZzYUdSVVdrOWtSVGcwVTJwb1NHWkVRWGhXTUdNeVRrVm5lazU2VGtwVU1WRXdWMnQwUmxGNldrdFRSbXhaVlRCYVVWUlZhRlJXUlVaRFYyeEZKVE5FSlRJeUpUSkRKVEl5YVNVeU1pVXpRU1V5TWprNE5HUXhZMlpoTFRnMVpXUXROR1kyWXkxaU9EWmlMVFJtTXpZMU1EQXlaak5tTnlVeU1pVTNSQT09In0%3D?ct=1728330820992&
Context: [`Releases.json` loop][0] Context: xamarin/xamarin-macios#21779 (comment) There is a desire to have the .NET Workloads have a machine readable description of what dependencies they require in order to run, in order to facilitate tooling that would check for these dependencies. Add `tools/workload-dependencies`, a new tool which parses a "Xamarin Manifest" to generate `workload-dependencies.json`. The "canonical" location for the "Xamarin Manifest" is within `external/android-platform-support/Feeds/AndroidManifestFeed_d17.12.xml`; failing that, <https://aka.ms/AndroidManifestFeed/d17-12> can be used. Output of the tool is a JSON document specifying ther required JDK and Android SDK packages which the .NET for Android workload requires: { "microsoft.net.sdk.android": { "workload": { "alias": [ "android" ], "version": "35.0.100" }, "jdk": { "version": "[17.0,18.0)", "recommendedVersion": "17.0.12" }, "androidsdk": { "packages": [ { "desc": "Android SDK Build-Tools 35", "sdkPackage": { "id": "build-tools;*", "version": "[30.0.2,30.0.3,31.0.0,32.0.0,33.0.0,33.0.1,33.0.2,33.0.3,34.0.0,35.0.0]", "recommendedId": "build-tools;35.0.0", "recommendedVersion": "35.0.0" }, "optional": "false" }, { "desc": "Android SDK Command-line Tools", "sdkPackage": { "id": "cmdline-tools;*", "version": "[5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0]", "recommendedId": "cmdline-tools;13.0", "recommendedVersion": "13.0" }, "optional": "false" }, { "desc": "Android SDK Platform 35", "sdkPackage": { "id": "platforms;android-*", "version": "[2,2,3,2,3,2,3,6,5,3,1,1,3,3,1]", "recommendedId": "platforms;android-35", "recommendedVersion": "1" }, "optional": "false" }, { "desc": "Android SDK Platform-Tools", "sdkPackage": { "id": "platform-tools", "version": "[33.0.2,33.0.3,34.0.1,34.0.3,34.0.4,34.0.5,35.0.1,35.0.2]", "recommendedId": "platform-tools", "recommendedVersion": "35.0.2" }, "optional": "false" }, … ] } } } [0]: https://loop.cloud.microsoft/p/eyJ1IjoiaHR0cHM6Ly9taWNyb3NvZnQuc2hhcmVwb2ludC1kZi5jb20vc2l0ZXMvYzIyZmVjMDMtN2I4OS00OTJhLTgzNzQtZmZjMTI4YjMwMWRhP25hdj1jejBsTWtaemFYUmxjeVV5Um1NeU1tWmxZekF6TFRkaU9Ea3RORGt5WVMwNE16YzBMV1ptWXpFeU9HSXpNREZrWVNaa1BXSWxNakZXTUhSeU9XY3dRbk5WYlhVdFJWUjNRVEZNY0dOSmQwdG1VVEZUZFVFeFRuRk5XbVZ3TUhVd1dUaEhkVVpKVlRSUGIxWnlVMWxoZFRaT2RFODRTamhISm1ZOU1ERlhSelkwU0RNMU56TlZRbEpITWs1TU1rSkdTemRZV1ZCWFJqSlNTRVJQVENaalBTVXlSaVpoUFV4dmIzQkJjSEFtY0QwbE5EQm1iSFZwWkhnbE1rWnNiMjl3TFhCaFoyVXRZMjl1ZEdGcGJtVnlKbmc5SlRkQ0pUSXlkeVV5TWlVelFTVXlNbFF3VWxSVlNIaDBZVmRPZVdJelRuWmFibEYxWXpKb2FHTnRWbmRpTW14MVpFTXhhMXBwTldwaU1qRTRXV2xHVjAxSVVubFBWMk4zVVc1T1ZtSllWWFJTVmxJelVWUkdUV05IVGtwa01IUnRWVlJHVkdSVlJYaFVia1pPVjIxV2QwMUlWWGRYVkdoSVpGVmFTbFpVVWxCaU1WcDVWVEZzYUdSVVdrOWtSVGcwVTJwb1NHWkVRWGhXTUdNeVRrVm5lazU2VGtwVU1WRXdWMnQwUmxGNldrdFRSbXhaVlRCYVVWUlZhRlJXUlVaRFYyeEZKVE5FSlRJeUpUSkRKVEl5YVNVeU1pVXpRU1V5TWprNE5HUXhZMlpoTFRnMVpXUXROR1kyWXkxaU9EWmlMVFJtTXpZMU1EQXlaak5tTnlVeU1pVTNSQT09In0%3D?ct=1728330820992&
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🔥 [CI Build] Build failed (Detect API changes) 🔥Build failed for the job 'Detect API changes' (with job status 'Failed') Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/sudo backport release/9.0.1xx |
Backport Job to branch release/9.0.1xx Created! The magic is happening here |
Oh no! Backport failed! Please see https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=10739822 for more details. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/azp run xamarin-macios-pr,xamarin-macios-apidiff |
Azure Pipelines successfully started running 1 pipeline(s). |
✅ [CI Build] Build passed (Build packages) ✅Pipeline on Agent |
✅ [CI Build] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build] Windows Integration Tests passed 💻✅ All Windows Integration Tests passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 107 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
Fixes #21768.