I've returned to working on my esp32-socket_rs project recently.
It's using the toml_cfg crate to generate a static CONFIG struct.
I would like some of this structs properties to NOT have default values, but instead make the build fail if the cfg.toml file doesn't specify values for them.
I have created a ticket in the original authors issue tracker: option without default value? · Issue #12 · jamesmunns/toml-cfg · GitHub for this idea.
Later I found that @hnefatl created a fork that implements this feature: GitHub - hnefatl/toml-cfg: A procedural macro for configuring constant values across crates
I tried using this in a branch of my project: Files · toml-cfg_fork_with_required_option_vscode_doesnt_see_provided · thomas351 / ESP32 BME280 Socket Ⓡ · GitLab
But I can't (or don't want to) merge it into my main branch, because VS-Code doesn't seem to "see" my cfg.toml file and therfore always displays this error even though all required fields are defined in my cfg.toml file:
proc-macro panicked: Field
wifi_ssid
: required but no value was provided in the config file.
Directly executing cargo build
however works without a problem, but I need VS-Code to accept this too for a tolerable development experience.
Does anybody have any hints of how to make this work?
What commands do IDE's like VS-Code use to get lists of errors & warnings?