julia icon indicating copy to clipboard operation
julia copied to clipboard

JuliaSyntax: fix anonymous function parsing

Open IanButterworth opened this issue 1 month ago • 4 comments

Fixes https://github.com/JuliaLang/julia/issues/60202

julia> function zip_missing(::Tuple{}, longer)
		      map(function (second_one)
		          (missing, second_one)
		      end, longer)
		  end
zip_missing (generic function with 1 method)

Written by Claude

IanButterworth avatar Nov 24 '25 03:11 IanButterworth

Just for reference, @KristofferC just touched this code in https://github.com/JuliaLang/JuliaSyntax.jl/pull/580

Keno avatar Nov 24 '25 04:11 Keno

The fix here has become quite complicated.. @c42f @KristofferC

IanButterworth avatar Dec 03 '25 15:12 IanButterworth

Would it be possible to add a unit test for this? (incl. for the previous change that affected this part of the code)

Did we actually find out where the error comes from (by bisecting starting from Julia-1.12)?

fogti avatar Dec 05 '25 11:12 fogti

There are a couple of tests added already.

I believe the issue was introduced by https://github.com/JuliaLang/JuliaSyntax.jl/pull/580

IanButterworth avatar Dec 05 '25 14:12 IanButterworth

It would be great to get this in better earlier than later. As long as https://github.com/JuliaLang/julia/issues/60202 is unresolved, Unzip.jl won't precompile, including all of its dependents (which e.g. contain Plots.jl and thus a rather large fraction of the ecosystem), and any nanosoldier runs for other changes in nightly won't check these packages at all

lgoettgens avatar Dec 19 '25 11:12 lgoettgens

Agreed. This still needs review by someone familiar with JuliaSyntax for the general approach.

IanButterworth avatar Dec 19 '25 12:12 IanButterworth