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

REPL: Completion on a LOAD_PATH mutation breaks LOAD_PATH #57780

Open
IanButterworth opened this issue Mar 15, 2025 · 1 comment · May be fixed by #57806
Open

REPL: Completion on a LOAD_PATH mutation breaks LOAD_PATH #57780

IanButterworth opened this issue Mar 15, 2025 · 1 comment · May be fixed by #57806
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior completions Tab and autocompletion in the repl REPL Julia's REPL (Read Eval Print Loop)

Comments

@IanButterworth
Copy link
Member

IanButterworth commented Mar 15, 2025

Note the #undef after the completion is generated here.

julia> Base.active_repl.options.hint_tab_completes = false
false

julia> LOAD_PATH
3-element Vector{String}:
 "@"
 "@v#.#"
 "@stdlib"

julia> append!(empty!(LOAD_PATH),<tab>
append!(a::Vector{T}, items::Union{Tuple, AbstractVector{<:T}}) where T @ Base array.jl:1349
append!(a::AbstractVector, iter) @ Base array.jl:1357
append!(a::AbstractVector, iter...) @ Base array.jl:1359
julia> append!(empty!(LOAD_PATH),^C

julia> LOAD_PATH
3-element Vector{String}:
 #undef
    "@v#.#"
    "@stdlib"

Doesn't happen here

julia> x = [1, 2, 3]
3-element Vector{Int64}:
 1
 2
 3

julia> append!(empty!(x),<tab>
append!(a::Vector{T}, items::Union{Tuple, AbstractVector{<:T}}) where T @ Base array.jl:1349
append!(a::AbstractVector, iter) @ Base array.jl:1357
append!(a::AbstractVector, iter...) @ Base array.jl:1359
julia> append!(empty!(x),^C

julia> x
3-element Vector{Int64}:
 1
 2
 3

Happens on b1fffb0 and #57767

@IanButterworth IanButterworth added completions Tab and autocompletion in the repl REPL Julia's REPL (Read Eval Print Loop) bug Indicates an unexpected problem or unintended behavior labels Mar 15, 2025
@topolarity
Copy link
Member

@aviatesk might know what's going on here

@aviatesk aviatesk self-assigned this Mar 17, 2025
aviatesk added a commit that referenced this issue Mar 17, 2025
As discussed with Jameson earlier, the effects of atomic pointer
operations are not precisely defined.
This commit includes the minimal changes necessary to fix
#57780, but a more extensive audit is planned for later.

- closes #57780
@aviatesk aviatesk linked a pull request Mar 17, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior completions Tab and autocompletion in the repl REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants