nixos-search
nixos-search copied to clipboard
Make `description` an `Option<DocValue>` and implement markdown rendering.
It seems like this is due the the markdown transition in nixpkgs: option descriptions may now look like {"_type":"mdDoc","text":"..."}, which does not deserialise to Option<String>.
This was not supposed to be a problem until flakes started using lib.mdDoc, but, since we index _module.args for all flakes and that was given a markdown description in https://github.com/NixOS/nixpkgs/commit/e04a09082e33d444c245e1d5859b37ace25f54a9, things break for all flakes.
So, amusingly, https://github.com/NixOS/nixos-search/pull/528 fixes this issue, although that was not intended at all.
The proper fix, of course, is to make description an Option<DocValue> and implement markdown rendering.
~Also we should probably fail the CI job when no flakes are successfully imported.~ That wouldn't have caught this since flakes with no modules are still succeeding.
Originally posted by @ncfavier in https://github.com/NixOS/nixos-search/issues/534#issuecomment-1240357880
Why do we need _reverse fields?
That was some elasticsearch optimization if i recall correctly