Login
You're viewing the ruby.social public feed.
  • Oct 29, 2026, 11:19 AM
    Guix System (and Guix Home soon) has a few on-error strategies configurable via the --on-error= option. By default it's nothing-special, there're also backtrace (which displays a backtrace) and debug (which enters Guile's debugger).

    I think backtrace is generally more useful to check one's configuration, but what it outputs appears to contain too little information. I was impressed by BLUE's backtrace when I started to use it, so I wonder what it looks like if it's used for Guix

    The answer is actually quite simple: there's no magic in BLUE's backtrace, it just goes one step further ;)

    The screenshot below shows the comparison, what Guix currently outputs (display-backtrace) on the left side, and with BLUE's print-backtrace on the right. They're almost identical, except that BLUE's also finds and outputs file content in addition to the line numbers.

    #guix
    Backtrace printer comparison for `guix system build --on-error=backtrace`, Guile's builtin printer on the left side and BLUE's on the right.  They're almost identical, except that BLUE's also finds and outputs file content in addition to the line numbers.
    💬 3🔄 6⭐ 0

Replies

  • Oct 29, 2026, 2:44 PM
    I didn't try to enable BLUE's color support. Here's the same backtrace, but with colors.

    #guix
    The same backtrace, but with color support enabled.  It's easier to read now.
    💬 1🔄 1⭐ 0
  • Oct 29, 2026, 11:56 AM

    that's great @hako! I'm always looking forward to your posts.

    PS: It seems you don't have coloring enabled. You are missing the syntax highlighting and the clickable links :)

    Image attached toot
    💬 0🔄 0⭐ 0
  • Oct 29, 2026, 1:15 PM

    @hako One possible problem with BLUE’s backtraces is that they’re verbose, which could end up scaring people away.

    But what we should probably do is narrow the part of the stack that is shown, at least when the error happens within ‘load*’: people shouldn’t see the (guix scripts …) and the (ice-9 boot-9) bits. (It’s easy quite to do: ‘make-stack’ lets you specify narrowing.)

    💬 4🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Oct 29, 2026, 4:24 PM
    @civodul@toot.aquilenet.fr The outer cut isn't working for some reason? Current code specifies tag as the outer cut
    (make-stack #t handle-error tag)

    but the backtrace still shows it (it's the same 6 in previous screenshots)
    6: (_) at guix/ui.scm:361:17
          ┌
       358│             ;; Hide the "auto-compiling" messages.
       359│             (parameterize ((current-warning-port (%make-void-port "w")))
       360│               (call-with-prompt tag
    >  361│                 (lambda ()
          │                 ^
       362│                   ;; Give 'load' an absolute file name so that it doesn't
       363│                   ;; try to search for FILE in %LOAD-PATH.  Note: use
       364│                   ;; 'load', not 'primitive-load', so that FILE is
          └
    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 1