Skip to content
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

Forbid incompatible IntervalArithmetic v0.21 #44

Closed
wants to merge 1 commit into from
Closed

Conversation

schillic
Copy link
Member

@schillic schillic commented Aug 24, 2023

This is mainly to prevent attempts from CompatHelper.

Since there are explicit tests for Rationals, I presumed that they should be supported. But they were dropped in IntervalArithmetic v0.21. For the record, this is the first error in the tests:

Univariate monomial, rational: Error During Test at BernsteinExpansions/test/runtests.jl:24
  Test threw exception
  Expression: univariate(x ^ 3, 3, Interval(1 // 1, 2 // 1)) == [1 // 1, 2 // 1, 4 // 1, 8 // 1]
  MethodError: no method matching Interval(::Rational{Int64}, ::Rational{Int64})

@schillic schillic marked this pull request as ready for review August 24, 2023 17:58
@lucaferranti
Copy link
Member

lucaferranti commented Aug 24, 2023

the following works

julia> interval(1//2, 2//1)
[1//2, 2//1]

@schillic
Copy link
Member Author

Oh I see, the whole constructor Interval was removed. Then I will change here.

@schillic schillic marked this pull request as draft August 24, 2023 18:55
@mforets
Copy link
Member

mforets commented Aug 24, 2023

ok, this will need quite some changes in downstream packages. we can start addressing that tomorrow..

edit: for a moment i thought IA v1.0 was released and some breaking changes were introduced (such as removing IntervalBox), but its' not the case yet.

@schillic
Copy link
Member Author

There are many breaking changes actually (but IntervalBox is still there ... for now). For instance, the constructor Interval(...) was removed. This causes the error above. But I realized (thanks @lucaferranti) that we can just use the function interval instead. Since this constructor was only used in the tests, this did not even require changes to the code for this package.

I close this in favor of #45.

@schillic schillic closed this Aug 24, 2023
@schillic schillic deleted the schillic/IA branch August 24, 2023 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants