Skip to content

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 1 commit into from
Apr 14, 2021
Merged

Conversation

pranavkm
Copy link
Contributor

No description provided.

@pranavkm pranavkm requested a review from a team as a code owner April 13, 2021 17:09
@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Apr 13, 2021
@pranavkm pranavkm requested a review from lewing April 13, 2021 17:09
@@ -48,7 +48,7 @@
"alias-to": {
"win-x86": "Microsoft.NET.Runtime.Emscripten.2.0.12.Python.win-x86",
"win-x64": "Microsoft.NET.Runtime.Emscripten.2.0.12.Python.win-x64",
"linux-x64": "Microsoft.NET.Runtime.Emscripten.2.0.12.Python.linux-x64",
"linux-x64": null,
Copy link
Contributor Author

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?

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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).

Copy link
Member

@lewing lewing Apr 15, 2021

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.

Copy link
Member

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?

@lewing
Copy link
Member

lewing commented Apr 13, 2021

With the latest dotnet/installer builds the workload is renamed by the installer, this tool either needs to do a similar rename or the workload package should be renamed to match the installer name

@pranavkm
Copy link
Contributor Author

I'm going to #yolo this change in, to unblock the linux issue, but we can continue the discussion about the optional pack.

@pranavkm pranavkm merged commit 5eda8d4 into main Apr 14, 2021
@pranavkm pranavkm deleted the prkrishn/optional-pack branch April 14, 2021 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants