-
Notifications
You must be signed in to change notification settings - Fork 12
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
Semantic versioning #16
Comments
The bug in question can be reproduced in 1.3.0: julia> using CircularArrays
julia> vec = CircularVector([1, 2])
2-element CircularVector(::Vector{Int64}):
1
2
julia> push!(vec, 3)
ERROR: MethodError: no method matching resize!(::CircularVector{Int64, Vector{Int64}}, ::Int64)
Closest candidates are:
resize!(::Vector{T} where T, ::Integer) at array.jl:1101
resize!(::BitVector, ::Integer) at bitarray.jl:810
Stacktrace:
[1] _append!(a::CircularVector{Int64, Vector{Int64}}, #unused#::Base.HasLength, iter::Tuple{Int64})
@ Base ./array.jl:989
[2] append!(a::CircularVector{Int64, Vector{Int64}}, iter::Tuple{Int64})
@ Base ./array.jl:981
[3] push!(a::CircularVector{Int64, Vector{Int64}}, iter::Int64)
@ Base ./array.jl:982
[4] top-level scope
@ REPL[7]:1 but can also be reproduced in 1.1.0. I am not sure why it worked before on Meshes and why it no longer does. Anyway, the problem seems to come from |
I see that pushing/appending to a circular array does not work and is even tested for not working. The problem seems to come deeper from a change in behavior on broadcasting, where the result of a broadcast yields a value of type |
Calling 1.3.0 introduced a fix to broadcast behaviour where broadcasting over a circular array would produce a circular array where applicable (#15). Broadcasting not returning a circular array was a bug and relying on the type conversion during a broadcast operation is something that should arguably be fixed in the code downstream. The update introduced a larger number of methods, so if any regressions occur, be sure to let me know. However, without any reproduction steps or examples, I cannot do much. |
Indeed we found that we were relying on broadcasting giving a vector, which was a happy coincidence that made the code work but definitely not a better behavior. The rationale behind not allowing @juliohm I think we can close this issue. |
Thank you all, let's close the issue and try to fix it downstream then. 👍🏽 |
This package is a dependency in Meshes.jl and we recently started having issues with a non-working
resize!
function. I think this is probably related to semantic versioning misunderstanding...When you updated from 1.1 to 1.2 to 1.3 you adopted the following rule? https://semver.org/spec/v2.0.0.html#spec-item-7
Our tests are failing now downstream. Could you please double check and help fix the issues?
Also, I reiterate the importance of placing this package in an organization where multiple members can help maintain and double check these things before submitting disruptive new releases.
The text was updated successfully, but these errors were encountered: