Skip to content

CLI tests fail when RUST_LOG=error is set #190

@iniw

Description

@iniw

Describe the bug

I noticed this while running the package through Nix: nix run fails during the check phase because a couple of CLI integration tests see unexpected parser logs on stderr:

  • mixed_use_and_def_does_not_emit_parser_errors_issue136
  • cell_path_in_def_block_does_not_emit_parser_errors_issue141

The failing assertions contain the following on stderr:

compile_block_with_id called with parse errors

Steps To Reproduce

Through nix:

  • nix run github:nushell/nufmt

Through cargo:

  • RUST_LOG=error cargo test --test main does_not_emit_parser_errors -- --nocapture

Expected behavior

For these tests to not fail.

Environment

Please run rustc --version and paste the result.

$ rustc --version
rustc 1.93.0 (254b59607 2026-01-19) (built from a source tarball)

If using Nix please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-darwin"`
 - host os: `Darwin 25.4.0, macOS 26.4.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.34.7+1`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/store/77dbgds155bbz3vd3qywq1sii07i5ljs-source`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions