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

Deprecated order #471

Closed
andreasvarga opened this issue Feb 23, 2023 · 3 comments
Closed

Deprecated order #471

andreasvarga opened this issue Feb 23, 2023 · 3 comments

Comments

@andreasvarga
Copy link

After updating to the last version of Polynomials, I have trouble to execute my own programs.

julia> using DescriptorSystems
julia> sys = rss(3,3,3);  # generate a system
julia> order(sys)
ERROR: MethodError: no method matching degree(::DescriptorStateSpace{Float64, LinearAlgebra.UniformScaling{Bool}})
Closest candidates are:
  degree(::ImmutablePolynomial{T, X, N}) where {T, X, N} at C:\Users\Andreas\.julia\packages\Polynomials\UpyN2\src\polynomials\ImmutablePolynomial.jl:115   
  degree(::SparsePolynomial) at C:\Users\Andreas\.julia\packages\Polynomials\UpyN2\src\polynomials\SparsePolynomial.jl:81
  degree(::LaurentPolynomial) at C:\Users\Andreas\.julia\packages\Polynomials\UpyN2\src\polynomials\LaurentPolynomial.jl:220
  ...
Stacktrace:
 [1] order(args::DescriptorStateSpace{Float64, LinearAlgebra.UniformScaling{Bool}})
   @ Polynomials .\deprecated.jl:48
 [2] top-level scope
   @ REPL[15]:1

julia> @which order(sys)
order(args...) in Polynomials at deprecated.jl:45

I would appreciate any suggestion to cope with this conflict.

I know, the standard solution is just importing Polynomials.order before defining my own DescriptorSystems.order. And this works.

But... this, probably, prevents using earlier versions, where order was not exported.

Also how long the deprecated Polynomial.order will be exported in the future?

I hope there is an elegant solution to cover all possible use cases to avoid the conflict.

@andreasvarga
Copy link
Author

I tried with

isdefined(Polynomials,:order) && (import Polynomials: order)

which works.

@jverzani
Copy link
Member

So I haven't looked, but this was a bit unexpected. I thought we just deprecated order but it seems we also exported the deprecated method in the process? That seems like a bug. Let me see how to address it.

@jverzani
Copy link
Member

I just tagged a release that should avoid this issue. Sorry about this, it was unexpected.

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

No branches or pull requests

2 participants