Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Changed internal value to readonly for primitive types #30717

Merged
merged 2 commits into from
Jul 26, 2018

Conversation

tgiphil
Copy link
Contributor

@tgiphil tgiphil commented Jun 28, 2018

See PR in CoreCLR: dotnet/coreclr#18645

@jkotas
Copy link
Member

jkotas commented Jun 30, 2018

@dotnet-bot test this please

@karelz
Copy link
Member

karelz commented Jul 19, 2018

@pjanotti can you please help to move the PR forward?

@karelz karelz added this to the 3.0 milestone Jul 19, 2018
@jkotas
Copy link
Member

jkotas commented Jul 19, 2018

@dotnet-bot test this please

@jkotas
Copy link
Member

jkotas commented Jul 19, 2018

Will close & reopen to reset the CI

@jkotas jkotas closed this Jul 19, 2018
@jkotas jkotas reopened this Jul 19, 2018
@jkotas
Copy link
Member

jkotas commented Jul 19, 2018

@tgiphil Looks like you have missed marking Single and Double as readonly. Could you please submit PR to CoreCLR repo to fix it?

@tgiphil
Copy link
Contributor Author

tgiphil commented Jul 20, 2018

Done. See dotnet/coreclr#19052.

@danmoseley
Copy link
Member

@dotnet-bot test this please

@pjanotti
Copy link
Contributor

Still hitting ApiCompat issues:

Packaging All Configurations x64 Debug Build:

D:\j\workspace\windows-TGrou---0d2c9ac4\Tools\ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.Double' is marked as readonly in the contract so it must also be marked readonly in the implementation. [D:\j\workspace\windows-TGrou---0d2c9ac4\src\System.Runtime\src\System.Runtime.csproj]
D:\j\workspace\windows-TGrou---0d2c9ac4\Tools\ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.Single' is marked as readonly in the contract so it must also be marked readonly in the implementation. [D:\j\workspace\windows-TGrou---0d2c9ac4\src\System.Runtime\src\System.Runtime.csproj]
D:\j\workspace\windows-TGrou---0d2c9ac4\Tools\ApiCompat.targets(72,5): error : ApiCompat failed for 'D:\j\workspace\windows-TGrou---0d2c9ac4\bin\Windows_NT.AnyCPU.Debug\System.Runtime\uapaot\System.Runtime.dll' [D:\j\workspace\windows-TGrou---0d2c9ac4\src\System.Runtime\src\System.Runtime.csproj]

Tizen armel Debug Build:

