-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 [PreRelease] Extension "Biome" is configured as formatter but it cannot format 'TypeScript JSX'-files #373
Comments
Having the same issue this morning |
Thank you, @raix, for the report. However, we would appreciate it if you could create a minimal reproduction instead of providing a massive repository. A minimal reproduction would remove possible user/environment options that could tarnish the project. To create a reproduction, you can use our new CLI tool, which should help you to create a very quick repository with what you need: |
@ematipico I've created and pushed a Minimal reproduction using your CLI tool |
I believe I've found the issue. I'll patch it this morning and release a new pre-release. I'll also update this issue with an explanation. |
New releaseI've released a new pre-release version, which I believe fixes this issue. What happenedWhen the extension generates a document selector to filter which document should be taken into account by a given LSP session, it uses the
When the Lines 350 to 354 in becbd5a
FixI'm now joining all path elements using Lines 350 to 357 in f9aa112
|
@raix Feel free to close the issue once/if you've been able to confirm that it fixes the issue. |
@nhedger When testing the VS Code extension version |
Hum, could you try removing |
@nhedger if I remove the "folder" setting I get: |
I've been trying to reproduce this error and encountered it once or twice, but I cannot find a way to trigger it consistently. Are you able to? |
@nhedger yes, I never experienced it to work. Does the extension register for being able to handle TypeScript files? |
Sorry, I meant: are you able to consistently reproduce the error seen in your screenshot? If so, any information that leads to this error happening would help troubleshooting the issue. Using your reproduction repo and the same OS, I can't seem to reproduce. Wondering if other factors are at play here. The inability of handling typescript files here is a direct consequence of the extension failing to start properly, but it does work under normal circumstances. |
Yes, I always get the dialog regarding configuring a formatter
Not sure what I'm looking for tbh. I've tried reinstalling the extension, restarting VS Code, looking in devtools - all clues have been added to this issue. Thinking of differences - I do not have biome installed globally, only in the project node_modules folder
|
After debugging the extension I found this to be working: Findings: {
"biome.enabled": true,
"biome.projects": [
{
"path": "application",
- "folder": "application",
- "configFile": "biome.json"
+ "configFile": "application/biome.json"
}
],
"biome.requireConfigFile": true
} Notes:
|
Oh, interesting. I would also have expected that config file to be resolved relative to the path. I'll look into this. |
In case it helps the debugging here's my experience with this issue so far. I'm on Fedora, experiencing the same issue, but its not just for Typescript-JSX. It seems like its pretty much every file Linux: Fedora 41 |
^^^ It works after specifying |
@nhedger I'm also getting the same issue with the extension for one of my workspace folders. It seems to occur regardless of whether the workspace is a multifolder workspace or the subfolder is opened directly. Looking at the LSP Trace, the logs show that the workspace directory has Windows trailing backslashes, and the extension is adding an additional forward slash before looking for the biome.json file.
|
Sorry, ignore what I said previously, I created a minimal repro and the issue isn't caused by a trailing slash it looks like. There seems to be an issue with pnpm workspaces, the extension doesn't detect files inside the packages folder, but it seems to be able to detect files inside .vscode folder and everything else fine. Here is the repro: |
I am also experiencing a similar problem in pnpm workspace after upgrading to 1.9.3. I downgraded to version 1.8.3, which previously worked well, and the biome extension and formatter began to be recognized normally. Has this problem been resolved? |
Sorry, but I cannot reproduce. Biome correctly reports diagnostics for |
Please open a dedicated issue with a minimal reproduction. |
It looks like it might be an issue with the prerelease version. Using pnpm 8.15.9 using the workspace file provided and the biome binary provided by pnpm i, I seem to be able to format when using release version but not while using the pre-release. |
in my case the problem was solved after deleting the socket file(s) from here (macos only): |
VS Code version
1.93.1
Extension version
2024.9.200949
Biome version
1.9.2
Operating system
Description
Updated Biome from
1.8.3
and VS Code extension to pre-release for better support of workspaces. We currently use a workaround in PlatformPlatformSteps to reproduce
application/package.json
tsx
filesSee:
Expected behavior
The document should re format as the CLI tool would do e.g.
npm run format
Does this issue occur when using the CLI directly?
No
Link to a minimal reproduction
https://github.com/platformplatform/PlatformPlatform
Logs
The text was updated successfully, but these errors were encountered: