-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Deprecate IntSet complement and stored zeros #12270
Conversation
Hmm, a new LLVM assertion from Win 32bit??? |
And a silent worker exit on Travis which is NOT a OOM error? |
489dde3
to
be2c6ea
Compare
I love the name of this branch. |
@@ -745,8 +745,6 @@ export | |||
any!, | |||
any, | |||
collect, | |||
complement!, | |||
complement, |
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 paves the way towards better IndexSet semantics.
489dde3
to
83f4f2e
Compare
I ran this PR through about a dozen CI runs this weekend, with and without the deprecation of storing zero (since I thought that might be what had triggered the assertion failure). All passed. I think this is ready to go once CI gives the green check for the rebase. |
=). I also checked a few times and didn't see it either. I think we probably don't need to worry about it right now. |
👍 (but I really want to see it with the rename, because |
Deprecate IntSet complement and stored zeros
Hmm, I just came across a use case where the complement feature would have been quite nice. Maybe we should resurrect IntSet in DataStructures? |
Or compose it with the Complement branch I once had for indices. |
My grand plan has been to move my PR over at #10065 to a ComplementableIndexSets package of some sort, but DataStructures seems like a great home (and much better name). Perhaps that should happen sooner rather than later. My use-case for complements will be for indexing all-but-some indices (#1032). Perhaps it can pun on I had forgotten about the complement branch (#4892). That could be a very interesting addition to DataStructures. |
I'm wondering if you can consider rolling back the change to IntSet (that it can no longer hold 0's) and instead focus on the new classes called IndexSet and so on. The manual states that IntSet can hold 'nonnegative' integers, and probably there are many existing codes that count on this behavior. -- Steve Vavasis |
So I think the idea is that It sounds like there might be more of a need for this feature than had been thought, so migrating it to DataStructures and making it available there should probably be done sooner rather than later. |
Why not introduce the changes under a new name like |
Yeah, I considered that. Moving things out of base has been tough in the past, so that's why I went for modifying it instead. I thought this would be the most graceful transition, but perhaps that's not true. I'm open to other paths to the end goal here, but it's got to happen soon. |
How about the following plan: leave IntSet in Base and don't deprecate in(0,IntSet()). Create the new class IndexSet also in Base and use this for the internals. Then, if there is time before the 0.4 release, move IntSet to DataStructures, but if there is not, postpone this change until 0.5. To ease the transition, IntSet can temporarily lie in both Base and DataStructures so that users can prepare for the transition early by including the declaration "using DataStructures.IntSet" By the way, as was pointed out earlier, based on its name, IntSet should really be able to hold any integer. It doesn't seem like much existing code would be broken if IntSet were extended (perhaps in 0.5) to include negative integers as well. Finally, as I and several others have mentioned in the past, there really should be an abstract class called AbstractSet that sits above IntSet, Set, DataStructures.SortedSet, and the proposed new class IndexSet. |
I agree totally with Stephen here |
There isn't time to do any major feature development on this before 0.4. We could simply revert this PR, but then users who hadn't noticed this deprecation on a nightly won't know changes are coming until some time during 0.5-dev. IntSet can temporarily be in both Base and DataStructures already whether or not we revert this, just don't export the DataStructures version from the package while the package is supporting any versions of Julia where the type is present in Base. The version put in DataStructures could be fancier and try to support negative integers without worrying about the development constraints or release schedule of base. The base version of IntSet shouldn't be trying to add new features if the plan is to move it out to a package anyway. |
I'd favor moving IntSet whole cloth to DataStructures and making IndexSet incompatible with it. We can leave a stub in deprecations indicating that people should use DataStructures if they need IntSet. |
Sounds good. |
Please see JuliaCollections/DataStructures.jl#114 |
Bump. This has been deprecated since 0.4. Should these have started throwing an error? Deprecations should at least leave a note in |
Ah, awesome. I had totally forgotten about this. I think that we can now move to #10065 without any performance impact since we can now make |
As discussed in #10065 (comment), this deprecates
complement
,complement!
, and the ability to explicitly store and test for zero inIntSet
, paving the way for a much simpler and more straightforwardIndexSet
in 0.5. This doesn't do the rename. I figure that can happen when we start changing the internals.Also fixes a bug in
pop!
.(Temporarily without the stored zeros deprecation to try and determine if that was the trigger for the intermittent CI failures)