Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

🐛 useSimpleNumberKeys unwrap error #4457

Closed
1 task done
Conaclos opened this issue May 10, 2023 · 2 comments · Fixed by #4459
Closed
1 task done

🐛 useSimpleNumberKeys unwrap error #4457

Conaclos opened this issue May 10, 2023 · 2 comments · Fixed by #4459
Assignees
Labels
A-Linter Area: linter S-Bug: confirmed Status: report has been confirmed as a valid bug
Milestone

Comments

@Conaclos
Copy link
Contributor

Environment information

CLI:
  Version:                      12.0.0-nightly.b77547d
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  ROME_LOG_DIR:                 unset
  NO_COLOR:                     unset
  TERM:                         "foot"
  JS_RUNTIME_VERSION:           "v19.9.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/8.19.2"

Rome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Discovering running Rome servers...

What happened?

I got the following error numerous times:

Rome encountered an unexpected error

This is a bug in Rome, not an error in your code, and we would appreciate it if you could report it to https://github.com/rome/tools/issues/ along with the following information to help us fixing the issue:

Source Location: crates/rome_js_analyze/src/analyzers/nursery/use_simple_number_keys.rs:92:14
Thread Name: rome::worker_12
Message: called `Option::unwrap()` on a `None` value

Note: I enabled all rules in rome.json.

One of the codes that produces the issue:

export function Config(generator) {
    return { generator }
}

This also crashes the playground.

Expected result

No error

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@Conaclos Conaclos added S-To triage Status: user report of a possible bug that needs to be triaged S-Bug: confirmed Status: report has been confirmed as a valid bug A-Linter Area: linter and removed S-To triage Status: user report of a possible bug that needs to be triaged labels May 10, 2023
@Conaclos Conaclos added this to the v12.1.0 milestone May 10, 2023
@Conaclos Conaclos changed the title 🐛 UseSimpleNumber unwrap error 🐛 UseSimpleNumberKeys unwrap error May 10, 2023
@ematipico
Copy link
Contributor

ematipico commented May 10, 2023

I believe this issue shouldn't block the release because it's a nursery rule, and it makes sense if they are buggy. Although, it's a valid bug we should fix!

@Conaclos
Copy link
Contributor Author

Conaclos commented May 10, 2023

That's true. However, I could like to get a "stable" user experience even with nursery rules :) I will fix it before the release, except if someone is interested to take this issue :)

@Conaclos Conaclos changed the title 🐛 UseSimpleNumberKeys unwrap error 🐛 useSimpleNumberKeys unwrap error May 10, 2023
@Conaclos Conaclos self-assigned this May 10, 2023
Conaclos added a commit that referenced this issue May 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Linter Area: linter S-Bug: confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants