I find this ParseError on a windows machine, can you reproduce?
function add_circuit_breaker_pair_module!(model, P_BUS_1, P_BUS_2,
p_ES, G, pLent, pEV_1, pU_1, pAC_1, D_1,
pEV_2, pU_2, pAC_2, D_2)
pBus_1 = v(model, [1:T], lower_bound = -P_BUS_1, upper_bound = P_BUS_1)
end;
copy this code, paste to REPL
julia> function add_circuit_breaker_pair_module!(model, P_BUS_1, P_BUS_2,
ERROR: ParseError:
# Error @ REPL[1]:1:67
function add_circuit_breaker_pair_module!(model, P_BUS_1, P_BUS_2,
# └ ── Expected `)` or `,`
Stacktrace:
[1] top-level scope
@ REPL:1
Seems it’s a new error in 1.12.1, I haven’t seen this before.
1 Like
By the way, why do this still persist in 1.12? (I proposed this a few months ago)
julia> let x = 1 #
ERROR: ParseError:
# Error @ REPL[1]:1:10
let x = 1 #
# └ ── premature end of input
Stacktrace:
[1] top-level scope
@ REPL:1
Occurs both in Linux and Windows
Benny
October 19, 2025, 2:35am
3
WalterMadelim:
can you reproduce?
Yes on Windows. Pasting the whole method definition directly or into a quote is fine on 1.11.7, but throws ParseError on 1.12.1; pasting into a multi-line string or pasting individual lines between manual newlines is fine either way.
Did you open an issue? If so, you can see what progress has been made on it, if any.
1 Like
opened here
opened 03:49AM - 19 Oct 25 UTC
copy the following code
```julia
function add_circuit_breaker_pair_module!(model… , P_BUS_1, P_BUS_2,
p_ES, G, pLent, pEV_1, pU_1, pAC_1, D_1,
pEV_2, pU_2, pAC_2, D_2)
pBus_1 = v(model, [1:T], lower_bound = -P_BUS_1, upper_bound = P_BUS_1)
end;
```
paste to a REPL:
```julia
julia> function add_circuit_breaker_pair_module!(model, P_BUS_1, P_BUS_2,
ERROR: ParseError:
```
windows, julia 1.12.1
from https://discourse.julialang.org/t/end-of-line-parseerror/133273?u=waltermadelim
Benny:
Did you open an issue?
fix: skip zero-width error tokens in last_non_whitespace_byte by pfitzseb · Pull Request #566 · JuliaLang/JuliaSyntax.jl
Benny
October 19, 2025, 4:00am
5
Any idea what versions that fix was released on, if any? I don’t know how to tell exactly, looks like it only made its way to the main Julia repo 2 days ago?