-
Notifications
You must be signed in to change notification settings - Fork 162
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 a design for SdkAnalysisLevel #308
Conversation
CC the stakeholders/reviewers from the doc:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great.
I'm guessing we're not including the warning strengthening policy here?
Note from @timheuer - cover why use this vs global.json? Changing the SDK chosen vs Changing the behavior of the chosen SDK. |
Yes exactly - we can define the policy/support matrix for teams after this is implemented. IIRC the main question was "how long is long enough to establish a lower bound for tools to support older SDKs", and some answers were "previous 2 LTSs", "previous LTS", and "forever". |
@baronfel Feel free to ping us (test team) on such changes :) This is interesting as we are also feeling this "limitation". |
I've created dotnet/sdk#37778 with a potential implementation of the new field to help illustrate this doc. |
Both the scenarios described in this design are ones I have experienced in the past 6 months, and the changes proposed seem like the right way to start to reduce their impact. I note this design doesn't actually detail what should be done with this new level, so it's hard to say if it would solve the issue, but I hope giving a real world example might be useful. I think another important scenario is that of mixed target frameworks within a single build environment. My context is a highly regulated industry where changes cannot be made lightly. For example, a single repository may have:
We might simultaneously need pipelines to support:
In order to simplify managing builds and enforce consistency our pipeline definitions are shared across repositories. We could theoretically migrate repositories to the next major SDK versions individually but:
In addition windows cicd runners are complicated, and it's not practical to have multiple runners with different sdks. It may not be acceptable nor practical to add global.json files to many frozen projects.
This doesn't have to be a new warning; a bug fix to an existing warning is sufficient. This happened to us with the release of 8. A bug fix to CA2017 suddenly started failing builds due to a relatively minor logging issue. This time round the number of repos, and the timing in relation to our releases meant we could just fix code. However, in two years I imagine we'll be too big for that to be practical, and a similar change in a minor SDK release would be equally disruptive. How this would help: Questions:
If yes, how practical is it for dotnet to manage backwards compatibility? If no, how is this explained, and does it it undermine the value if setting the analysis level only sometimes works.
|
As far as I can tell, this design is implemented in https://github.com/dotnet/installer/pull/18687/files, should this PR be merged? |
It definitely could - was mainly leaving it open as a way to collect more feedback, but we can 'snap' at this point-in-time. |
This is the first pass at SdkAnalysisLevel, a unified flag to help users manage their SDK warning levels in situations where they may not be able to pin SDKs via global.json or other means. The property is intended to communicate to tooling like the compilers an explicit intent - "treat me as if I were SDK X.Y.Z" without requiring the user to install or manage other SDKs. The first well-defined use of this is the Roslyn field member breaking change, where members of the Roslyn team hope to use this flag in conjunction with other user signals to determine if a user should get warnings about the field breaking change.
I've spoken with most of the folks mentioned in the stakeholders/reviewers section about this before - now it's time to get broader input and push the design to done.