rmbolger / Posh-ACME

PowerShell module and ACME client to create certificates from Let's Encrypt (or other ACME CA)
https://poshac.me/docs/latest/
MIT License
778 stars 190 forks source link

Feedback Request: Dropping Support for PowerShell 5.1 #526

Open rmbolger opened 11 months ago

rmbolger commented 11 months ago

Overview

I'm considering dropping support for PowerShell 5.1 in the next major Posh-ACME version 5.x. Keeping a single code-base that supports both 5.1 and modern 7+ versions complicates the code and prevents me from utilizing language and cmdlet features that only exist in modern versions. I don't have the time or inclination to support separate codebases for legacy and modern PowerShell.

The new minimum supported PowerShell version would become whatever the oldest still supported PowerShell "LTS" version happens to be at the time (currently 7.2). It may still work on older versions, I just wouldn't be testing against them.

I'd appreciate constructive feedback for and/or against this idea. I'd also welcome simple votes for or against via ๐Ÿ‘/๐Ÿ‘Ž reactions, though votes won't be the ultimate deciding factor. In particular, I'm curious if there are environments you're using Posh-ACME from where PowerShell beyond 5.1 isn't supported at all like Azure Automation runbooks were for a long time.

Also just to be clear, I havenโ€™t really started any sort of real development on 5.x yet. Iโ€™m still just conceptually thinking about what it might look like. So this definitely is not an imminent change either way.

PowerShell Version History

Windows PowerShell 5.1 was released in 2016 and is the last version which is built on the Windows-only .NET Framework runtime. While it is still included by default in current versions of both client and server Windows OSes, Microsoft has stated there will be no additional development or improvements to it.

PowerShell Core 6.0 was released in 2018 and is built on the cross-platform .NET Core runtime. Some folks refer to it as "PWSH" because the executable name is pwsh.exe rather than powershell.exe. On Windows, it can be installed side-by-side with (now legacy) Windows PowerShell 5.1. But its versions have a much shorter support lifetime than the OS which is also why it is not yet installed by default on any Windows OS version.

PowerShell 7.0 released in 2020 and dropped the "Core" moniker from both PowerShell and .NET. It was also the first "LTS" (Long Term Support) release and support ended in 2022.

PowerShell 7.2 released in 2021 and is the oldest still supported LTS release with support ending in 2024. Arguably, it was the first version to gain more significant adoption due to it being updatable on Windows via the OS-native Microsoft Update process and Microsoft App Store.

PowerShell 7.4 released in 2023 and is the current LTS release as of this writing with support ending in 2026.

webprofusion-chrisc commented 11 months ago

I totally understand wanting to simplify the target versions of powershell. Certify The Web does currently use (some of) the 5.1 version via net462 and the standard windows powershell functionality but if we have to pin to a certain version of posh-acme that's ok for now. Eventually we'll be on dotnet core for the app (in some form) and increasingly we will be targeting non-windows platforms.

rmbolger commented 11 months ago

Are you actually using the separate Posh-ACME.net46 version Iโ€™m still maintaining, @webprofusion-chrisc? Or just the mainline version?

webprofusion-chrisc commented 11 months ago

@rmbolger no just main so perhaps we've not using anything specific to .net framework at all. The majority of what we do use are the plugins under Posh-ACME/Plugins, we do source /public and /private in case the plugins use something from there: https://github.com/webprofusion/certify/blob/development/src/Certify.Shared.Extensions/Scripts/DNS/PoshACME/Posh-ACME-Wrapper.ps1 and we use our own copy of the bouncycastle dll.

Tragen commented 8 months ago

As you can install PowerShell 6+ side by side with the old PS, there is no reason not to install the new one. So, yes, go for it and only use PS7+ if it makes life easier for you.

joshooaj commented 7 months ago

I still depend on PowerShell 5.1 due to a dependency on .NET Framework, but it's a heavy burden to maintain backward compatibility even for a for-profit organization let alone an open-source project. I vote to drop support for 5.1 if it means reduced maintenance effort on your part. The opportunity to drop test automation on Windows, or at least keeping all tests on Linux/Windows on the same pwsh shell is nice.

For context, I work for a software company and don't have control over our customer environments. Most of our customers don't use PowerShell so they wouldn't typically have anything newer than 5.1 installed but they would typically be fine with installing it if we asked them to or even added it as a dependency to our software in the future.