-
-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of (serde_)y(a)ml #1416
Comments
Hi again @nc7s,
I agree with your concern about
Yes, I don't see that as being a major issue moving to
I'm not overly fond of the current I'm also tempted to just do something akin to your patch, as doing this translation is simple enough that pulling in dependencies may be overkill.
The changes would all be internal implementation details so i'm fine with it. Having said that, the current crate does seem to support
I'm keen to do whatever I can to make it easier for downstream package maintainers, it is very much in my interest as well. I'm super impressed with your extensive efforts to patch it for Debian, kudos.
Thank you. To be clear, i'm also fine to do this work as it is something I wanted to do anyway, however if you want to do it then i'd gladly accept a PR. |
serde_yaml is unmaintained, so trippy switched to the serde_yml fork, but it has a worrying code quality (hardcoding
c_char
asi8
). YAML is a confusing format to begin with. So, it'd be nice if we could switch to TOML, which is already a dependency. Currently (almost) all usage of YAML is in test data. For example,trippy/crates/trippy-core/tests/resources/state/nat.yaml
Lines 1 to 22 in e2c7726
This could be translated to:
Some files use the tag feature of YAML e.g.
!SingleHost
, which presumably could be replaced with an optional key in TOML and some processing in the code.The usage other than "almost all" is in i18n strings, introduced by rust-i18n, which is not packaged in Debian and "polyfilled" with an ad-hoc patch to deliver the new functionality ASAP without seeing rust-i18n packages through NEW queue. Arguably, it could be replaced with i18n-embed, which supports the Fluent translation system, as well as the old gettext system, both very popular and widely supported. It has built-in locale resolution through the locale_config crate. But this is probably too big a change, and a too abrupt one shortly after i18n is released.
Note this is strongly influenced by my PoV as a downstream package maintainer, focusing on maintainability (serde_yml) and avoiding unnecessary dependencies (serde_yml, rust-i18n), which are not always the biggest concerns for upstream developers.
I'm willing to implement the change if either is considered acceptable.
The text was updated successfully, but these errors were encountered: