-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Make the Python pack optional on Linux #31761
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@dsplaisted / @mhutch we have this weird case where a workload pack is optional specifically on Linux. Importing the SDK based on the OS seems easy. However, I was trying to figure out what it would look like for the workload install tool. We want to signal to it, that there truly does not exist a version of this pack for this platform so ignore this entry.
Using a
null
appears to do the job. Thoughts on this? Other options I should consider?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.
The idea with the null is to distinguish an unneeded pack from a completely unsupported arch?
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.
Yes. I was trying to extrapolate what the workload installer would do. Right now, the assumption is that in the absence of a alias for a platform, the SDK falls back to using the default ID: https://github.com/dotnet/sdk/blob/cf1db25c688a37cfad7adbfb608f1db930eb1412/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadResolver.cs#L143. Having an explicit null value would let you differentiate between, this pack does not exist for that platform vs use the "default" pack for this platform.
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 don't think we meant to support null here.
Is this pack optional on Linux or does it not exist at all? If it's optional (and exists), then you wouldn't want to set this to null as there wouldn't be any way to use it if it was installed.
My understanding is that the pack is optional on Windows too, and that you would opt in to using it by setting a property in the project. If that's right and applies here then I don't think Linux would be any different than Windows (ie they'd both alias to the appropriate pack).
Uh oh!
There was an error while loading. Please reload this page.
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.
The python pack doesn't currently exist at all on linux because upstream emsdk doesn't produce it, whereas it does for window and macos. @akoeplinger can add details.
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.
@mhutch dotnet/sdk#16746 seems to have broken this workaround, what should we be doing here?