-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Moved to generics #2866
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
base: master
Are you sure you want to change the base?
Moved to generics #2866
Conversation
|
For context on if I were to make this real I would just change the existing |
Kryptos-FR
left a comment
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'm no against it if there are no regression.
I don't think we can do a transition with an duplicated obsolete and non-obsolete property. That would be messy. So it has to be a breaking change IMO.
sources/core/Stride.Core/Collections/TrackingCollectionChangedEventArgs.cs
Outdated
Show resolved
Hide resolved
|
Im ok with it being a breaking change. I think it would be fairly easy to tell people how to migrate as they just need to define their types but I just dont want to wait for this to release 😆 I was also thinking of making a seperate event args for Lists since they shouldnt need to define 2 types and would simplify the |
|
I went ahead with the implementation that separates the definition between collections and keyed collections. This was a lot nicer to work with at a higher level and just looked cleaner overall. Would this be able to be pushed in to main as a revision breaking change or would it have to wait for the major/minor release? |
Eideren
left a comment
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.
Looks good, just minor stuff. Have you looked at the samples solution if there is any remnant over there as well ?
sources/core/Stride.Core/Collections/TrackingCollectionChangedEventArgs.cs
Show resolved
Hide resolved
|
I'll change this to draft for organizational purposes, feel free to change it back when ready :) |
|
I should have resolved all of the issues brought up before. I also have some of my time back for the next couple of weeks so I should be a bit more active than I was. |
|
Given that we just released 4.3, I think it would make sense to start a Alternatively, we could have a |
|
Im ok with that, this doesnt "fix" an issue and is just a QOL change so its not urgent. I think we talked about a |

PR Details
This PR shows a POC that would reduce the amount of required casts by users. I don't want to merge this but I was curious on what the thoughts would be on something like this as using object causes a ton of casting and required checks to be usable. Ideally I would redo this PR but with the
Obsoleteattribute. The only variable that gets in the way isCollectionChangedas I dont know what the non-obsolete variable would be called.I also still need to verify that there wont be weird checks in the GameStudio layers as I assume they may not like generics as much as objects.Works fine.Related Issue
No related issues. I ran into this today trying to use tracking collections for a modular system I am experimenting with as seen in the code snippet below:
Types of changes
Checklist