-
Notifications
You must be signed in to change notification settings - Fork 752
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
Move UI and platform types out of System.Reactive #2084
base: main
Are you sure you want to change the base?
Conversation
Deprecate all UI-framework-specific and platform-specific types in System.Reactive. Add various System.Reactive.Integration.... packages with the replacement types.
@idg10 this looks great! Is there a reason why we can't drop the "Integration" bit and make these just System.Reactive.WindowsForms, System.Reactive.Wpf, etc? I was searching nuget.org but couldn't find any existing listed package (maybe they are deprecated and unlisted?). |
If you've been keeping track of this and the mammoth ADR that preceded it, the first BIG problem was working out what to do. The second BIG problem is working out what to call it 🤣 |
It looks like a few tests that fetched DispatcherScheduler.Current used to rely on the Dispatcher already having been created. Up until recently, that was true by random chance. But recent changes, which presumably have affected the order of test execution, mean that's no longer true. These tests should always have ensured a dispatcher was available before starting to run, and now they do.
There is already a I thought that for this thing to end up having two roles:
would be confusing, because those are almost diametrically opposed objectives. Also, the equivalent components for WPF and WinRT are pretty confusingly named in my opinion:
If we were to try to take these existing facade components and turn them back into the home for the new types, would we continue with the existing confusing split? Would we put all the WinRT types in the There are a few different workable answers to these questions, but none of them looked very good to me. The benefits (as I see it) of the new names are:
That said, I don't love the |
@idg10 For some reason I cannot find any of the other compatibility facades except for the WindowsRuntime one. Do you have links for them? I'm not sure if creating more packages will do anything to alleviate the confusion, in my experience this tends to always increase with number of packages. I will need to digest this a bit, but "Integration" seems far too abstract. If absolutely necessary to introduce a new root name I would prefer "PlatformServices" mainly because it has a recognisable meaning dating back to the original Rx architecture. |
@idg10 I think now I understand what is going on and why I couldn't find any of the existing packages, and it might actually work to our advantage if we are willing to clean everything up properly. Here is the list of the currently existing "integration" packages: My proposal would be to name the packages the following:
From this list, my understanding is we have overlap with just one package ( The aforementioned naming scheme I think would be the preferred one, since there is an implicit understanding that creating a sub-namespace with a platform or framework name means an integration with that platform or framework (this is used extensively within several existing Microsoft and third-party NuGet package names). |
* Add Obsolete attributes * Add the newly-public (was internal) member of AsyncLock
True, but we would have both of these:
I don't much like the idea of both of those existing. It's definitely the kind of thing where, if I encountered this in someone else's code I'd wonder what on earth they were thinking.
Here's one thing to consider. Those libraries still use the funky old versioning trick that #205 introduced in the attempt to work around one a problem that could occur when using Rx.NET in a plug-in. Code built against Rx.NET v3 may still be relying on that versioning trick—it will still have references to each of these older individual components instead of a single reference to So those all still have an That's OK today, because we know that any code using these old façade libraries is pretty old, so it presumably hasn't been updated since Rx 3.0. It's OK for the version numbers to have frozen on these things because those libraries haven't actually changed in all that time. But what if we start putting new non-façade code in there? What should the version number be then? If we don't update it, we could run into a problem where applications end up running against older versions than they are meant to. But if we do update it we run into a possible problem with binding redirects. Binding redirects often specify version ranges, which means if you upgrade 3.x to 4.x, it's possible that 3.0.4000.0 would get upgraded to 7.0.4000.0, which could actually mean a downgrade in surface area (because the x.x.4000.0 versions might have target-specific functionality that the x.x.2000.0 versions do not). I was actually considering marking these façade as deprecated because new code should not be using them, and all of the UI-framework-specific ones currently refer to types we intend to deprecate. It would be an extra tool to nudge people towards using the new types in place of the ones we want to deprecate. But if we start adding new content, then we break that assumption that code using these libraries is old. There are now two completely different audiences: very old code and very new code. It's true that I can't see a way in which this is absolutely guaranteed to be broken. (Although I might have missed something.) But it makes me very uneasy. |
Me personally, I don't really have any issue with |
Instead of "Integration" just use the word "For"
Everyone reading it will know exactly what it does, it's not taken already, and it's way shorter to type than "Integration" |
Have you considered Targets? very similar to the For suggestion. |
I think I'd like to see this follow the recent MS convention of ancillary stuff like frameworks and UI not having the So have it exist in a separate tree altogether; but what that tree is I don't know as I feel like all the reasonable prefix choices are probably burnt already. So, for example, you have...
and then something like...
Or...
|
I really like @anaisbetts suggestion of @dezfowler suggested not using I don't want to completely dismiss the idea (using something other than a It's worth noting that because Rx.NET is a .NET Foundation project, we are able to use certain reserved prefixes in our package names. Normally you're not allowed to publish packages with a name starting There are already Supply chain attacks have become very important over recent years, so I really don't want to remove a layer of protection against those that Rx.NET consumers currently get. So for me, these are the two main arguments against |
@idg10 The supply chain risk is a very good point and my suggestion was essentially around risks along those same lines... It seems the rule Microsoft are working to (which may be imaginary as I haven't actually found reference to this in the Framework Design Guidelines etc) is that System.* as a group of packages including the BCL is self contained and doesn't reference any packages outside of System.*. So that when a user installs a System.Blah package, they'd like for it to only reference the BCL or other System.* packages with similar provenance, licences, trust levels. Ideally, when I install something System.* I don't want to have to worry about it bringing in a package under GPL, for example. I notice that in amongst the packages on Nuget tagged with rxteam is this one... https://www.nuget.org/packages/Microsoft.Reactive.Testing/6.0.0 In this comment it seems this If this |
@idg10 I feel this suggestion is not acceptable for the following reasons:
Finally, I don't think I have ever seen packages or namespaces named using a composition of dot-separated verbs and nouns meant to be read as a sentence, and most definitely not in the
I agree these two forms should not coexist, and to me the solution here is simply to deprecate all legacy integration packages. This way it would make it clear to users what is the way forward. I understand the argument for backwards compatibility, but what we are discussing here goes beyond that, and is starting to create undue burden on the project maintainers and the rest of the community. Who is really using these packages and how do we assess their impact? Download counts is not enough unfortunately because these could be automated CI workflows or other deployment artifacts so I doubt they will give us a clear idea of the real impact of the change. These packages were designed in the .NET framework era which has been left behind by Microsoft itself. The .NET core team had no qualms to remove core features of .NET such as application domains, I keep having the strong feeling we are coming up with proposals that risk compromising the future of a great library by introducing further and further confusion, and I think continuing to update and support these old facade packages just keeps sending the wrong message to users, especially if they are advertised using names which are the most natural to look for. If we do have to give up on the natural names, then to me the best proposal I have seen so far is to go with |
I believe the idea is to use the |
@HowardvanRooijen thanks for the clarification, I agree the packages should be functional in that case. However, Also the point remains that the biggest source of confusion is that the "legacy" packages are still being maintained. They should be actively deprecated, and their updates discontinued as soon as possible. If we keep updating them and I don't have many other arguments and apparently it doesn't bother anybody else, so I'll leave it at that, but for the record this doesn't look good to me. |
That same comment I linked above says that the package name should match...
So if the intent is to not have a As I said, though, I would really like to see all of these integration packages using |
Deprecate all UI-framework-specific and platform-specific types in System.Reactive. Add various System.Reactive.Integration.* packages with the replacement types.
Resolves #1745
Resolves #1847
To be resolved before we can take this out of draft:
Integration
ApiApprovalTests
members for these new packagesSystem.Reactive.Integration.Uwp
can be a normal UWP class library so we can have one fewer uses ofMSBuild.Sdk.Extras