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 pos to EvalState::forceValue #5389

Merged
merged 1 commit into from
Oct 15, 2021
Merged

Conversation

kamadorueda
Copy link
Member

  • This way we improve error messages
    on infinite recursion
  • Demo:
    let
      x = builtins.fetchMercurial x;
    in
    x
  • Before:
    $ nix-instantiate --show-trace --strict
    error: infinite recursion encountered
  • After:
    nix-instantiate --show-trace --strict
    error: infinite recursion encountered
    
         at /data/github/kamadorueda/test/default.nix:2:7:
    
              1| let
              2|   x = builtins.fetchMercurial x;
               |       ^
              3| in
  • This is my first contribution so I picked an issue that was relatively easy in order to familiarize with the project

Mentions: #3505

- This way we improve error messages
  on infinite recursion
- Demo:
  ```nix
  let
    x = builtins.fetchMercurial x;
  in
  x
  ```
- Before:
  ```bash
  $ nix-instantiate --show-trace --strict
  error: infinite recursion encountered
  ```
- After:
  ```bash
  nix-instantiate --show-trace --strict
  error: infinite recursion encountered

       at /data/github/kamadorueda/test/default.nix:2:7:

            1| let
            2|   x = builtins.fetchMercurial x;
             |       ^
            3| in
  ```

Mentions: NixOS#3505
@nrdxp
Copy link

nrdxp commented Oct 15, 2021

Thank you for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants