• 3 Posts
  • 7 Comments
Joined 2 years ago
cake
Cake day: September 2nd, 2023

help-circle

  • I based my suggestion based on the logical requirement stated (first quote) which was later ignored (second quote).

    I know they call it a requirement, but it has the phrase “as little as possible.” If that were taken as broadly as it could be, it would not be written in Rust or C++, since, after all, there might be a standard library problem that takes Firefox and the crash reporter both down.

    The stated requirement is “don’t use Firefox’s code.” GTK is not Firefox’s code, and the code paths exercised by Firefox are going to be different than the ones exercised by this crash reporter. Besides, a lot of people use GNOME, XFCE, or LXDE: if GTK as a whole is borked, then you wouldn’t even be able to start Firefox under these environments, much less crash it.

    Also, they list other requirements, not just that one (it’s not a requirement if it uses words like “minimal,” because there’s no definite test to see if you’ve met the requirement or not; these are all desirables).

    • We want to minimize the use of external code: to improve crash reporter reliability (which is paramount), we want it to be as simple and auditable as possible.
    • Firefox vendors all dependencies in-tree, so we are hesitant to bring in large dependencies (GUI libraries are likely pretty sizable).
    • There are only a few third-party crates that provide a native OS look and feel (or actually use native GUI APIs): it’s desirable for the crash reporter to have a native feel to be familiar to users and take advantage of accessibility features.

    They downplay it in this list, but I’m pretty sure a11y is the biggest non-negotiable requirement, so Iced is out of the picture.

    Slint, on the other hand, is not a small library at all, and it only has full functionality if it pulls in Qt. There might not be a clear-cut, definite criteria for “minimize the use of external code,” but pulling in Qt definitely doesn’t count.









  • What do you think #[doc(hidden)] is for, other than declaring something “private” that the language unfortunately doesn’t let you declare as truly private right now?

    I’ve mostly seen it used as a way to expose tools to macro APIs. For example, these internal parts of the quote! macro, or these internal parts of the vec! macro. Changing these things shouldn’t be considered a semver violation, because they’re not really part of the API, even though the quote! macro can’t enforce it.

    The only other cases I can think of where I’ve seen #[doc(hidden)] used are even bigger kludges, and the hidden items definitely aren’t part of the platonic API, like pre-#[non_exhaustive] crates that wanted to reserve the right to add new variants to their enums.