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

Pasting multi-line input eats comment #57439

Open
lgoettgens opened this issue Feb 17, 2025 · 1 comment
Open

Pasting multi-line input eats comment #57439

lgoettgens opened this issue Feb 17, 2025 · 1 comment
Labels
parser Language parsing and surface syntax REPL Julia's REPL (Read Eval Print Loop)
Milestone

Comments

@lgoettgens
Copy link
Contributor

lgoettgens commented Feb 17, 2025

We experience this in Oscar.jl (cf. oscar-system/Oscar.jl#4402 (comment))

Try pasting the full code block into the REPL:

julia> x = 1
       # hello
1

If you paste this in 1.11 it looks exactly like here, in 1.12-nightly (08d3c70) and nightly (f6e2b98) it changes to:

julia> x = 1
1

cc @benlorenz @c42f

@ViralBShah ViralBShah added the parser Language parsing and surface syntax label Feb 17, 2025
@benlorenz
Copy link
Contributor

It will also ignore all code following a comment (outside of arrays/tuples/blocks), pasting this

julia> x = 1
       #hello
       y = 2

will just print:

julia> x = 1
1

and y is not assigned.

For 1.11 and 1.10 it prints:

julia> x = 1
       #hello
1

But y is also ignored.

@KristofferC KristofferC modified the milestones: 1.2, 1.12 Feb 17, 2025
@KristofferC KristofferC added the REPL Julia's REPL (Read Eval Print Loop) label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser Language parsing and surface syntax REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

No branches or pull requests

4 participants