Repository navigation
Conversation
`TelemetrySettings::memory_profiler` only existed on Linux. A config generated on Linux includes the `memory_profiler` section, and with `settings_deny_unknown_fields_by_default` that section is rejected as an unknown field on macOS and other platforms, so the same config cannot be used for local development. Gate the settings on the `memory-profiling` feature only. The profiler itself stays Linux-only, so on other platforms the settings are accepted but have no effect.
Contributor
Author
|
@TheJokr this makes the memory profiler settings available on all platforms, so a config generated on Linux also loads on macOS. Could you take a look when you have a moment? Thanks! |
TheJokr
approved these changes
Oct 30, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TelemetrySettings::memory_profileronly exists on Linux. A config generated on Linux (for example withCli's--generate) includes amemory_profilersection, and since unknown fields are rejected by default, loading that same config on macOS fails. This makes it awkward to share one config between a Linux deployment and local development on a Mac.The settings struct itself has nothing Linux-specific, only the profiler does. This change gates the settings module, its re-export and the
memory_profilerfield on thememory-profilingfeature alone. The profiler, the/pprof/*routes and the startup code that applies these settings stay Linux-only, so on other platforms the section is accepted but has no effect. The field docs (which also show up in generated configs) now say so.On Linux the compiled code is unchanged. The only difference on other platforms is that
TelemetrySettingsgains thememory_profilerfield, which also means configs generated there now match the ones generated on Linux.Testing
TelemetrySettingsconfig containing amemory_profilersection. It passes trivially on Linux; the macOS CI job is the one that exercises the fix.cargo test -p foundations --test settings.cargo clippy -p foundations --all-targetswith the CI lint flags,cargo checkwithmemory-profiling,logging,memory-profiling,logging,settingsandlogging,settings, andrustfmt --check --edition 2024.Closes #84