/opt/corefx/Tools/ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.Boolean' is marked as readonly in the contract so it must also be marked readonly in the implementation. [/opt/corefx/src/System.Runtime/src/System.Runtime.csproj]
/opt/corefx/Tools/ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.Byte' is marked as readonly in the contract so it must also be marked readonly in the implementation. [/opt/corefx/src/System.Runtime/src/System.Runtime.csproj]
/opt/corefx/Tools/ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.Char' is marked as readonly in the contract so it must also be marked readonly in the implementation. [/opt/corefx/src/System.Runtime/src/System.Runtime.csproj]
/opt/corefx/Tools/ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.Double' is marked as readonly in the contract so it must also be marked readonly in the implementation. [/opt/corefx/src/System.Runtime/src/System.Runtime.csproj]
/opt/corefx/Tools/ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.Int16' is marked as readonly in the contract so it must also be marked readonly in the implementation. [/opt/corefx/src/System.Runtime/src/System.Runtime.csproj]
/opt/corefx/Tools/ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.Int32' is marked as readonly in the contract so it must also be marked readonly in the implementation. [/opt/corefx/src/System.Runtime/src/System.Runtime.csproj]
/opt/corefx/Tools/ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.Int64' is marked as readonly in the contract so it must also be marked readonly in the implementation. [/opt/corefx/src/System.Runtime/src/System.Runtime.csproj]
/opt/corefx/Tools/ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.IntPtr' is marked as readonly in the contract so it must also be marked readonly in the implementation. [/opt/corefx/src/System.Runtime/src/System.Runtime.csproj]
/opt/corefx/Tools/ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.SByte' is marked as readonly in the contract so it must also be marked readonly in the implementation. [/opt/corefx/src/System.Runtime/src/System.Runtime.csproj]
/opt/corefx/Tools/ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.Single' is marked as readonly in the contract so it must also be marked readonly in the implementation. [/opt/corefx/src/System.Runtime/src/System.Runtime.csproj]
/opt/corefx/Tools/ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.UInt16' is marked as readonly in the contract so it must also be marked readonly in the implementation. [/opt/corefx/src/System.Runtime/src/System.Runtime.csproj]
/opt/corefx/Tools/ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.UInt32' is marked as readonly in the contract so it must also be marked readonly in the implementation. [/opt/corefx/src/System.Runtime/src/System.Runtime.csproj]
/opt/corefx/Tools/ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.UInt64' is marked as readonly in the contract so it must also be marked readonly in the implementation. [/opt/corefx/src/System.Runtime/src/System.Runtime.csproj]
/opt/corefx/Tools/ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.UIntPtr' is marked as readonly in the contract so it must also be marked readonly in the implementation. [/opt/corefx/src/System.Runtime/src/System.Runtime.csproj]
/opt/corefx/Tools/ApiCompat.targets(72,5): error : ApiCompat failed for '/opt/corefx/bin/Unix.AnyCPU.Debug/System.Runtime/netcoreapp/System.Runtime.dll' [/opt/corefx/src/System.Runtime/src/System.Runtime.csproj]

UWP NETNative x86 Release Build:

D:\j\workspace\windows-TGrou---c60886e1\Tools\ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.Double' is marked as readonly in the contract so it must also be marked readonly in the implementation. [D:\j\workspace\windows-TGrou---c60886e1\src\System.Runtime\src\System.Runtime.csproj]
D:\j\workspace\windows-TGrou---c60886e1\Tools\ApiCompat.targets(58,5): error : TypeCannotChangeClassification : Type 'System.Single' is marked as readonly in the contract so it must also be marked readonly in the implementation. [D:\j\workspace\windows-TGrou---c60886e1\src\System.Runtime\src\System.Runtime.csproj]
D:\j\workspace\windows-TGrou---c60886e1\Tools\ApiCompat.targets(72,5): error : ApiCompat failed for 'D:\j\workspace\windows-TGrou---c60886e1\bin\Windows_NT.AnyCPU.Release\System.Runtime\uapaot\System.Runtime.dll' [D:\j\workspace\windows-TGrou---c60886e1\src\System.Runtime\src\System.Runtime.csproj]

@jkotas
Copy link
Member

jkotas commented Jul 24, 2018

Tizen armel Debug Build

These failures are caused by Tizen build picking up state CoreCLR build. Looks like an infrastructure problem. @tgiphil Could you please rebase the change against the current master to see whether it helps?

UWP NETNative x86 Release Build:

This is blocked by ProjectN codeflow latency. It will get fixed on its own once the ProjectN bits with this change reach CoreFX. It can be worked around by adding the two warnings to https://github.com/dotnet/corefx/blob/master/src/System.Runtime/src/ApiCompatBaseline.uapaot.txt .

@tgiphil
Copy link
Contributor Author

tgiphil commented Jul 25, 2018

@jkotas Rebased to corefix/master (git rebase corefx/master) and updated ApiCompatBaseline.uapaot.txt.

Feel free to make additional changes, if you want to push this faster than I can respond.

@jkotas
Copy link
Member

jkotas commented Jul 25, 2018

@dotnet-bot test Linux arm Release Build please

@jkotas jkotas merged commit 43f0fd2 into dotnet:master Jul 26, 2018
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…#30717)

* Changed internal value to readonly for primitive types

* Updated ApiCompatBaseline.uapaot.txt


Commit migrated from dotnet/corefx@43f0fd2
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants