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

🐛 Constant Request textDocument/codeAction failed. messages when viewing large file #4564

Closed
1 task done
oliversalzburg opened this issue Jun 13, 2023 · 2 comments · Fixed by #4730
Closed
1 task done
Labels
A-LSP Area: language server protocol enhancement New feature request or improvement to existing functionality Help wanted Help would be really appreciated S-Bug: confirmed Status: report has been confirmed as a valid bug
Milestone

Comments

@oliversalzburg
Copy link

Environment information

╰─ yarn rome rage
CLI:
  Version:                      12.1.3
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  ROME_LOG_DIR:                 unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.1.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/3.6.0"

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

Workspace:
  Open Documents:               0

Discovering running Rome servers...

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

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

Server:
  Version:                      12.1.3
  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.79.0

Rome Server Log:

_redacted_

What happened?

  1. Request textDocument/codeAction failed. keeps popping up in VS Code while I view a large file.

image

Output panel shows this message repeatedly:

[Error - 3:45:02 PM] Request textDocument/codeAction failed.
  Message: Size of packages/payment-infra/output/lambdas/fn-offer-list-bundle/main.mjs is 5.0 MiB which exceeds configured maximum of 1.0 MiB for this project. The file size limit exists to prevent us inadvertently slowing down and loading large files that we shouldn't.
  Code: -32603 

Expected result

No error popups.

Code of Conduct

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

ematipico commented Jun 13, 2023

No error popups.

Are you sure that's the result you 'd expect? I believe that if we blindly suppress the error, there's a chance that you would file an issue saying that Rome is not working for that file :)

As you can see, we have a limit for big files.

What do you think if we show a warning popup instead of an error? I believe it's a better resolution because if you want to increase the file size, you'd need a rome.json file.

@oliversalzburg
Copy link
Author

When I open large files in other formats, I often see a messages informing me about the limitation, and sometimes even provide solution paths going forward (increasing limits thought configuration).

At the least, it would be nice if the error message is shown in the GUI is clear, and that, once confirmed, it doesn't pop up over and over again.

@ematipico ematipico added S-Bug: confirmed Status: report has been confirmed as a valid bug enhancement New feature request or improvement to existing functionality A-LSP Area: language server protocol and removed S-To triage Status: user report of a possible bug that needs to be triaged labels Jun 15, 2023
@ematipico ematipico added this to the v13.0.0 milestone Jun 15, 2023
@ematipico ematipico added the Help wanted Help would be really appreciated label Jun 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-LSP Area: language server protocol enhancement New feature request or improvement to existing functionality Help wanted Help would be really appreciated 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