Skip to content

langref: error return trace examples have regressed on master #17507

@mlugg

Description

@mlugg

Zig Version

N/A

Steps to Reproduce and Observed Behavior

See examples under https://ziglang.org/documentation/master/#Error-Return-Traces. Source locations have been lost in the error return traces:

$ zig build-exe error_return_trace.zig
$ ./error_return_trace
error: PermissionDenied
???:?:?: 0x21dc78 in bang1 (error_return_trace)
???:?:?: 0x21dd83 in baz (error_return_trace)
???:?:?: 0x21dda8 in bang2 (error_return_trace)
???:?:?: 0x21de13 in hello (error_return_trace)
???:?:?: 0x21dee0 in bar (error_return_trace)
???:?:?: 0x21dfb0 in foo (error_return_trace)
???:?:?: 0x21e008 in main (error_return_trace)

I'm unsure whether this is a compiler regression, or if we're doing something wrong when running the code to generate the langref.

Expected Behavior

The error return traces in this section should display line numbers and contents, as in the 0.11.0 docs: https://ziglang.org/documentation/0.11.0/#Error-Return-Traces

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorerror messageThis issue points out an error message that is unhelpful and should be improved.regressionIt worked in a previous version of Zig, but stopped working.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions