There are "standards" out there suggesting you use an "errors" field with an array of error objects: https://jsonapi.org/format/#error-objects
This could certainly be made into a much more complicated object. I don't have strong opinions on that.
I pushed a few commits that address my own comments.
I also tweaked a bit the json fields. In particular, I dropped the build_
prefix of the fields and tried to make the field names and…
Also, I think this function is only used in order to get the binary size? If so, then we can return that directly (as an option)
Tbh here I think I would just keep the redirect and rely on job_build
returning a json object that includes the uuid.
For consistency maybe drop the build_
prefix? Else I guess we should write build_uuid
as well? :-)
I don't like that we make up a main binary if it doesn't exist. Can we use an option? For example, "0" is not a valid sha256 checksum, -1
is not a valid size...
Then here we could make build_size
optional or have it be `Null
if the file is None
.
This is done in d2a0e526dad259f71fc7f741129aba8e476c8f7a. I found that there's no support for infix attributes on binding operators (.e.g let+
) so I went with an intermediate binding.
https://…
What do you suggest instead? Mute partial match warnings?
let [@@warning "-8"] (`Commit c) = Store.read_exn .. in
..
Hm. To me it seems fine that digest
returns the blob. As I understand it it's a digest that represents the file data. Maybe @dinosaure, who has a much better understanding of both git and…