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

Allow deprecation of curly Exprs #9830

Closed
jiahao opened this issue Jan 18, 2015 · 6 comments
Closed

Allow deprecation of curly Exprs #9830

jiahao opened this issue Jan 18, 2015 · 6 comments
Labels
deprecation This change introduces or involves a deprecation help wanted Indicates that a maintainer wants help on an issue or pull request

Comments

@jiahao
Copy link
Member

jiahao commented Jan 18, 2015

In #9820 @matrixmorpheus attempted to deprecate the constructor Triangular{S, T, :U, true} which no longer exists on 0.4-dev. However,

julia> @deprecate Triangular{S, T, :U, true} Base.LinAlg.UnitUpperTriangular
ERROR: invalid usage of @deprecate

This error is triggered currently because the expression being deprecated is not currently supported.

julia> dump(:( Triangular{S, T, :U, true}))
Expr 
  head: Symbol curly
  args: Array(Any,(5,))
    1: Symbol Triangular
    2: Symbol S
    3: Symbol T
    4: QuoteNode 
      value: Symbol U
    5: Bool true
  typ: Any

(@deprecate only handles Exprs with head == call currently).

I tried to change this line to add the last || ... clause:

isa(old,Expr) && (old.head == :call || old.head == :curly)

but this resulted in a new error instead when I tried to execute the same @deprecate command:

ERROR: syntax: invalid assignment location

so I'm not sure how to fix this.

@ivarne ivarne added the help wanted Indicates that a maintainer wants help on an issue or pull request label Jan 19, 2015
@JeffBezanson
Copy link
Member

I don't think there is any good way to do this.

@jakebolewski
Copy link
Member

Unfortunately this means implementing something along the lines of #8240 would be hugely breaking.

@tkelman
Copy link
Contributor

tkelman commented Sep 16, 2015

Does this work now given 1b6efc7 ?

@JeffBezanson
Copy link
Member

It works only if just the name changes; we don't have a way to deprecate given combinations of type parameters.

@ViralBShah
Copy link
Member

@JeffBezanson Should we close this?

@JeffBezanson JeffBezanson added the deprecation This change introduces or involves a deprecation label Sep 9, 2017
@JeffBezanson
Copy link
Member

We don't have this feature, but it's also pretty hard to implement and I have no immediate plans to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation This change introduces or involves a deprecation help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
None yet
Development

No branches or pull requests

7 participants