-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: init seqWithCallPos #12715
base: master
Are you sure you want to change the base?
WIP: init seqWithCallPos #12715
Conversation
Provide internal information to a function. Since the return value of the function is completely ignored It can be considered safe. This pattern could help to improve traces by providing access to internal state of the evaluator in a safe manner.
builtins.seq a builtins.trace msg null | ||
) (a: a); | ||
in | ||
tracePos 42 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be converted to a test, but we should probably get some feedback from the Nix team first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. This file was mainly to show what would be possible. Before i go ahead and clean this up it should be discussed in the team if this is wanted at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more examples how this can be useful, would be probably helpful to motivate.
}); | ||
|
||
|
||
/* Determine whether the argument is an integer. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong description?
auto [rows,cols] = getWindowSize(); | ||
auto vCols = state.allocValue(); | ||
vCols->mkInt(cols); | ||
intro_args.insert(state.symbols.create("terminalWidth"), vCols , noPos); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed this builtin in the PR and propose to leave out the terminalWidth for the first iteration.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2025-03-24-nix-team-meeting-minutes-221/62113/1 |
Provide internal information to a function.
Since the return value of the function is completely ignored It can be considered safe.
This pattern could help to improve traces by providing access to internal state of the evaluator in a safe manner.
Motivation
Context
Designed and implemented together with @roberth
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.