Skip to content
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

Make struct types readonly in Microsoft.CodeAnalysis.Features #34478

Merged
merged 1 commit into from Mar 28, 2019

Conversation

@sharwell
Copy link
Member

@sharwell sharwell commented Mar 26, 2019

No description provided.

@sharwell sharwell requested review from as code owners Mar 26, 2019
Copy link
Member

@jaredpar jaredpar left a comment

My review here was readonly, no comments were written.

Copy link
Member

@jasonmalinowski jasonmalinowski left a comment

@jaredpar I assume there's no crazy way that adding 'readonly' is an API breaking change?

@sharwell
Copy link
Member Author

@sharwell sharwell commented Mar 27, 2019

@jasonmalinowski removing it would be, but adding shouldn't cause problems

@jasonmalinowski
Copy link
Member

@jasonmalinowski jasonmalinowski commented Mar 27, 2019

@sharwell: I'm just always paranoid because I've had the compiler team tell me things are safe, only to then be broken by them. 😄

@jaredpar
Copy link
Member

@jaredpar jaredpar commented Mar 27, 2019

In short this change is fine and should be merged. More generally though the rule of thumb is the following:

If I can add readonly to my struct definition and the code compiles there are no compat concerns

@sharwell sharwell force-pushed the readonly-structs branch from 26a7b45 to 2f96377 Mar 27, 2019
@sharwell sharwell merged commit 99771f5 into dotnet:master Mar 28, 2019
15 checks passed
15 checks passed
@wip[bot]
WIP Ready for review
Details
license/cla All CLA requirements met.
Details
@azure-pipelines[bot]
roslyn-CI Build #20190327.28 succeeded
Details
@azure-pipelines[bot]
roslyn-CI (Linux_Test coreclr) Linux_Test coreclr succeeded
Details
@azure-pipelines[bot]
roslyn-CI (Linux_Test mono) Linux_Test mono succeeded
Details
@azure-pipelines[bot]
roslyn-CI (Windows_CoreClr_Unit_Tests debug) Windows_CoreClr_Unit_Tests debug succeeded
Details
@azure-pipelines[bot]
roslyn-CI (Windows_CoreClr_Unit_Tests release) Windows_CoreClr_Unit_Tests release succeeded
Details
@azure-pipelines[bot]
roslyn-CI (Windows_Correctness_Test) Windows_Correctness_Test succeeded
Details
@azure-pipelines[bot]
roslyn-CI (Windows_Desktop_Spanish_Unit_Tests) Windows_Desktop_Spanish_Unit_Tests succeeded
Details
@azure-pipelines[bot]
roslyn-CI (Windows_Desktop_Unit_Tests debug_32) Windows_Desktop_Unit_Tests debug_32 succeeded
Details
@azure-pipelines[bot]
roslyn-CI (Windows_Desktop_Unit_Tests debug_64) Windows_Desktop_Unit_Tests debug_64 succeeded
Details
@azure-pipelines[bot]
roslyn-CI (Windows_Desktop_Unit_Tests release_32) Windows_Desktop_Unit_Tests release_32 succeeded
Details
@azure-pipelines[bot]
roslyn-CI (Windows_Desktop_Unit_Tests release_64) Windows_Desktop_Unit_Tests release_64 succeeded
Details
@azure-pipelines[bot]
roslyn-CI (Windows_Determinism_Test) Windows_Determinism_Test succeeded
Details
@azure-pipelines[bot]
roslyn-integration-CI Build #20190327.22 succeeded
Details
@sharwell sharwell deleted the readonly-structs branch Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants