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

🐛 VS Code plugin frequently does not save #4461

Open
1 task done
robhicks opened this issue May 10, 2023 · 2 comments
Open
1 task done

🐛 VS Code plugin frequently does not save #4461

robhicks opened this issue May 10, 2023 · 2 comments
Labels
S-To triage Status: user report of a possible bug that needs to be triaged

Comments

@robhicks
Copy link

Environment information

I can't post the entire output of rome rage because this textarea won't accept it. I generated it using npx rome rage:
CLI:
  Version:                      12.0.0
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  ROME_LOG_DIR:                 unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v18.12.1"
  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:    true

Workspace:
  Open Documents:               0

Discovering running Rome servers...

Running Rome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

i The client isn't connected to any server but rage discovered this running Rome server.

Server:
  Version:                      12.0.0
  Name:                         rome_lsp
  CPU Architecture:             x86_64
  OS:                           linux

Workspace:
  Open Documents:               0

Other Active Server Workspaces:

Workspace:
  Open Documents:               4
  Client Name:                  Visual Studio Code
  Client Version:               1.78.1

What happened?

  1. I have installed and enabled the Rome VS Code extension. I have attempted to use both the pre-release version (v0.23.20230509) and the release version (v0.22.0).
  2. I am running the plugin in:
    Version: 1.78.1 Commit: 6a995c4f4cc2ced6e3237749973982e751cb0bf9 Date: 2023-05-04T09:46:23.602Z Electron: 22.5.1 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Linux x64 6.2.14-300.fc38.x86_64 Sandboxed: No
  3. I have enabled format on save ("editor.formatOnSave": true).
  4. I have set Rome as the default formatter for JavaScript:
    "[javascript]": { "editor.defaultFormatter": "rome.rome" },
  5. My rome.json file is as follows:
    { "formatter": { "enabled": true, "indentSize": 2, "indentStyle": "space", "lineWidth": 120 }, "linter": { "enabled": true }, "javascript": { "formatter": { "quoteProperties": "asNeeded", "quoteStyle": "single", "semicolons": "asNeeded", "trailingComma": "es5" } } }
  6. I have enabled rome_lsp.trace.server.
  7. About half of the time when I save a file while editing (I save a lot - nervous tick learned over decades of coding), the file is not saved.
  8. A trace from a failed save does not include either of these requests:
    [Trace - 9:39:50 AM] Sending request 'textDocument/formatting - (2783)'. [Trace - 9:39:50 AM] Sending notification 'textDocument/didSave'.

Expected result

It should save each time save is invoked.

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@robhicks robhicks added the S-To triage Status: user report of a possible bug that needs to be triaged label May 10, 2023
@ematipico
Copy link
Contributor

Is it still an issue in v12.1.0?

@robhicks
Copy link
Author

It appears to be fixed. I say "appears" because I have noted that a few times each day, I have to restart vs code in order to get rome to work. If I switch back to eslint/prettier, it saves consistently, but a lot slower.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S-To triage Status: user report of a possible bug that needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants