-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 System.Runtime.Experimental package so users can still use the generic math preview #55678
Conversation
…generic math preview This reverts commit f6eb259.
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
I've marked this draft as we will need to version the experimental package "higher" than the regular package and am still trying to determine the appropriate way to do that. |
src/libraries/System.Runtime.Experimental/src/System.Runtime.Experimental.csproj
Outdated
Show resolved
Hide resolved
I think we should just compute a new FileVersion as a transformation of the existing one. Similar to what we do here
$(FileVersion) , perhaps parsing like runtime/eng/versioning.targets Lines 175 to 178 in 57bfe47
I believe that is set as part of the https://github.com/dotnet/arcade/blob/e7ede87875f41a9b3df898ae08da5ebc96e24f56/src/Microsoft.DotNet.Arcade.Sdk/tools/Version.targets#L14 So we'd need to run a target after that. |
Do we need to also update the File/Informational versions or is simply marking this as |
We shouldn't change |
src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
Show resolved
Hide resolved
…sion is 100 higher
src/libraries/System.Runtime/src/MatchingRefApiCompatBaseline.txt
Outdated
Show resolved
Hide resolved
src/libraries/System.Runtime.Experimental/System.Runtime.Experimental.sln
Show resolved
Hide resolved
src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
Outdated
Show resolved
Hide resolved
src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
Show resolved
Hide resolved
src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
Show resolved
Hide resolved
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.
This looks good to me. This was a fantastic turnaround on getting all of this put together.
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.
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.
Mono "change" LGTM.
Just so I'm clear on how this will work: the real runtime S.P.C is built with the generic math types defined. But the normal System.Runtime ref assembly will not have the extra interfaces. So a normal C# (or C++/CLI) build will only look at the non-experimental ref assembly and everything will work as before -System.Int32
is the same plain old type it is today. At execution time the new interfaces will be there, but we assume C++/CLI apps will not notice or care. Is that right?
Yes. Corelib and the System.Runtime implementation (which only contains type forwards) both contain all the new interfaces/methods. The ref assembly however is missing them which will allow incompatible tools (such as C++/CLI) to continue working by default. We then have an additional |
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<FeatureGenericMath>true</FeatureGenericMath> | ||
<!-- It is a core assembly because it defines System.Object so we need to pass RuntimeMetadataVersion to the compiler --> | ||
<RuntimeMetadataVersion>v4.0.30319</RuntimeMetadataVersion> |
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.
can this value change?
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.
I don't believe its meant to ever change. The project was largely copied identically from the main System.Runtime
and new property/items are under their own groups.
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.
It's meant to change whenever we change the assembly file format (like we did now for the static virtual methods). It would tell the old tools that the file is not compatible.
We haven't been changing the version despite doing breaking changes to the format in the hopes that things will "just work" for tools that don't know what the new things are. It sometimes works and sometimes it leads to obscure failure modes (like now for the C++ compiler in the presence of static virtuals).
src/libraries/System.Runtime.Experimental/tests/System.Runtime.Experimental.Tests.csproj
Outdated
Show resolved
Hide resolved
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.
Some questions but LGTM.
5f6742f
to
88a4ed8
Compare
5bbebbf
to
790a726
Compare
790a726
to
a91ea5c
Compare
Hello @tannergooding! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
@lambdageek, there appears to be some WASM failures but AFAICT all the tests should be disabled. Any pointers? |
f621131
to
0ab5f2d
Compare
Post-merge question (I was offline yesterday afternoon and today): Should the package instead be named |
We have existing tooling and infrastructure around packages and assemblies named |
Ah; got it. Thanks! |
Will |
That isn't currently planned. |
This re-enables the generic math feature by providing a System.Runtime.Experimental package so it can still be used/referenced via explicit opt-in without disrupting other tools/compilers, such as C++/CLI.
CC. @jeffhandley, @ericstj, @ViktorHofer, @terrajobst, @davidwrighton, @MadsTorgersen