misc bugfixes for alpha.4 (#2953)

* fix lockup when stop during init

* Fix incorrect description for registry package remove command

* alpha.5

* beta.25

---------

Co-authored-by: Mariusz Kogen <k0gen@pm.me>
This commit is contained in:
Aiden McClelland
2025-05-23 11:23:29 -06:00
committed by GitHub
parent b1f9f90fec
commit 90e61989a4
19 changed files with 120 additions and 85 deletions

View File

@@ -44,8 +44,9 @@ mod v0_4_0_alpha_1;
mod v0_4_0_alpha_2;
mod v0_4_0_alpha_3;
mod v0_4_0_alpha_4;
mod v0_4_0_alpha_5;
pub type Current = v0_4_0_alpha_4::Version; // VERSION_BUMP
pub type Current = v0_4_0_alpha_5::Version; // VERSION_BUMP
impl Current {
#[instrument(skip(self, db))]
@@ -153,7 +154,8 @@ enum Version {
V0_4_0_alpha_1(Wrapper<v0_4_0_alpha_1::Version>),
V0_4_0_alpha_2(Wrapper<v0_4_0_alpha_2::Version>),
V0_4_0_alpha_3(Wrapper<v0_4_0_alpha_3::Version>),
V0_4_0_alpha_4(Wrapper<v0_4_0_alpha_4::Version>), // VERSION_BUMP
V0_4_0_alpha_4(Wrapper<v0_4_0_alpha_4::Version>),
V0_4_0_alpha_5(Wrapper<v0_4_0_alpha_5::Version>), // VERSION_BUMP
Other(exver::Version),
}
@@ -200,7 +202,8 @@ impl Version {
Self::V0_4_0_alpha_1(v) => DynVersion(Box::new(v.0)),
Self::V0_4_0_alpha_2(v) => DynVersion(Box::new(v.0)),
Self::V0_4_0_alpha_3(v) => DynVersion(Box::new(v.0)),
Self::V0_4_0_alpha_4(v) => DynVersion(Box::new(v.0)), // VERSION_BUMP
Self::V0_4_0_alpha_4(v) => DynVersion(Box::new(v.0)),
Self::V0_4_0_alpha_5(v) => DynVersion(Box::new(v.0)), // VERSION_BUMP
Self::Other(v) => {
return Err(Error::new(
eyre!("unknown version {v}"),
@@ -239,7 +242,8 @@ impl Version {
Version::V0_4_0_alpha_1(Wrapper(x)) => x.semver(),
Version::V0_4_0_alpha_2(Wrapper(x)) => x.semver(),
Version::V0_4_0_alpha_3(Wrapper(x)) => x.semver(),
Version::V0_4_0_alpha_4(Wrapper(x)) => x.semver(), // VERSION_BUMP
Version::V0_4_0_alpha_4(Wrapper(x)) => x.semver(),
Version::V0_4_0_alpha_5(Wrapper(x)) => x.semver(), // VERSION_BUMP
Version::Other(x) => x.clone(),
}
}

View File

@@ -0,0 +1,38 @@
use exver::{PreReleaseSegment, VersionRange};
use super::v0_3_5::V0_3_0_COMPAT;
use super::{v0_4_0_alpha_4, VersionT};
use crate::context::RpcContext;
use crate::prelude::*;
lazy_static::lazy_static! {
static ref V0_4_0_alpha_5: exver::Version = exver::Version::new(
[0, 4, 0],
[PreReleaseSegment::String("alpha".into()), 5.into()]
);
}
#[derive(Clone, Copy, Debug, Default)]
pub struct Version;
impl VersionT for Version {
type Previous = v0_4_0_alpha_4::Version;
type PreUpRes = ();
async fn pre_up(self) -> Result<Self::PreUpRes, Error> {
Ok(())
}
fn semver(self) -> exver::Version {
V0_4_0_alpha_5.clone()
}
fn compat(self) -> &'static VersionRange {
&V0_3_0_COMPAT
}
#[instrument]
fn up(self, _db: &mut Value, _: Self::PreUpRes) -> Result<(), Error> {
Ok(())
}
fn down(self, _db: &mut Value) -> Result<(), Error> {
Ok(())
}
}