app-editors/fresh: add telemetry USE flag - #532
Conversation
Signed-off-by: masterwolf <shimontrolles@gmail.com>
|
Hi, USE flags are not intended for this, they're supposed to map to compile-time features when relevant. This is not a compile-time feature, but a runtime one. You can see how to disable it in its documentation. This is more adecuate for Portage user patches or a local overlay. You can request upstream or make a PR to implement a feature for telemetry if you wish to see it as a USE flag. Otherwise, I won't be merging it. |
|
Ok! Thanks! |
Co-authored-by: Michał Górny <mgorny@gentoo.org>
Removed the einfo as per @mgorny request Signed-off-by: Shimon Trolles <shimontrolles@gmail.com>
| rm -v crates/fresh-editor/src/services/telemetry.rs || die | ||
| echo "pub fn should_run_daily_check(_: &dyn crate::services::time_source::TimeSource, _: &std::path::Path) -> Option<String> { None }" > crates/fresh-editor/src/services/telemetry.rs || die | ||
| echo "pub fn track_open(_: &str) {}" >> crates/fresh-editor/src/services/telemetry.rs || die | ||
| sed -i 's/"description": "Check for new versions on startup (default: true)[^"]*"/"description": "Check for new versions on startup (default: true). Telemetry disabled by USE flag."/g' crates/fresh-editor/plugins/config-schema.json || die |
There was a problem hiding this comment.
Can't you actually limit to changing the default to false?
There was a problem hiding this comment.
In my understanding, the whole point of making a use flag to alter the build was to not have the module compiled at all.
Apart from that, the editor checks for new versions available, and this is tied for some reason with the telemetry, even though functionally they have no correlation whatsoever (I guess the author was trying to convince people to enable telemetry by giving something else bundled?), as the version checker just checks if the URL exists in the git releases. If I just make the default off, I still have those two functions tied together.
If you wish I can just tweak the default, but then maybe use flags would be overkill?
Co-authored-by: Michał Górny <mgorny@gentoo.org>
Closes: gentoo#532 (comment) Signed-off-by: masterwolf <shimontrolles@gmail.com>
|
Logs for 4c3a755 |
Hello.
This editor has telemetry as an opt-out feature. This annoyed me so I managed to neutralize it via some patches, and made the ebuild support the respective use flag.
I am not the maintainer of the package, so I understand I should PR it, right?
Regards
Shimon Trolles
emerge-info.txt
build.log --USE= -telemetry
build.log --USE= +telemetry
Please check all the boxes that apply:
Signed-off-byline to every commit in the pull request.pkgcheck scan --commits --netto check for issues with my commits.metadata.xmlcorrespond to valid Gentoo Bugzilla, and I will be reading the bug mail send to them, or none were added.Please note that all boxes must be checked for the pull request to be merged.
Ideally, please file the pull request against the
devbranch to avoid potential merge conflicts. However, since pull requests are merged manually, there is no need to close if opened againstmasterinstead.