- Mar 07, 2024
-
-
Georges Racinet authored
It is hard imagining converting this Heptapod-specific error into something else than `Internal`. Anyway, such shortcuts do not preclude performing manual error treatment.
-
- Aug 06, 2023
-
-
Georges Racinet authored
Rust 1.65 is currently the version generally available in GitLab context (upstream usage appeared recently) and it is also able to build tokei 12.1.2, whereas 1.61 cannot. This leads up to fix the following Clippy error (not in 1.61): "you are deriving `PartialEq` and can implement `Eq`".
-
- Jun 16, 2023
-
-
Georges Racinet authored
As noted in comment, this should really be in the `store` subdirectory, but that is a fight (data migration) for another day.
-
Georges Racinet authored
`gitlab::state::lookup_typed_ref_as_node` is the specialization of `map_lookup_typed_ref` to return `Node`s, hence it is working on a single stream of typed refs, whereas the higher level `gitlab::revision::full_ref_node` is the specialization of `map_full_ref` that works for any ref given by its full path.
-
- Jun 14, 2023
-
-
Georges Racinet authored
This time, because there is no arbitrary name to consider, hence no bytes string, Tokio's `LinesStream` is perfectly suitable for our needs.
-
Georges Racinet authored
This follows the file format and conventions defined in the server side `heptapod` Python package. Since everything is async, we actually provide Streams of TypedRef objects, and the `map_lookup_typed_ref` for the numerous use cases when one is looking for a specific ref. The file format is very primitive, so all we can do at this point is to perform a full scan, but it has room (version preamble) for more advanced formats in the future (e.g, append-only persistent hash map or similar). A preliminary version of this was using Tokio's `LineStream`, but this has several drawbacks: - it is unicode-centric, yielding `String`s - we had to implement our own `Stream`, keeping the `LineStream` as a field. Hence because `poll_next()` takes `&mut Pin<Self>` we had to write a pinning accessor, which is unsafe (see the doc for `std::pin` for more details).
-