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
PS Community Call for September 17, 2020 #260
Comments
EDIT - Docs announcement - I will be doing a presentation to RTPUG on WEDNESDAY evening 8pm EDT. I will be talking about PowerShell-Docs and how to contribute. This is happening tonight 9/16, so this will be too late for the community call. |
Discussion topic: separation of native cmdlets into modules that are compatible with Windows PowerShell 5.1 as well as PowerShell 7.x. Specifically, I'm wondering about the Relevant discussion: tail end of the conversation on this open PR: https://ucclearly.myjetbrains.com/youtrack/dashboard?id=e5b14068-e378-437b-baa4-7199fc8f9a17. |
@KirkMunro I believe we added this in 6.2 because of Azure Functions |
|
Would be good to document this usage somewhere for cmdlet authors to reference, I think. Had no idea we could do that. 👀 |
@TylerLeonhardt and @rjmholt That's great for .NET Core, but that doesn't help Windows PowerShell, right? Although I suppose I could have a separate DLL for .NET Core that wraps those APIs and exposes them to my Windows PowerShell .NET Framework executable. Even with that in place though, it doesn't speak to the desire to move forward to .NET Core JSON APIs, how to deal with case-insensitive JSON that contains multiple entries with the same value but different cases (as can happen from a simple |
Needs to go in the XML comments so it can appear in the dev documentation.
Yeah, this API is only available in PS 7+. Windows PowerShell has half the API (not such which) but is missing the other half, and in fact I think uses a totally different JSON engine. To pick apart your question a bit better so I understand it:
So to answer as best I can given my understanding:
Let me know if that makes sense or doesn't address what you're looking for |
That's fine, I'm only doing conversion on PowerShell object data that is returned from a script. I have a runtime that runs PowerShell, and then I send the results off via a REST API call. Those results need to be converted into JSON first, and compressed. Then we decompress and store them. So this is exactly what I need, not some general purpose JSON conversion that isn't about PSObjects, special keys, etc.
Right, end users shouldn't know or care, but if the backend library is more performant, and possibly more forgiving/inline with PowerShell that prefers case insensitive over case sensitive information, as someone who works with a runtime that executes PowerShell, I do have some preferences over what is used on the back end, especially when it comes to performance. Thanks @rjmholt for those answers. My interest in a cross platform standalone JSON library may become significantly less important if I can plug in these APIs and cherry pick the newer functionality that is in the SDK that powers those cmdlets in PowerShell 7.x. |
Understood.
Absolutely. And it's something we've been discussing on and off. Certainly if we were making the move today we'd be using System.Text.Json. The concern is that making the move without breaking small edge cases is hard. On that note, the case sensitivity isn't an implementation detail of the JSON engine, it's a deliberate choice for PowerShell, since PowerShell tends to think case-insensitively -- so moving over to a new engine, we'd keep that behaviour. If you needed to change that behaviour, you'd need to move away from PowerShell's own JSON APIs to get the specific behaviour you're looking for.
For this goal, I would say you've got a couple of possibilities:
(2) tends to be what we do in PowerShellEditorServices. For example, the debugging APIs introduced (with your help @KirkMunro) in PS 7 allow us to do new things in the debugger (for example set a breakpoint while script is running), but don't exist in older versions. So at load-time we do some reflection to discover those APIs and if they exist we call them, but if not we fall back to calling the appropriate cmdlet (in this case |
The discussion with @KirkMunro was started in #11198 and I hope MSFT team accept my suggestion PowerShell/PowerShell#11198 (comment) (in short - to use .Net Runtime dev model) - It's incredible but it's easier to invest in .Net today than in PowerShell.
What is a progress in the intention? |
|
Discuss the path toward resolution of PowerShell/PowerShell#1995 (broken passing of empty arguments and arguments with embedded double quotes to native executables), specifically:
|
Q: What is the plan for Powershell Standard with .NET 5 since the .NET Standard approach is changing? Also, I feel like PSStandard still includes a ton of DLLs that have to be manually removed for Windows Powershell 5.1 for those modules to import correctly with Add-Type, it seems like an additional privateassets dependency list may be required to cut down on the assemblies generated for a binary/hybrid Powershell Module. Any potential for optimizing some of that? |
Q: Any updates on Assembly Load Context, etc. to work with side-by-side issues between modules? I imagine system.text.json is going to become the new common problem here. Maybe add something to |
Thanks everyone. Listen to the recording for answers/discussion to these questions. |
@SteveL-MSFT Can you share the recording? |
In case there are others (like me until now) who are unfamiliar with the process: The recordings and transcripts are usually posted at https://aka.ms/PSCommunityCall, which, however, hasn't happened yet for the September call. |
@ili101 Prior to those going up you can also view the most recent recording via Teams itself from the https://aka.ms/JoinPSCall link, which will have the prior meeting's recording available until they update that shortlink for the next month's meeting. |
Thanks, @vexx32, good to know. However, it would still be beneficial to have the YouTube link posted soon after and within a predictable time frame:
|
Please add topics/questions for the September 17, 2020 Community Call here.
Agenda:
The text was updated successfully, but these errors were encountered: