Skip to content

} gives strange error #8400

Closed
Closed

Description

@sophiajt

Describe the bug

~/Source/nushell〉 }
Error: nu::parser::unbalanced_delimiter

  × Unbalanced delimiter.
   ╭─[entry #3:1:1]
 1 │ )
   ╰────

note: that error line is the previous thing I typed into the repl.

How to reproduce

  1. Either start by typing } and hit enter. Or...

Type a few lines first, then:
2. Type } and hit enter

Expected behavior

I'd expect to underline the actual }. Right now it seems like it's trying to underline the point before it, which is going to be whatever the last buffer in the REPL was.

This doesn't seem to be a Span::new(0, 0) related issue, but one that has to do with not having a correct span when lexing a } by itself.

Screenshots

No response

Configuration

key value
version 0.76.1
branch main
commit_hash 0e21678
build_os macos-aarch64
build_target aarch64-apple-darwin
rust_version rustc 1.66.1 (90743e729 2023-01-10)
rust_channel 1.66.1-aarch64-apple-darwin
cargo_version cargo 1.66.1 (ad779e08b 2023-01-10)
build_time 2023-03-08 06:56:59 +13:00
build_rust_channel debug
features default, zip
installed_plugins

Additional context

No response

Activity

  1. added
    good first issue
    category:bug
    on Mar 11, 2023
  2. added
    A:error-unhelpful
    on Mar 11, 2023
  3. jafriyie1 commented on Mar 13, 2023

    @jafriyie1
    Contributor

    I can take this one if that is ok!

  4. rgwood commented on Mar 24, 2023

    @rgwood
    Contributor

    @jafriyie1 Sounds good! Let us know if you need any help (#implementation-chat on the Nushell Discord is probably the easiest place)

  5. vaishaag commented on Apr 16, 2023

    @vaishaag
    Contributor

    Hey @jafriyie1, are you working on this? If not, I can give it a try.

  6. jafriyie1 commented on Apr 16, 2023

    @jafriyie1
    Contributor

    Hello, please go ahead and work on this! I sadly haven't had time to take a crack at this.

  7. amtoine commented on Apr 17, 2023

    @amtoine
    Member

    that should have been addressed by #8906 👍

  8. added this to the v0.79.0 milestone on Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:error-unhelpfulcategory:buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions