Enter debugger more reliably in let expressions and function calls#9917
Merged
thufschmitt merged 2 commits intoNixOS:masterfrom Feb 8, 2024
Merged
Enter debugger more reliably in let expressions and function calls#9917thufschmitt merged 2 commits intoNixOS:masterfrom
let expressions and function calls#9917thufschmitt merged 2 commits intoNixOS:masterfrom
Conversation
let expressions and function calls
thufschmitt
suggested changes
Feb 8, 2024
Comment on lines
+1333
to
+1334
| "while evaluating a '%1%' expression", | ||
| "let" |
Member
There was a problem hiding this comment.
Can't we just replace that by
Suggested change
| "while evaluating a '%1%' expression", | |
| "let" | |
| "while evaluating a 'let' expression" |
and not add the formatting logic in makeDebugTraceStacker?
Member
There was a problem hiding this comment.
Ah nvm, I didn't notice that makeDebugTraceStacker was already using hintfmt, just with a hardcoded number of 2 elements 😬 .
It makes sense to make it a bit more generic then
Contributor
Author
There was a problem hiding this comment.
This also colors "let" magenta like the other things in error messages.
Member
There was a problem hiding this comment.
Oh, right :) This thing is still too magical for me
thufschmitt
approved these changes
Feb 8, 2024
lf-
added a commit
to lf-/nix
that referenced
this pull request
Mar 6, 2024
lf-
added a commit
to lf-/nix
that referenced
this pull request
Mar 6, 2024
lf-
added a commit
to lf-/nix
that referenced
this pull request
Mar 6, 2024
lf-
added a commit
to lf-/nix
that referenced
this pull request
Mar 10, 2024
lf-
added a commit
to lf-/nix
that referenced
this pull request
Mar 10, 2024
lf-
added a commit
to lf-/nix
that referenced
this pull request
Mar 13, 2024
tebowy
pushed a commit
to tebowy/nix
that referenced
this pull request
Jul 11, 2024
…ably Enter debugger more reliably in `let` expressions and function calls (cherry picked from commit c4ed92f) Change-Id: I16d0cad7e898feecd2399723b92ba8df67222fb4
tebowy
pushed a commit
to tebowy/nix
that referenced
this pull request
Jul 11, 2024
Change-Id: Ib0591e1499c5dba5e5a83ee75a899c9d16986827
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Currently, if you attempt to evaluate this file with the debugger:
Nix will correctly enter the debugger at
builtins.break a, but if you ask it to:continue, it'll skip over thebuiltins.break "hello"expression entirely:This is because the set of debug traces is empty by the time Nix gets to the second call:
nix/src/libexpr/primops.cc
Line 757 in 0127d54
With this patch, Nix will correctly enter the debugger both times:
Context
Fixes #6649.
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.