radicle-heartwood-lfs/crates/radicle/CHANGELOG.md

14 KiB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

Added

  • Introduce a new variant to radicle::cob::patch::MergeTarget, Branch. The Branch variant holds a TargetBranch, which must either be a qualified refs/heads reference, or a references not beginning with refs; as a refs/heads will then be prepended to it.

Changed

Removed

Security

0.24.0

Added

  • New public field user_agent on radicle::node::config::Config. Struct-literal construction sites must include this field.
  • New variants CanonicalRefsError::Raw and ValidationError::Protected on existing exhaustive enums. Exhaustive match arms must add cases for them.
  • Two new trait methods on WriteRepository (also re-exported via radicle::prelude): set_head_to_default_branch and set_default_branch_to_canonical_head. Neither has a default implementation, so downstream impls must provide both.

Changed

  • To obtain the location of the control socket, do not use Home::socket (which was removed), but instead choose Home::socket_from_env or Home::socket_default depending on your use-case.
  • COB layer API refactor:
    • The Store gained a new generic parameter, Access. This type parameter describes the access type for the store, read-only or read-write. These two modes are captured by cob::store::access::ReadOnly and cob::store::access::WriteAs. The WriteAs construction requires the signing and verifying key of the local operator. This means that all methods that previously needed a Signer as a parameter no longer need this parameter.
    • Due to the above, all Mut stores, i.e., IssueMut, PatchMut, and IdentityMut, now require a Signer generic parameter. All access stores, i.e., Issues, Patches, and their Cache counterparts, all require an Access generic parameter.
    • Store::update, Store::create, Store::remove, and Issues::remove now take &mut self instead of &self.
  • Issues::open and Patches::open now require an Access parameter.
  • Identity::get_mut and Identity::load_mut now require a Signer parameter.
  • Home::issues_mut and Home::patches_mut now require a Signer parameter.
  • Transaction::initial, and Transaction::commit now require a Store that is WriteAs.

Removed

  • Profile-config types radicle::profile::RawConfig and radicle::profile::ConfigPath.
  • Canonical-rules types radicle::git::canonical::rules::Pattern and PatternError, along with Rules::iter and Rule::default_branch.
  • Methods IdentityMut::reload and Home::socket.
  • Trait radicle::identity::crefs::GetCanonicalRefs.
  • Enum variants CanonicalRefsError::Json, ValidationError::RadRef, and DefaultBranchRuleError::Pattern.
  • Trait method WriteRepository::set_head (superseded by the two new trait methods listed under Added).

0.23.0

Added

  • radicle::node::config::Config has a new required fetch field. Existing struct literals must be updated to include this field.
  • radicle::node::command::Command::Fetch variant has a new signed_references_minimum_feature_level field.
  • radicle::storage::refs::sigrefs::write::Update::Changed variant has a new level field.
  • radicle::storage::refs::sigrefs::write::Update::Unchanged variant has a new verified field.
  • radicle::storage::git::Validation has a new InsufficientFeatureLevel variant.
  • radicle::storage::SignRepository trait has a new required method force_sign_refs.

Changed

  • radicle::storage::refs::sigrefs::write::SignedRefsWriter::new now takes 5 parameters instead of 4.
  • radicle::node::Handle::fetch now takes 5 parameters instead of 4.

Removed

  • radicle::storage::refs::sigrefs::write::Update::Unchanged fields commit, refs, and signature were removed.
  • radicle::storage::refs::sigrefs::read::error::Verify::MissingIdentity variant was removed.
  • radicle::storage::refs::sigrefs::write::error::Head variants Blob, Refs, Signature, and MissingPath were removed.
  • radicle::storage::refs::sigrefs::git::committer function was removed.
  • radicle::storage::refs::sigrefs::git::Committer::from_env_or_else and Committer::from_env methods were removed.
  • radicle::storage::refs::sigrefs::read::VerifiedCommit methods id, signature, into_refs, and parent were removed.
  • radicle::storage::refs::RefsAt::load method was removed.
  • radicle::storage::refs::sigrefs::write::SignedRefsWriter::write method was removed.
  • radicle::storage::refs::sigrefs::read::error::MissingIdentity struct was removed.
  • radicle::storage::refs::SignedRefsAt struct was removed.

