Skip to content
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

Add traceContext primop #4728

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

matthewbauer
Copy link
Member

@matthewbauer matthewbauer commented Apr 21, 2021

This primop lets you get information on paths realised (pathExists,
import, readFile) by Nix. It tracks paths realised in Nix & puts the
results under the "paths" attr. For instance:

$ nix eval --impure --expr '(builtins.traceContext (import ./.).outPath)'
{ paths = [ "/nix/store/2mpgi4bvn8py4liv9w3mjxd2c5r7bvv8-source" "/nix/store/3k7i1rdqcgyzjxvqm37hapdidy4ls4s3-source" "/nix/store/kqxic0j6wpsaw2bb51hr1yc1nb1z2xw8-source" ]; value = "/nix/store/3k7i1rdqcgyzjxvqm37hapdidy4ls4s3-source"; }

This is an alternative to the --include-eval-refs from
#3523 & --include-ifd from
#3506.

This primop lets you get information on paths realised (pathExists,
import, readFile) by Nix. It tracks paths realised in Nix & puts the
results under the "paths" attr. For instance:

$ nix eval --impure --expr '(builtins.traceContext (import ./.).outPath)'
{ paths = [ "/nix/store/2mpgi4bvn8py4liv9w3mjxd2c5r7bvv8-source" "/nix/store/3k7i1rdqcgyzjxvqm37hapdidy4ls4s3-source" "/nix/store/kqxic0j6wpsaw2bb51hr1yc1nb1z2xw8-source" ]; value = "/nix/store/3k7i1rdqcgyzjxvqm37hapdidy4ls4s3-source"; }

This is an alternative to the --include-eval-refs from
NixOS#3523 & --include-ifd from
NixOS#3506.
@stale
Copy link

stale bot commented Oct 22, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant