PSA: Parametric method syntax deprecation about to drop

maybe replace https://gist.github.com/ZacLN/2f0d66c651647e32eae85e58102315cb#file-fixdep-jl-L47 with

push!(last(diags).actions, CSTParser.Diagnostics.TextEdit(loc1:loc1, string(" where {", replace(join((Expr(t) for t in sig.args[1].args[2:end] if !(t isa EXPR{P} where P <: PUNCTUATION)), ","), " ", ""), "}")))

It would be great if the auto-patching tool appeared formally in the ecosystem instead of only being a gist in a forum thread. It doesn’t seem like a huge stretch to put it in Compat.

In addition to discoverability, this also has the benefit that the deprecation warning itself could potentially advise to run the official patching tool.

3 Likes

It already lives in LanguageServer.jl (accessible through julia-vscode, with limited Atom and emacs support) , along with other deprecation autofixes.

It would be better to have scripts that are not tied to any particular editor. +1 for having an update-methods.jl or similar script distributed with Compat.

1 Like

The scripts posted above are just pure julia.

Yes, I know; would you consider submitting a PR to Compat.jl?

I don’t think a dependency on CSTParser would be accepted.

@Keno and @ZacLN are working on factoring this out and making it usable even without VS Code.

2 Likes

Now done: https://discourse.julialang.org/t/ann-femtocleaner-our-newest-robot-intern

2 Likes