Closed oded-zahavi closed 5 years ago
This is fixed in dry-validation 0.13.0 and there's also 0.12.3 which doesn't pull in dry-logic 0.5.0. Can you upgrade dry-v?
Hey thanks for the very prompt reply. Upgrading dry-validation seems to fix the issue. However, imho this is still a breaking API change requiring a major version upgrade, since the two gems are decoupled. Up to you.
Not sure what you mean, dry-logic 0.5 is a major release, so is dry-validation 0.13
That's a question I've had for quite a time, do you use https://semver.org/ ? (note that as the gem hasn't reached 1.0.0 yet, any version change can break everything according to semver)
If not, could you explain your versioning scheme somewhere?
0.x bump means a major version bump, 0.x.y bump is a minor, backward compatible change. This is done according to how the ~>
operator works
x.Y.z is usually considered a minor version (added functionality) in x.y.z scheme. x.y.Z is considered a patch/fix, i.e. bug fix (or a change in internal implementation), as @TiteiKo suggested. Per semver (https://semver.org/#spec-item-8), major version (breaking changes) should by X.y.z. I guess this is what caused our bug.
@oded-zahavi these rules are applicable for post-1.0.0 versions. Semver states 0.x.y versions are not considered stable and can break anything at any moment https://semver.org/#spec-item-4 We don't do breaking changes when incrementing y
in 0.x.y
but incrementing x
is a major bump. Once we release 1.0.0 we'll follow the rules you referenced, that's what we do for dry-initializer and dry-monads atm.
I am well aware. Thanks.
I'm closing this since there's nothing else related to this issue that needs to be done.
Hi,
When upgrading trailblazer I got dry-logic upgraded as well. As part of the upgrade, method
none?
became an alias to a new methodnil?
, which implements the same logic.I assume this alias was there in order to keep backward compatibility and not to break the API: https://github.com/dry-rb/dry-logic/compare/v0.4.2..v0.5.0#diff-e2e34652eb2e31cc606bab1f22f63c82R17However, This breaks Ruby's nil method: If calling applications called
nil?
assuming they are calling Ruby'snil?
method, they now call dry-logic'snil?
method, which requires one argument thus fails: