erlang-language-platform icon indicating copy to clipboard operation
erlang-language-platform copied to clipboard

Undocumented required fields in [buck] for TOML file

Open jamesaimonetti opened this issue 1 year ago • 6 comments

Following https://whatsapp.github.io/erlang-language-platform/docs/get-started/configure-project/elp-toml/

> elp version
elp 1.1.0+build-2024-08-05

Docs say having enabled = false under [buck] looks like enough.

First time loading an Erlang source file in Emacs I see:

LSP :: unable to read /home/me/erlang_project/elp.toml: missing field `build_deps` for key `buck` at line 4 column 1

OK so I set buck to:

[buck]
enabled = false
build_deps = false

Next Erlang file opened sees:

LSP :: unable to read /home/me/erlang_project/.elp.toml: missing field `included_targets` for key `buck` at line 4 column 1

Tedious to have to discover these one by one, no? Is there a schema or definition for the TOML file to consult?

jamesaimonetti avatar Aug 07 '24 05:08 jamesaimonetti

Sorry, late night and I put this issue here instead of under the elp repo - can someone transfer it or should I recreate there?

jamesaimonetti avatar Aug 07 '24 05:08 jamesaimonetti

Moved issue to the ELP repo

michalmuskala avatar Aug 07 '24 12:08 michalmuskala

There's no schema at the moment. It would be great to have one and, ideally, generate the docs out of it. Contributions are always welcome :)

For the specific parameter, it's probably unintended. We may just have it as an optional value and default to false.

robertoaloi avatar Aug 07 '24 12:08 robertoaloi

Until we document it properly, note that the entire [buck] section is optional, see

https://github.com/WhatsApp/erlang-language-platform/blob/baad62631f170e27a650dd03bbfbc2bf56ef6b01/crates/project_model/src/lib.rs#L1643-L1646

A more full example is

https://github.com/WhatsApp/erlang-language-platform/blob/baad62631f170e27a650dd03bbfbc2bf56ef6b01/crates/project_model/src/lib.rs#L1712-L1728

alanz avatar Aug 07 '24 13:08 alanz

Sounds good, thanks. Just dipping the toe in to see how ELP compares with Erlang LS for our KAZOO project. If ELP displaces Erlang LS, I'm sure there'll be some contributions coming as I go!

Thanks for the work thus far.

jamesaimonetti avatar Aug 07 '24 15:08 jamesaimonetti

I am re-opening this as we still need to update the docs

alanz avatar Aug 07 '24 15:08 alanz