Skip to content

Commit e9a0e1d

Browse files
committed
draft of updating with Warg federation
1 parent 088a728 commit e9a0e1d

7 files changed

Lines changed: 183 additions & 299 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ Cargo.lock
44
**/*.rs.bk
55
*.pdb
66
publish
7+
*.swp

Cargo.lock

Lines changed: 50 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,16 @@ wat = "1.202.0"
7171
logos = "0.14.0"
7272
miette = "7.2.0"
7373
thiserror = "1.0.58"
74-
warg-client = "0.4.1"
75-
warg-protocol = "0.4.1"
76-
warg-crypto = "0.4.1"
77-
warg-server = "0.4.1"
78-
warg-credentials = "0.4.1"
74+
warg-protocol = { git = "https://github.com/bytecodealliance/registry", rev = "ac901b9" }
75+
warg-crypto = { git = "https://github.com/bytecodealliance/registry", rev = "ac901b9" }
76+
warg-client = { git = "https://github.com/bytecodealliance/registry", rev = "ac901b9" }
77+
warg-credentials = { git = "https://github.com/bytecodealliance/registry", rev = "ac901b9" }
78+
warg-server = { git = "https://github.com/bytecodealliance/registry", rev = "ac901b9" }
79+
#warg-client = "0.4.1"
80+
#warg-protocol = "0.4.1"
81+
#warg-crypto = "0.4.1"
82+
#warg-server = "0.4.1"
83+
#warg-credentials = "0.4.1"
7984
secrecy = "0.8.0"
8085
futures = "0.3.30"
8186
indicatif = "0.17.8"

crates/wac-resolver/src/lib.rs

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ pub enum Error {
2828
#[label(primary, "unknown package `{name}`")]
2929
span: SourceSpan,
3030
},
31+
/// An invalid package name was encountered.
32+
#[error("invalid package name `{name}`")]
33+
InvalidPackageName {
34+
/// The name of the package.
35+
name: String,
36+
/// The span where the error occurred.
37+
#[label(primary, "invalid package name `{name}`")]
38+
span: SourceSpan,
39+
},
3140
/// An unknown package version was encountered.
3241
#[cfg(feature = "registry")]
3342
#[error("version {version} of package `{name}` does not exist")]
@@ -56,22 +65,22 @@ pub enum Error {
5665
#[label(primary, "package `{name}` does not exist")]
5766
span: SourceSpan,
5867
},
59-
/// The requested package version has been yanked.
68+
/// The requested package version has been yanked or does not exist.
6069
#[cfg(feature = "registry")]
61-
#[error("version {version} of package `{name}` has been yanked")]
62-
PackageVersionYanked {
70+
#[error("version {version} of package `{name}` has been yanked or does not exist")]
71+
PackageVersionYankedOrDoesNotExist {
6372
/// The name of the package.
6473
name: String,
65-
/// The version of the package that has been yanked.
74+
/// The version of the package.
6675
version: semver::Version,
6776
/// The span where the error occurred.
68-
#[label(primary, "{version} has been yanked")]
77+
#[label(primary, "{version} has been yanked or does not exist")]
6978
span: SourceSpan,
7079
},
71-
/// A package log was empty.
80+
/// A package has no releases.
7281
#[cfg(feature = "registry")]
73-
#[error("a release for package `{name}` has not yet been published")]
74-
PackageLogEmpty {
82+
#[error("package `{name}` has no releases")]
83+
PackageNoReleases {
7584
/// The name of the package.
7685
name: String,
7786
/// The span where the error occurred.

0 commit comments

Comments
 (0)