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

Update Ix.NET for .NET 8.0 sdk #2135

Merged
merged 23 commits into from
Jul 5, 2024
Merged

Update Ix.NET for .NET 8.0 sdk #2135

merged 23 commits into from
Jul 5, 2024

Conversation

idg10
Copy link
Collaborator

@idg10 idg10 commented Jul 1, 2024

Ix.NET had not been updated since the .NET 8.0 SDK shipped, and it turns out that we have:

  • build failures because MSBuild.Sdk.Extras has not been updated since .NET 5.0, and
  • vast numbers of compiler diagnostics because each SDK release gets pickier

This PR removes the use of MSBuild.Sdk.Extras. Nobody is maintaining it any more, so it's no longer viable to depend on it.

This also makes numerous small changes to comply with the majority of SDK diagnostics.

It leaves a small number in because they seem to indicate some genuine potential problems around cancellation. (They coincide with some "REVIEW" comments in the code indicating that possible problems here were already known about.)

idg10 added 14 commits June 28, 2024 10:31
The code generating the IQ-space versions of interfaces and operators in both Rx and Ix were written before nullability was added to C#. It appears that the workaround for this was to manually modify the generated files and then avoid ever running the generators again.

Unfortunately, the .NET 8.0 SDK was detecting errors in the generated code. Rather than repeat the cycle of patching this up manually again, I decided to fix the generator to be nullable-aware. This is a bit of a hack because we don't do a thorough job of processing nullability attributes (which is surprisingly difficult as a result of nullability not really being part of .NET's type system), but it works for the types we actually need to process.

This has also detected a couple of mistakes in the manual edits to the generator code.
Removed old NO_ARRAY_EMPTY conditional sections as no build targets now set that.

Remove use of MSBuild.Sdk.Extras
Reinstate netcoreapp3.1 target so that we test the netstandard2.1 build.
@idg10 idg10 added the [area] Ix label Jul 1, 2024
As far as it was possible to tell, the only thing we were using MSBuild.Sdk.Extras for was to associate reference assembly projects with their corresponding main projects. This was what was breaking the build, and it doesn't seem to be necessary. The .NET Runtime Library source code just has a "ref" folder each functionality area (and Ix would effectively be a whole area in itself) and for each real csproj, there's another in this folder with the same name set up to build the references.

The main thing MSBuild.Sdk.Extras seemed to be trying to do was automatically build the reference assemblies for us (which is what broke. Since the main CI build seems to go out of its way to avoid publishing the reference assemblies, it seems that nothing is using them anyway.

Also:

* Replace erroneous net4.8 TFM with net48
* Move
Copy link
Collaborator

@HowardvanRooijen HowardvanRooijen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. It's amazing how some of the new language features really clean up some of the boilerplate code.

@idg10 idg10 marked this pull request as ready for review July 4, 2024 05:24
@idg10 idg10 merged commit 5f831de into main Jul 5, 2024
9 checks passed
@idg10 idg10 deleted the feature/ix-sdk-80-fixes branch July 5, 2024 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants