Skip to content
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

Undocumented required fields in [buck] for TOML file #42

Open
jamesaimonetti opened this issue Aug 7, 2024 · 6 comments
Open

Undocumented required fields in [buck] for TOML file #42

jamesaimonetti opened this issue Aug 7, 2024 · 6 comments
Assignees
Labels
documentation Improvements or additions to documentation prio-low

Comments

@jamesaimonetti
Copy link

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
Copy link
Author

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

@michalmuskala michalmuskala transferred this issue from WhatsApp/eqwalizer Aug 7, 2024
@michalmuskala
Copy link
Member

Moved issue to the ELP repo

@robertoaloi
Copy link
Contributor

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 robertoaloi added documentation Improvements or additions to documentation prio-low labels Aug 7, 2024
@alanz
Copy link
Member

alanz commented Aug 7, 2024

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

//- /.elp.toml
[rebar]
profile = "other"
//- /app_a/src/app.erl

A more full example is

[build_info]
file = "path/to/file"
[buck]
enabled = true
deps_target = "root//target/deps"
build_deps = false
included_targets = ["root//target/one", "root//target/two"]
excluded_targets = ["root//target/three", "root//target/four"]
source_root = "path/to/root"
[eqwalizer]
enable_all = true
max_tasks = 34
[rebar]
profile = "my_profile"

@jamesaimonetti
Copy link
Author

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.

@alanz
Copy link
Member

alanz commented Aug 7, 2024

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

@alanz alanz reopened this Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation prio-low
Projects
None yet
Development

No branches or pull requests

4 participants