Security

  • Loading radicle::storage::refs::SignedRefs from a repository protects against replay attacks, graft attacks, and downgrade attacks.

0.22.0

Added

  • SQLite configuration is modeled as radicle::node::db::config::Config and can be configured via radicle::profile::config::Config. The two pragmas journal_mode and synchronous are exposed this way.
  • radicle::storage::git::Validation has a new Read variant to surface read errors encountered during validation.
  • radicle::storage::refs::Error has new Read and Write variants.

Changed

  • The default configuration for the SQLite pragma synchronous is changed from FULL to NORMAL, which generates less I/O operations. On power loss, transactions might be rolled back, but SQLite still guarantees consistency in this mode.
  • Opening database connections requires specification of a configuration. radicle::Profile conveniently provides methods that supply the configuration from radicle::Profile::config.
  • The TryFrom<PathBuf> implementation for Home is removed in favor of using the Home::new and Home::load methods.
  • radicle::storage::Remote, radicle::storage::Remotes, and radicle::storage::refs::SignedRefs no longer carry a generic verification state type parameter. The Verified and Unverified marker types previously from radicle-crypto have been removed; the structs now represent a single, unified state.
  • radicle::node::config::Config has a new required database field. Existing struct literals must be updated to include this field.
  • radicle::storage::git::Validation::MismatchedRef has a new remote field. Exhaustive match arms and struct literal construction must be updated.
  • radicle::identity::doc::update::delegates no longer takes a generic type parameter.

Removed

  • radicle::storage::refs::Updated enum was removed.
  • radicle::node::db::JournalMode enum was removed. Journal mode is now configured via radicle::node::db::config::Config.
  • radicle::git::remote_refs function was removed.
  • radicle::node::seed::SyncedAt::load method was removed.
  • radicle::storage::Remote::verified and Remote::unverified constructor methods were removed following the removal of the verification state type parameter.
  • radicle::storage::Remotes::unverified method was removed.
  • radicle::storage::refs::SignedRefs::new, SignedRefs::verified, SignedRefs::verify, SignedRefs::save, and SignedRefs::unverified methods were removed.
  • radicle::storage::refs::Refs::verified, Refs::signed, Refs::from_canonical, and Refs::canonical methods were removed.
  • radicle::storage::refs::Error variants InvalidSignature, Signer, Canonical, MissingIdentityRoot, MissingIdentity, and MismatchedIdentity were removed.
  • The public fields refs, signature, and id of radicle::storage::refs::SignedRefs are now #[doc(hidden)] and are no longer part of the public API.

Security

0.21.0

Added

  • radicle::node::command::Command added variants AnnounceRefsFor, SeedsFor, and Block.
  • radicle::cob::identity::ApplyError now contains a new variant NonDelegateUnauthorized.
  • radicle::node::Handle added a block method to allow setting the follow policy to Policy::Block.
  • radicle::node::Handle::announce_refs_for now allows specifying for which namespaces changes should be announced. A corresponding enum variant radicle::node::Command::AnnounceRefsFor is added.
  • radicle::node::Handle::seeds_for now allows specifying for which namespaces sync status should be reported. A corresponding enum variant radicle::node::Command::SeedsFor is added.

