You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use foundations' built-in telemetry settings to generate your application config, the memory profiler options are only included if the package is built for Linux. This didn't previously cause issues, but since 4.0 made it an error to include unknown config fields, running the service on non-Linux OSes such as macOS cause these configs to error.
Given that common development workflows may involve a mix of running an application on Docker and natively on e.g. macOS, it would probably be better if these options were just ignored when not applicable; potentially with a warning message indicating they have no effect.
The text was updated successfully, but these errors were encountered:
However, I think we should teach the settings macro to recognise the OS feature gates and don't complain about unused fields in such cases. Contributions are welcome!
My concern there would be interactions; the simple case of "block of options that only exist on some platforms" is easy to cover, but the behaviour would be more complex in other cases which can be expressed#[cfg()] attributes, such as overlapping field definitions for specific platforms.
Since I'm opinionated, my feelings are the better resolutions are one of these options:
Make strict validation of config options an opt-in feature, rather than an opt-out one.
Keep strict validation as is, but discourage using #[cfg()] in settings structs in documentation (and discontinue their current use). This feels consistent with other documentation recommendations (e.g. using an enabled field rather than making sections Optional).
If you use
foundations
' built-in telemetry settings to generate your application config, the memory profiler options are only included if the package is built for Linux. This didn't previously cause issues, but since 4.0 made it an error to include unknown config fields, running the service on non-Linux OSes such as macOS cause these configs to error.Given that common development workflows may involve a mix of running an application on Docker and natively on e.g. macOS, it would probably be better if these options were just ignored when not applicable; potentially with a warning message indicating they have no effect.
The text was updated successfully, but these errors were encountered: