-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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
Complete the SemanticVersion work #2983
Comments
We should wait for corefx support of semver (https://github.com/dotnet/corefx/issues/13526) rather than continue to have our implementation |
The WG discussed this and in the absence of underlying support from the .NET team, we don't believe we should undertake any effort in this area. |
@JamesWTruher if that is the case please remove the SemanticVersion support from module versions as the half support we have today hurts the PowerShell experience. My opinion is that you fully support it or remove it from PowerShell and PSResourceGet. |
Brought this up with the following points in the PS community call.
|
@SydneyhSmith please reopen this issue as was discussed on the community call. |
This issue has been marked as declined and has not had any activity for 1 day. It has been closed for housekeeping purposes. |
📣 Hey @HemantMahawar, how did we do? We would love to hear your feedback with the link below! 🗣️ 🔗 https://aka.ms/PSRepoFeedback |
@SydneyhSmith the issue closed again because the tags are still on it. |
This was discussed, but adding a dependency can cause more issues than just the size. That doesn't mean we can't add dependencies, it just raises the bar for impact significantly.
PSReadLine now increments the That said, keep in mind this issue is very broad. The WG is only saying that we cannot commit to fixing every issue with the semver type and also everything around it - at least without support from the BCL. For example, I do personally think it would be smart to at least change module import look up to look for semver folders, even if PSRG won't be able to save them to that format for likely a few years. Still should get the ball rolling on it, I've opened #21371 to track that.
FWIW I very much dislike fake properties in formatting in general, and I agree that at the very least an ETS property should be added. Feel free to open an issue for that if you'd like
I don't disagree, but it is also a bit of a give and take there. The more public it is, the harder it is to have a candid discussion - which means it takes longer and we get to even less issues than we do now. It's the same reason why we often can't explain in great detail everything that was discussed, because writing all of that up takes a lot of time. It's definitely something we're thinking about how to improve. |
Uhm... So one of the reasons of not using And - as far as I know - it's quite improbable for it to go away, as it's one of the core mechanics of NuGet packages versioning, which are something, that PowerShell relies on (and should probably start embracing those |
True! But it does so in its own assembly load context which won't conflict. For PowerShell to fully embrace the type it would need to be registered and loaded at start up and in the default ALC. Even if we were able to lazily load it somehow (which we likely wouldn't be able to do due to it needing to be referenceable from script) we would still need to lock down in our assembly resolver which assembly is loaded. |
Bumping the SDK is required to get the latest runtime. |
SDK-s are not required to get the latest runtime. Runtime is also distributed separately and you can use it that way. It's baffling, that I'd get the exact SDK version number used for building and packaging in the release notes, but the actual runtime version, which is packaged with PowerShell, is something I have to look up. It's also baffling, that PowerShell needs to use the self-contained model and deliver the runtime, so I have to have another copy of it on my machine, (and wait for separate security updates for PowerShell, when there are runtime security updates available). Going back to having the |
The SDK is what we use to build PowerShell. If you build a self contained project with a lower version of the SDK then you get a lower version of the runtime.
Sorry, I don't know the specifics of every SDK version. I imagine that some of them are only tooling changes, but for example from 8.0.201 to 8.0.203 the runtime version is higher when compiling a self contained project.
Yeah for sure, you just can't use an older version of the SDK to build for a newer version.
Yep! Exactly
I wasn't involved with that change and don't know much about it, but even if breaks were intentional there - that doesn't really impact the decision here. One break doesn't mean all breaks are warranted. Especially if a previous change had a bad outcome, if anything that would be an example of why not to do it, not why to do it more. |
This can be improved to link to the .NET release page of that version of .NET SDK. It will make it easy for you to find out what version of .NET runtime coming with it.
Then maybe you want to use the PowerShell global tool instead, which depends on the corresponding runtime to be already installed separately on your machine.
Although that breaking change is not relevant to this discussion, I want to add some context about it:
|
Keeping this open as the .NET issue is still open. If they decide to never do it, we can revisit, but it doesn't make sense for PS7 to have it's own semver implementation with the risk of .NET having a different one and the two may not be compatible. |
@SteveL-MSFT can you get into contact with the .NET team to see if it is ever going to be on their roadmap because if history is any indication they have no intention of ever doing it as 8 years has already gone past since this issue has been opened. What is the timeframe PowerShell will wait before doing its own implementation because we're at 8 years now, a decade? The PS Committee should have a reasonable drop dead date if .NET will not include the type then PS will do the implementation. We cannot have this issue open for another 8 years. Here is the deal, the PowerShell team decided to implement semantic versioning in PowerShellGet/PSResourceGet, PowerShell by extension should as well due to various issues laid out above. If PowerShell does not want to support semantic versioning then it should be removed from PSResourceGet. A firm decision needs to be made by the WG/Committee in which direction they would like to go in and in a reasonable timeframe. |
The main problem that might not be completely apparent is that if PS7 has a implementation of semver, then we need to support it indefinitely as the core platform. Individual modules may do what they need for their cases, but other apps not specific to that domain would not take a dependency on it. Although not ideal, we can continue to not have a semver type. |
At this point I just want the module issues relating to semver prerelease modules fixed as that is the main issue. From the discussion on this thread these are the non-starters:
Here is my proposal address fixing semver prerelease modules without breaking those non-starters.
Then once a .NET type is released.
This proposal solves the main issues with the current state while not breaking any of the non-starters and leaving room in the future for a real .NET semver type. |
=======================
User Experience:
On disk, module versions presents - 1.0.0, 1.0.0-alpha17, 1.0.1
Result:
Note that 1.0.0 is higher than 1.0.0-alpha17, so if 1.0.1 doesn't exist, then
Import-Module
would load 1.0.0.The text was updated successfully, but these errors were encountered: