fork of radicle with Git LFS support, backed by IPFS
Go to file
Fintan Halpenny adaed6a3ac
radicle: validated construction of Project
The `validate` method of `Project` was unused, which is problematic if
the attributes are supposed to be validated based on some
constraints. The issue is that `Project` provided public construction
of its fields with enforcing validation.

This change makes `Project`'s attributes private and introduces a
smart constructor `new` which is fallible if any of the constraints
are not met. The error type was changed to be a vector of errors since
all of these errors can be collected for better error reporting.

Deserialization also provided a way of constructing a `Project`
without ensuring any of the constraints were checked. To prevent this
a hand-rolled `Deserialize` is provided that goes through
`Project::new`.

To access the fields of `Project`, accessor functions are added and
all call sites are updated to use them.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2022-12-27 12:23:39 +01:00
.github/workflows Upgrade Rust to 1.66 2022-12-15 20:55:26 +01:00
.nix nix: update sources for rust-1.66 2022-12-19 13:03:15 +00:00
radicle radicle: validated construction of Project 2022-12-27 12:23:39 +01:00
radicle-cli radicle: validated construction of Project 2022-12-27 12:23:39 +01:00
radicle-cob cob: panic on badly formatted debug env var 2022-12-26 15:38:39 +01:00
radicle-crdt Make `Transaction` generic, move to `store` 2022-12-13 10:16:18 +01:00
radicle-crypto Upgrade Rust to 1.66 2022-12-15 20:55:26 +01:00
radicle-httpd httpd: Use `TraceLayer` on uppermost router 2022-12-26 15:56:21 +01:00
radicle-node Upgrade Rust to 1.66 2022-12-15 20:55:26 +01:00
radicle-remote-helper Upgrade Rust to 1.66 2022-12-15 20:55:26 +01:00
radicle-ssh Update to Rust 1.65 2022-11-05 12:47:26 +01:00
radicle-tools Upgrade Rust to 1.66 2022-12-15 20:55:26 +01:00
.dockerignore Dockerize services 2022-12-14 17:15:40 +01:00
.gitignore Initial commit 2022-09-13 10:13:13 +02:00
CONTRIBUTING.md Add licenses and contributor information 2022-11-16 12:26:12 +01:00
Cargo.lock Update `radicle-git` to `79a94721366490053e2d8ac1c1afa14fb0c25f09` 2022-12-23 13:22:55 +01:00
Cargo.toml Update `radicle-git` to `79a94721366490053e2d8ac1c1afa14fb0c25f09` 2022-12-23 13:22:55 +01:00
DCO Add licenses and contributor information 2022-11-16 12:26:12 +01:00
LICENSE-APACHE Add licenses and contributor information 2022-11-16 12:26:12 +01:00
LICENSE-MIT Add licenses and contributor information 2022-11-16 12:26:12 +01:00
README.md Add placeholder README 2022-10-14 13:19:28 +02:00
build.rs httpd: implement `git` fetch-only server 2022-10-19 11:36:16 +02:00
docker-compose.yml Build container images for deployment 2022-12-14 17:15:40 +01:00
rust-toolchain Upgrade Rust to 1.66 2022-12-15 20:55:26 +01:00

README.md

❤️🪵

Radicle Heartwood Protocol & Stack