Skip to content

Silent @warn allocates in VSCode but not in terminal #3414

@artemsolod

Description

@artemsolod

This allocates differently in terminal and VSCode: (julia 1.9.3, julia-vscode v1.52.2, MacOS & ubuntu)

using BenchmarkTools

function warn_f(x)
    @warn "Warning" maxlog=1
end

function foo(x)
    warn_f(x)
    x
end

foo(3) # prints warning
@btime foo(3)
# 6.492 μs (41 allocations: 5.66 KiB) in VSCode
# 48.283 ns (0 allocations: 0 bytes) in terminal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions