Skip to content

Bug in user path replacement in stacktrace #39674

@akosuas

Description

@akosuas

My home directory, /home/akosuas, is a symlink to /data/home/akosuas.

In 1.6, the new stacktrace printing is broken when the code is being run from /data/home/akosuas. It prints paths like:

....
 [5] top-level scope
  @ /data~/foo/bar

Because it is doing a replace("/data/home/akosuas", "/home/akosuas" => "~") rather than a prefix-replace:
https://github.com/JuliaLang/julia/blob/master/base/errorshow.jl#L556

At minimum, it would be nice to avoid this bug. Even better, perhaps, would be to resolve whether any prefix of the path, after resolving symlinks, is the home directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviordisplay and printingAesthetics and correctness of printed representations of objects.regressionRegression in behavior compared to a previous version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions