emacs-lsp-booster icon indicating copy to clipboard operation
emacs-lsp-booster copied to clipboard

Bytecode conversion crash with tailwind server

Open j-hotlink opened this issue 11 months ago • 1 comments

Hi, thanks for the great project.

The tailwindcss lsp server works under lsp-mode with emacs-lsp-booster when using the --disable-bytecode flag.

However when attempting to use with bytecode conversion enabled, I'm getting this error output in the tailwindcss-ls::stderr buffer:

[2024-12-23T17:26:14Z INFO  emacs_lsp_booster::app] Running server "/redacted_path/scripts/start-lsp-tailwindcss-host.sh"
[2024-12-23T17:26:14Z INFO  emacs_lsp_booster::app] Will convert server json to bytecode! bytecode options: BytecodeOptions { object_type: Plist, null_value: Nil, false_value: Nil }
thread '<unnamed>' panicked at /github/workspace/src/app.rs:145:18:
called `Result::unwrap()` on an `Err` value: Server->client read thread failed

Caused by:
    expected value at line 1 column 1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Process tailwindcss-ls stderr finished

Setting RUST_BACKTRACE=1 flag did not give me extra info. I have installed all emacs lsp packages as per use-plists-for-deserialization and confirmed that lsp-use-plists is t, and am using your advice wrappers (applied only once).

I've looked at #15 and #22. Using your recommended stdin and stdout tee captures (tailwind.stdin.txt / tailwind.stdout.txt), I cannot see any illegal json output from the tailwind server. As the server seems compliant FWICT, is there any obvious reason why the panic is occurring and do you have any suggestions for resolving this?

Aside: Probably unrelated but just in case... I'm running emacs-lsp-booster and the tailwind css server within a docker container launched via: docker exec -i ${container} /bin/bash -l -c "${script} $*" I've encountered timed shutdowns running node servers within a container as they periodically check for an existing parent process id, and terminate if not found. These servers provided a --clientProcessId flag to handle this use case - I don't know how rust behaves under similar conditions, but since emacs-lsp-booster works with bytecode translation disabled this seems irrelevant.

j-hotlink avatar Dec 23 '24 18:12 j-hotlink

Sorry for the very late response... I totally missed this. Are you still having this issue? The error message surely looks like json parsing error, but I cannot spot any error in your provided tailwind.stdout.txt. To debug this, I think we can add some log here to print out the invalid json. If you are still interested and be able to reproduce, I can send you a new binary with debug log added to test with.

blahgeek avatar Mar 27 '25 15:03 blahgeek