tools
tools copied to clipboard
π Available rules in VSCode extension `v0.18.0` don't match CLI `v10.0.0`
Environment information
block
CLI:
Version: 10.0.0
Color support: true
Platform:
CPU Architecture: aarch64
OS: macos
Environment:
ROME_LOG_DIR: unset
NO_COLOR: unset
TERM: "xterm-256color"
Rome Configuration:
Status: loaded
Formatter disabled: false
Linter disabled: false
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.
Γ Workspace rage failed: Method not found
Rome Server Log:
! Please review the content of the log file before sharing it publicly as it may contain sensitive information:
- Path names that may reveal your name, a project name, or the name of your employer.
- Source code
ββ69202401ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
ββ69202409ms INFO rome_lsp::server Starting Rome Language Server...
ββ69202411ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
ββ69202411ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/lgarron/Code/git/github.com/mastodon/mastodon/rome.json"
ββ69202411ms ERROR rome_service::configuration Could not find the file configuration at "/Users/lgarron/Code/git/github.com/mastodon/mastodon/rome.json"
ββ69202411ms ERROR rome_service::configuration Reason: Os { code: 2, kind: NotFound, message: "No such file or directory" }
βββrome_js_parser::parse::parse{file_id=FileId(0)}
βββ
βββrome_js_parser::parse::parse{file_id=FileId(1)}
βββ
βββrome_js_parser::parse::parse{file_id=FileId(2)}
βββ
βββrome_js_parser::parse::parse{file_id=FileId(1)}
βββ
βββrome_formatter::printer::Printer::print{}
βββ
ββ70450748ms WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
βββrome_js_parser::parse::parse{file_id=FileId(2)}
βββ
ββ70453443ms INFO tower_lsp::service::layers shutdown request received, shutting down
ββ70453443ms INFO tower_lsp::service::layers exit notification received, stopping
ββ70453485ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
ββ70453488ms INFO rome_lsp::server Starting Rome Language Server...
ββ70453489ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
ββ70453489ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/lgarron/Code/git/github.com/cubing/cubing.js/rome.json"
βββrome_fs::fs::os::OsFile::read_to_string{}
βββ
ββ70453489ms INFO rome_lsp::session Configuration found, and it is valid!
βββrome_js_parser::parse::parse{file_id=FileId(0)}
βββ
βββrome_js_parser::parse::parse{file_id=FileId(1)}
βββ
ββ70467808ms INFO tower_lsp::service::layers shutdown request received, shutting down
ββ70467820ms INFO tower_lsp::service::layers exit notification received, stopping
ββ70469518ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
ββ70469521ms INFO rome_lsp::server Starting Rome Language Server...
ββ70469522ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
ββ70469522ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/lgarron/Code/git/github.com/cubing/cubing.js/rome.json"
βββrome_fs::fs::os::OsFile::read_to_string{}
βββ
ββ70469522ms INFO rome_lsp::session Configuration found, and it is valid!
βββrome_js_parser::parse::parse{file_id=FileId(0)}
βββ
βββrome_js_parser::parse::parse{file_id=FileId(1)}
βββ
βββrome_js_parser::parse::parse{file_id=FileId(1)}
βββ
βββrome_formatter::printer::Printer::print{}
βββ
ββ70610318ms WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
ββ70693757ms INFO tower_lsp::service::layers shutdown request received, shutting down
ββ70693771ms INFO tower_lsp::service::layers exit notification received, stopping
ββ70693831ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
ββ70694546ms INFO tower_lsp::service::layers shutdown request received, shutting down
ββ70694556ms INFO tower_lsp::service::layers exit notification received, stopping
ββ70694889ms INFO tower_lsp::service::layers shutdown request received, shutting down
ββ70694901ms INFO tower_lsp::service::layers exit notification received, stopping
ββ70695585ms INFO tower_lsp::service::layers shutdown request received, shutting down
ββ70695593ms INFO tower_lsp::service::layers exit notification received, stopping
ββ70695602ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
ββ70700672ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
ββ70700682ms INFO rome_lsp::server Starting Rome Language Server...
ββ70700718ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
ββ70700718ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/lgarron/Code/git/github.com/lgarron/trusted-types-playground/rome.json"
ββ70700718ms ERROR rome_service::configuration Could not find the file configuration at "/Users/lgarron/Code/git/github.com/lgarron/trusted-types-playground/rome.json"
ββ70700718ms ERROR rome_service::configuration Reason: Os { code: 2, kind: NotFound, message: "No such file or directory" }
βββrome_js_parser::parse::parse{file_id=FileId(0)}
βββ
ββ70701052ms WARN tower_lsp::service::pending client asked to cancel request 1, but no such pending request exists, ignoring
ββ70701724ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
ββ70701776ms INFO rome_lsp::server Starting Rome Language Server...
ββ70701915ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
ββ70701915ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/lgarron/Code/git/github.com/cubing/timer/rome.json"
βββrome_fs::fs::os::OsFile::read_to_string{}
βββ
ββ70701916ms INFO rome_lsp::session Configuration found, and it is valid!
βββrome_js_parser::parse::parse{file_id=FileId(0)}
βββ
ββ70704351ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
ββ70704372ms INFO rome_lsp::server Starting Rome Language Server...
ββ70704394ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
ββ70704394ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/lgarron/Code/git/github.com/mastodon/mastodon/rome.json"
ββ70704394ms ERROR rome_service::configuration Could not find the file configuration at "/Users/lgarron/Code/git/github.com/mastodon/mastodon/rome.json"
ββ70704394ms ERROR rome_service::configuration Reason: Os { code: 2, kind: NotFound, message: "No such file or directory" }
βββrome_js_parser::parse::parse{file_id=FileId(0)}
βββ
ββ70705148ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
ββ70705153ms INFO rome_lsp::server Starting Rome Language Server...
ββ70705159ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
ββ70705160ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/lgarron/Code/git/github.com/cubing/alg.cubing.net/rome.json"
ββ70705160ms ERROR rome_service::configuration Could not find the file configuration at "/Users/lgarron/Code/git/github.com/cubing/alg.cubing.net/rome.json"
ββ70705160ms ERROR rome_service::configuration Reason: Os { code: 2, kind: NotFound, message: "No such file or directory" }
βββrome_js_parser::parse::parse{file_id=FileId(0)}
βββ
ββ70743407ms WARN tower_lsp::service::pending client asked to cancel request 1, but no such pending request exists, ignoring
ββ70743437ms WARN tower_lsp::service::pending client asked to cancel request 2, but no such pending request exists, ignoring
ββ70743455ms INFO rome_lsp::server Starting Rome Language Server...
ββ70743455ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
ββ70743468ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
ββ70743468ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/lgarron/Code/git/github.com/cubing/cubing.js/rome.json"
βββrome_fs::fs::os::OsFile::read_to_string{}
βββ
ββ70743469ms INFO rome_lsp::session Configuration found, and it is valid!
βββrome_js_parser::parse::parse{file_id=FileId(0)}
βββ
βββrome_js_parser::parse::parse{file_id=FileId(1)}
βββ
ββ70911321ms INFO rome_lsp::server Starting Rome Language Server...
ββ70911322ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
ββ70919313ms INFO rome_lsp::server Starting Rome Language Server...
ββ70919314ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
What happened?
git clone https://github.com/cubing/cubing.js && cd cubing.js
git checkout 0f0d36c7b88458e326f5754338ae01296dbe3383
npm install rome@latest
npx rome check ./script ./src
Now, the CLI halts on the following "unknown" rules, which were previously valid:
corectness/useSimplifiedLogicExpressionnursery/noUnusedVariables
Removing those from rome.json allows the CLI to run, but now it expects correctness/useTemplate to be called style/useTemplate on this line: https://github.com/cubing/cubing.js/blob/0f0d36c7b88458e326f5754338ae01296dbe3383/src/sites/experiments.cubing.net/cubing.js/speechcubing/index.ts#L39
However, changing that line to use // rome-ignore lint(style/useTemplate) now causes the Rome VSCode extension to make the rome-ignore comment rule as unknown, and the relevant code to be marked with an error.
Also see: https://github.com/rome/tools/issues/3507#issuecomment-1293122392
Expected result
The CLI and the extension agree on rules.
Ideally, they would also do one of the following:
- Help upgrade old rules.
- Understand that rules were recently removed, in a way that is distinguishable from rules that never existed.
- Point to release notes with instructions on how to migrate versions (e.g. what rules to change).
Alternatively, it would be nice to be able have the extension use the CLI from node_modules, so that they're always consistent: https://github.com/rome/tools/discussions/3218
Code of Conduct
- [X] I agree to follow Rome's Code of Conduct
From the rage command I can see that the Rome server used by the LSP must be older than the 10.0 version as it doesn't support the rage command.
Can you try running npx rome stop to force a restart of the Rome LSP. It is a known limitation that you must restart Rome after updating it in the package.json
Can you try running
npx rome stopto force a restart of the Rome LSP.
This somehow seems to prevent the extension from properly working at all, even after a full VSCode restart. If I mangle some code enable verbose trace logging, I see messages like the following in the trace log, but they are not highlighted in the VSCode editor at all.
[Trace - 11:23:04 PM] Received response 'textDocument/codeAction - (14)' in 4ms.
Result: [
{
"edit": {
"changes": {
"file:///Users/lgarron/Downloads/sdkfljdsf/cubing.js/src/sites/experiments.cubing.net/cubing.js/speechcubing/index.ts": [
{
"newText": " {",
"range": {
"end": {
"character": 19,
"line": 84
},
"start": {
"character": 19,
"line": 84
}
}
},
{
"newText": "}\n ",
"range": {
"end": {
"character": 6,
"line": 88
},
"start": {
"character": 6,
"line": 88
}
}
}
]
}
},
"kind": "quickfix",
"title": "Wrap the statements in a block"
}
]
npx rome rage does seem to show it successfully using v10.0.0 of the CLI, but I'd have to manually redact the full output before sharing.
npx rome rage does seem to show it successfully using v10.0.0 of the CLI, but I'd have to manually redact the full output before sharing.
You can share the output of rome rage without the logs attached. That may already be helpful to understand if we are running into a version mismatch or not.
π @rome/staff please triage this issue by adding one of the following labels: S-Bug: confirmed, S-Planned , S-Wishlist or umbrella
Now that the CLI is able to use the version of Rome from node_modules, I no longer run into this issue.