-
Notifications
You must be signed in to change notification settings - Fork 17
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
1.0 release #146
Comments
Now that you mention it, I just remembered that that there is an RFC for 2-arg (I guess there is some chance that I'm not sure what's the best strategy here. Renaming the function might be the only option but |
I actually remember pondering about whether overloading |
I was playing with the idea to turn this into a more radical refactoring.
Pros
Cons
julia> using Setfield
julia> @lens(first(_)) ∘ @lens(last(_))
(@lens last(first(_))) Any thoughts @tkf ? |
I thought about If we are going to do such a radical change, probably it's the best timing for renaming the package #54. The name Accessors.jl discussed there is also kind of compatible with the direction of the "flipped" composition. I also think going duck typing (+ maybe some traits at some point) is a good approach. Since we don't have multiple inheritance, we can't express all the optics hierarchy in Julian type system. Anyway, to be honest I'm a bit scared of this direction but I'm in favor after all. One nice thing about "owning" the API function is that we can forget about the method ambiguities like JuliaCollections/DataStructures.jl#511. |
I think I just ran into this ambiguity, but for a different reason (because of method delegation) using Setfield: @set!
d = Dict(:k => (x=3,))
@set! d[:k].x += 4 # works
using DataStructures: DefaultDict
dd = DefaultDict((x=0,), :k=>(x=3,))
@set! dd[:k].x += 4 # does not:
|
Yeah, that's JuliaCollections/DataStructures.jl#511 |
Since you are talking about major refactoring and renaming of the package, maybe it should be considered how to (later) add support for sum types / prisms ... |
@MarkusLohmayer do you have some thoughts on this? |
I wish I had! |
Hi, this comment is totally off-topic 😅, but this thread seems to be the best place to ping Julians who are interested in optics. FYI, it looks like Keno is looking into organizing notations for AD based on Riley, Categories of Optics (https://arxiv.org/abs/1809.00738). See PDF here https://gist.github.com/Keno/4a6507b75288b1fe671e9d1cc683014f. Not sure where the discussion is happening but I saw this in slack: https://app.slack.com/client/T68168MUP/C6G240ENA/thread/C6G240ENA-1599261433.092100 |
Thanks @tkf . There is also the #catlab channel on slack. |
From the discussion in JuliaLang/julia#34821 it seems unlikely that it will conflict with our usage of |
Tagging a breaking release without breaking changes is not good because it requires all direct dependants to update their compact entries if they wish to continue receiving updates. The explanation here applies: https://discourse.julialang.org/t/please-be-mindful-of-version-bounds-and-semantic-versioning-when-tagging-your-packages/30708 Given that at least 74 packages directly depend on Setfield, I think it is worth it to yank 1.0 from the general registry and retag master as non-breaking. See JuliaMath/NaNMath.jl#59 for a similar case. This is a list of 46 packages that currently depend on Setfield and do not declare support for v1.1.0
|
Thanks @LilithHafner for bringing this up.
I agree, this is annoying. However we are talking about 1.0 here, which is a promise of stability. Personally, I am more likely to pick up a dependency that is version 1.x than the same dependency if it is 0.x. So in my view, the benefits clearly outweigh the cost here.
This release is months old. Yanking it will break packages that depend on |
You're right about yanking. I thaught it merely set a preference not to use a version but it actually makes it impossible to install (source). It would be nice if there was an easier way we could let the resolver know that it is okay to use setfield 1.0 anywhere 0.8 is used than making 46 PRs. |
Agreed would be handy to signal that this change is not breaking. I imagine 1.0 be non-breaking is quite common. Personally, I usually release 1.0 when I did not feel the need for breaking changes for a while. |
I think the API is pretty stable and the implementation is solid. What do you think about 1.0 @tkf ? Do you have any possible breaking changes in mind, we might want to do?
The text was updated successfully, but these errors were encountered: