-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add tool package format version metadata to packed tool in settings file #9179
Comments
Perhaps a |
That's also good. A little vague. But better than settingsVersion since settingsVersion won't cover all |
Do you think we should warning the user as long as minor version is bigger? If we use semver, when tool package format 1.2.0 come out in the future. It will require more feature, say support self contain, but back compat. That means, if the consumer has a SDK support 1.0.0 format, that SDK cannot support the self contain tools. |
Let's move the discussion on PR here. Since it is more of a general issue #2074 (comment) Nick: I don't have a huge opinion on this, but if the sole purpose is to mark a breaking boundary for older consumers, we could just use a single number: "1" -> "2" -> "3". I just wonder when we're expected to change major, minor, patch if there are 3 parts. Whatever scheme we use, we should be documenting when to change it. |
I think either way are fine, since it won't change that dramatic. However, i think semver is well known enough, and it fits here: If the package format version is 1.2, it may not work on SDK that only support 1.0 - 1.1 since it asks for more feature. It is fine for SDK Support 1.2 - 1.9999. But it should warning again for SDK supporting 2.0+ |
Maybe the problem is the hammer is too big? |
I'm having trouble interpreting this. Really the only meaningful thing is to poison the package so that old consumers break cleanly instead of unexpectedly. I think we only need one dimension for that. int formatVersion = 1; // bump whenever the format changes such that it will break old consumers Right now, when do we change it? Do we need to evaluate if every single change to the format is major, minor, or patch? If we can come up with clear guidance and document it, I'm fine with a semantic version, but I think the risk is that we won't actually update it to follow such guidelines because they are necessarily more complicated with 3 dimensions. |
There is no implementation, so there is no need for a patch. The first major represents a change where we think an older version of the SDK will not be able to install or run the version of the tool created with a later version of the SDK. Those two sound OK? The question is whether we want to mark a change in the settings structure that is clearly a change, but we do not expect to be a problem for older versions of the SDK. On the one hand, I think we do because it's a dandy way to keep track of versions. On the other hand, this is only available at install time (correct?) and if we were interested in a new non-breaking feature we would look for the feature not the version number (correct?), so the only reason this exists is to give the warning to avoid attempting forwards compatibility in the tool structure. If that is the only reason we are doing this, yep, one digit does it. Can we add a second digit in the future if we are wrong about this very narrow usage? If all that lines up. Yep, one digit does it. Do we have docs on the settings.xml file that I need to update. |
It is in the disk. But it is only checked during install time.
This part I think I may misunderstood from the mail. So there is a feature that is absent. Today the code in master will error out due to the missing feature, say only support any. But do we also want to warn user to update SDK during install time? |
if not, the version number only bump with breaking change. And 1 digit is enough |
Can you write the code so it ignores all but the first digit, but doesn't crash if we need two digit numbers later. If we don't prepare for the possibility of two digits, then we would be forced to add another number if we are wrong and it matters what the version is, even when the change is additive and non-breaking. Does that make sense? Otherwise I will be here a bit longer if you want to come by. |
To support better error message when future version come.
@KathleenDollard should it be
SettingsVersion
? it is really not about settings file. It is the format or structure(folder structure + setting file content). MaybeToolPackageFormatVersion
?example:
And also, warning when it is not compatible (start with
1.
)cc @dotnet/dotnet-cli
The text was updated successfully, but these errors were encountered: