-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add Mono platforms (MonoRuntime/Browser/Wasi/Android) + IsSingleFile in CorePsPlatform.cs #24934
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
base: master
Are you sure you want to change the base?
Conversation
|
I agree that exposing the information is useful and could be extended in the future. However, I don't want a bunch of $PSEnvironment.OperatingSystem -eq [System.Management.Automation.Environment]::Windows
$PSEnvironment.OperatingSystem -eq 'Windows'
$PSEnvironment.Packaging -eq 'SingleExe'
$PSEnvironment.Architecture -eq 'Wasi'This also means you can dump out all the info using just $PSEnvironment |
|
@SteveL-MSFT I would like to merge only new Platform properties to prepare next PR for Browser and don't want to repeat the works for others Mono platforms. Platform property naming should stick to dotnet runtime/sdk convention :
The IsSingleFile implementation is naive (Assembly Location is empty) because the SingleFile Bundle has multiple implementations between an generic AppHost app and a WasmAppHost. Platforming for Browser is about compiling SMA for net9.0-browser with less dependencies. . |
|
Why create a new entity? Why not use what you already have? I mean |
|
This PR is a change on the class System.Management.Platform in a scenario of using Microsoft.PowerShell.Sdk with other TFMs than those distributed by Microsoft. A RFC is mandatory to endorse a discussion about $PSEnvironment vs $PSPlatform vs $PSVersion vs etc.. Are we able to merge these changes ? (this PR) :
|
If we continue to add environment type information, |
|
@PowerShell/powershell-committee discussed this again, here's what we would accept as an Experimental Feature the following:
|
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |

PR Summary
Add static properties IsMonoRuntime, IsBrowser, IsWasi, IsAndroid, IsSingleFile to SMA.Platform
PR Context
Added :
Related issues :
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.- [ ] Issue filed:
(which runs in a different PS Host).