-
Notifications
You must be signed in to change notification settings - Fork 308
Description
Following on from the discussion here: #3001 (comment)
We might want a better solution than just documenting which cfg's are supported on each chip (the current solution).
We one quite large constraint when building this:
- we can't break builds when a config option is passed by the user, but the current target doesn't support that option. Doing so would break multi chip project setups.
With this constraint in mind, we still need to signal that the option isn't supported.
One idea I had:
(ab)use cargo cfg linting
Where a cfg isn't supported, we could choose not to emit this line:
esp-hal/esp-config/src/generate.rs
Line 392 in 16af010
println!("cargo:rustc-check-cfg=cfg({cfg_name})"); |
This would flag a warning in user code, that the cfg they're trying to use has no effect. Unfortunately I don't think we can control the error message here, so the message is quite vague - but maybe something we could document in an FAQ.
I would appreciate some more input/ideas here :).
I'm adding the 1.0 blocker label, though we might be able to add this later if we go with the above solution (iirc, introducing warnings is not a breaking change).
Metadata
Metadata
Assignees
Labels
Type
Projects
Status