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

Make IR the default evaluator #13718

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

devyn
Copy link
Contributor

@devyn devyn commented Aug 28, 2024

Description

Makes IR the default evaluator, in preparation to remove the non-IR evaluator in a future release.

User-Facing Changes

  • Remove NU_USE_IR option
  • Add NU_DISABLE_IR option
  • IR is enabled unless NU_DISABLE_IR is set

After Submitting

  • release notes

WindSoilder pushed a commit that referenced this pull request Sep 10, 2024
# Description

This fixes a couple of remaining differences between the IR evaluator's
handling of env vars and the AST evaluator's handling of env vars.

Blocker for #13718 (this is why those tests failed)

# User-Facing Changes

1. Handles checking overlays for hidden env vars properly, when getting
an env var from IR instruction
2. Updates config properly when doing `redirect_env()` (these probably
shouldn't be separate functions anyway, though, they're basically the
same. I did this because I intended to remove one, but now it's just
like that)

# Tests   Formatting

The `nu_repl` testbin now handles `NU_USE_IR` properly, so these tests
now work as expected.

# After Submitting

- [ ] check in on #13718 again
* Remove `NU_USE_IR` option
* Add `NU_DISABLE_IR` option
* IR is enabled unless `NU_DISABLE_IR` is set
@devyn
Copy link
Contributor Author

devyn commented Sep 12, 2024

Very close to getting this passing. A little bit more was missed than I thought.

@IanManske one remaining test failure is this which doesn't seem to be working in IR:

#[test]
fn exit_code_available_in_catch_env() {
    let actual = nu!("try { nu -c 'exit 42' } catch { $env.LAST_EXIT_CODE }");
    assert_eq!(actual.out, "42");
}

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.

1 participant