-
Notifications
You must be signed in to change notification settings - Fork 27
refactor!: Seal the Dependency class #140
refactor!: Seal the Dependency class #140
Conversation
changelog, please! |
Also, we'll have to make this a breaking change to be paranoid |
Since it had a private constructor before this change nobody could extend it, so I don't think we'd have to mark this as breaking? EDIT: Ah, but they could have extended the subclasses... |
This is the annoying bit. It's like 99% likely to NOT be a problem...but... |
@devoncarew @natebosch @jakemac53 – thoughts on breaking change or not here? |
@kevmoo @natebosch @jakemac53 @devoncarew can we land this PR and #137 before moving the repo? |
I'm waiting for a second opinion on sealing the classes being breaking... |
Isn't there some google stick you can poke them with? 😅 Right, now we get this of course:
Imho I don't think we'd need to do a breaking change for this change, it's do incredibly unlikely that it would cause any breakage for anyone. I'll set it back to 1.3.1, and if you disagree I'll make it 2.0.0 again. |
I guess the argument is that people couldn't have subclassed Dependency, they could have subclasses of SdkDependency, PathDependency, ..., but that it's unlikely that people would have actually done that? So technically a breaking change but one that's unlikely to break anyone in practice. Do we know if the main users (a few of https://pub.dev/packages?q=dependency%3Apubspec_parse) are safe w/ this change? |
@devoncarew I went through the two first pages (based on likes) and none of them extends any of the |
Yeah I think it would be OK to land this without a major version change. We should switch to a feature version bump though. |
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.
We will need to update the pubpsec too.
Co-authored-by: Nate Bosch <[email protected]>
@natebosch bumped to 1.4.0 |
Thanks @spydon ! |
* fix: Don't use runtimeType for toString
Seals the
Dependency
class to make it easier to pattern match over the types.