probe-rs icon indicating copy to clipboard operation
probe-rs copied to clipboard

Add feature gate setup-hints to control whether print setup hint and match new udev rule

Open CoelacanthusHex opened this issue 2 months ago • 8 comments

The new udev rule was updated in probe-rs/webpage#200, see it for detailed info.

Move it to probe-rs-tools.

Signed-off-by: Celeste Liu [email protected]

CoelacanthusHex avatar Oct 08 '25 15:10 CoelacanthusHex

It might be better to have the print-hint functionality in probe-rs-tools, not the library. Then we wouldn't need a feature gate in the library.

bugadani avatar Oct 08 '25 16:10 bugadani

It might be better to have the print-hint functionality in probe-rs-tools, not the library. Then we wouldn't need a feature gate in the library.

Oh. I don't note that, I will move it into probe-rs-tools.

CoelacanthusHex avatar Oct 08 '25 16:10 CoelacanthusHex

It might be better to have the print-hint functionality in probe-rs-tools, not the library. Then we wouldn't need a feature gate in the library.

Have move it into probe-rs-tools.

CoelacanthusHex avatar Oct 08 '25 16:10 CoelacanthusHex

This is still a feature flag. I don't want to introduce so many feature flags. There is already an env variable to disable this behavior.

Yatekii avatar Oct 11 '25 14:10 Yatekii

This is still a feature flag. I don't want to introduce so many feature flags. There is already an env variable to disable this behavior.

Introduce a feature flag to allow the packager can disable it permanently. The environment variable is painful to disable by the packager (Setting the environment variable for all situations via installing some file is an impossible task).

CoelacanthusHex avatar Oct 11 '25 14:10 CoelacanthusHex

There is no general way to set environment variables except /etc/environment (which is read by pam_env, so it's general). But this is a single file; for the packager, the only way to use it is by writing a post-install hook to modify it and a post-uninstall hook to change back. And this way will be rejected for most Linux distribution package guidelines. For other packages with this kind of setup hint, most of them have a compile option to disable it; feature gate is the only similar thing in the Rust Cargo build system.

CoelacanthusHex avatar Oct 11 '25 15:10 CoelacanthusHex

Looks like embedded-test failure is not related to my change...

CoelacanthusHex avatar Nov 13 '25 10:11 CoelacanthusHex

Looks like embedded-test failure is not related to my change...

Oh. The master branch failed for the same reason, so it is indeed not related to this PR.

CoelacanthusHex avatar Nov 13 '25 10:11 CoelacanthusHex