Changed

  • The discriminant values for radicle::node::command::Command have changed.
  • radicle::rad::CheckoutError is now marked as non_exhaustive.
  • radicle::storage::git::Storage::repositories_by_id returns impl Iterator<Item = Result<RepositoryInfo, RepositoryError>> instead of Result<Vec<RepositoryInfo>, RepositoryError>. The method now also requires one generic type parameter. Allowing callers to handle failures on a per-repository basis rather than having the entire operation fail if a single repository lookup fails.
  • radicle::node::Node::announce now takes an additional parameter to specify for which namespaces changes should be announced.
  • Re-exports from git2 at radicle::git::raw were limited, using the heartwood workspace as a filter. Dependents that require members that are not exported anymore will have to depend on git2 directly.
  • Some re-exports from git-ref-format-core were moved from radicle::git to radicle::fmt.
  • The crate now re-exports radicle::git::Oid from a new radicle-oid crate, in an effort to decrease dependence on git2 via radicle-git-ext. This new object identifier type does not implement Deref anymore. Use Into to convert to a git2::Oid as necessary.
  • Re-exports of radicle-git-ext were removed, as this dependency is removed. Instead of radicle_git_ext::Error, use git2::Error (re-exported as radicle::git::raw::Error) together with the new extension trait radicle::git::raw::ErrorExt.

Deprecated

  • radicle::node::Handle::announce_refs is deprecated in favor of radicle::node::Handle::announce_refs_for.
  • radicle::node::Handle::seeds is deprecated in favor of radicle::node::Handle::seeds_for.

Removed

  • radicle::storage::RepositoryError::GitExt was removed as a variant, where RepositoryError::Git now subsumes all Git errors.
  • radicle::identity::doc::DocError::GitExt was removed as a variant, where DocError::Git now subsumes all Git errors.
  • radicle::storage::refs::Error::GitExt was removed as a variant, where Error::Git now subsumes all Git errors.
  • radicle::cob::identity::ApplyError::GitExt was removed as a variant, where ApplyError::Git now subsumes all Git errors.
  • radicle::storage::Error::GitExt was removed as a variant, where Error::Git now subsumes all Git errors.
  • radicle::storage::git::cob::ObjectsError::GitExt was removed as a variant, where ObjectsError::Git now subsumes all Git errors.
  • radicle::git::canonical::rules::CanonicalError::References was removed as a variant, as it no longer occurs as an error.
  • The radicle::node::State::Connected variant no longer has a fetching field. Fetching information is now tracked in the service.
  • The data returned by Seeds contains state, which in turn contained the field fetching for ongoing fetches of that node, if in the Connected state. Connected no longer contains that field.
  • radicle::identity::doc::RepoId was removed, along with its re-exports at radicle::identity::RepoId and radicle::prelude::RepoId. The type is now provided by the radicle-core crate.
  • radicle::identity::doc::IdError was removed, along with its re-export at radicle::identity::IdError.
  • radicle::identity::doc::id::RAD_PREFIX constant was removed.
  • radicle::identity::doc::VersionError variant was corrected to UnknownVersion, correcting the typo. The typo has been corrected to UnknownVersion.
  • radicle::storage::git::RefError was removed.
  • radicle::storage::git::UserInfo was removed.
  • radicle::storage::git::NAMESPACES_GLOB, radicle::storage::git::CANONICAL_IDENTITY, and radicle::storage::git::SIGREFS_GLOB static variables were removed.
  • radicle::storage::git::trailers::SIGNATURE_TRAILER constant was removed.
  • The radicle::serde_ext::localtime module and its submodules (time, option::time, duration) were removed, including all associated serialize/deserialize functions. The radicle-localtime crate is introduced and provides these helpers.
  • The radicle::schemars_ext::crypto module was removed, including the PublicKey schema type. The schema is now provided by radicle-crypto.
  • The test storage modules under radicle::test::storage::git and their submodules (transport, cob, trailers, paths, temp) were removed from the public API, along with all associated types, traits, and functions.

Security

No security updates.

0.20.0

Added

  • Introduce a node event for canonical reference updates, Event::CanonicalRefUpdated. Whenever the node fetches new updates, it checks if canonical references can be updated. The node has learned how to return these results and emit them as node events. This is a breaking change since it adds a new variant the Event type.
  • Add #[non_exhaustive] to Event to prevent any further breaking changes when adding new variants.

Changed

  • radicle::profile::Home::socket defaults to the path \\.\pipe\radicle-node on Windows. The behavior on Unix-like systems has not changed.

Removed

  • radicle::node::DEFAULT_SOCKET_NAME, use radicle::profile::Home::socket instead.

Security