Skip to content

Commit

Permalink
Bump thiserror from 1.0.66 to 2.0.4 (#269)
Browse files Browse the repository at this point in the history
* Bump thiserror from 1.0.66 to 2.0.4

Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.66 to 2.0.4.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@1.0.66...2.0.4)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix lint errors

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Colin Casey <[email protected]>
  • Loading branch information
dependabot[bot] and colincasey authored Dec 5, 2024
1 parent 88df0c3 commit 491c29f
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 28 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ regex = "1"
semver = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "1"
thiserror = "2"
toml = "0.8"
toml_edit = "0.22"
uriparse = "0.6"
Expand Down
4 changes: 2 additions & 2 deletions src/buildpacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub(crate) fn find_releasable_buildpacks(
.map_err(|e| FindReleasableBuildpacksError(starting_dir.to_path_buf(), e))
}
#[derive(Debug, thiserror::Error)]
#[error("I/O error while finding buildpacks\nPath: {}\nError: {1}", .0.display())]
#[error("I/O error while finding buildpacks\nPath: {0}\nError: {1}")]
pub(crate) struct FindReleasableBuildpacksError(PathBuf, ignore::Error);

pub(crate) fn read_buildpack_descriptor(
Expand All @@ -70,7 +70,7 @@ pub(crate) fn read_buildpack_descriptor(
}

#[derive(Debug, thiserror::Error)]
#[error("Failed to read buildpack descriptor\nPath: {}\nError: {1}", .0.display())]
#[error("Failed to read buildpack descriptor\nPath: {0}\nError: {1}")]
pub(crate) struct ReadBuildpackDescriptorError(PathBuf, #[source] TomlFileError);

#[cfg(test)]
Expand Down
4 changes: 2 additions & 2 deletions src/commands/generate_changelog/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ pub(crate) enum Error {
FindReleasableBuildpacks(FindReleasableBuildpacksError),
#[error(transparent)]
ReadBuildpackDescriptor(ReadBuildpackDescriptorError),
#[error("Could not read changelog\nPath: {}\nError: {1}", .0.display())]
#[error("Could not read changelog\nPath: {0}\nError: {1}")]
ReadingChangelog(PathBuf, #[source] std::io::Error),
#[error("Could not parse changelog\nPath: {}\nError: {1}", .0.display())]
#[error("Could not parse changelog\nPath: {0}\nError: {1}")]
ParsingChangelog(PathBuf, #[source] ChangelogError),
#[error(transparent)]
SetActionOutput(WriteActionDataError),
Expand Down
18 changes: 9 additions & 9 deletions src/commands/prepare_release/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@ pub(crate) enum Error {
NotAllVersionsMatch(HashMap<PathBuf, BuildpackVersion>),
#[error("No fixed version could be determined")]
NoFixedVersion,
#[error("Could not read changelog\nPath: {}\nError: {1}", .0.display())]
#[error("Could not read changelog\nPath: {0}\nError: {1}")]
ReadingChangelog(PathBuf, #[source] io::Error),
#[error("Could not parse changelog\nPath: {}\nError: {1}", .0.display())]
#[error("Could not parse changelog\nPath: {0}\nError: {1}")]
ParsingChangelog(PathBuf, #[source] ChangelogError),
#[error("Could not write changelog\nPath: {}\nError: {1}", .0.display())]
#[error("Could not write changelog\nPath: {0}\nError: {1}")]
WritingChangelog(PathBuf, #[source] io::Error),
#[error("Missing required field `{1}` in buildpack.toml\nPath: {}", .0.display())]
#[error("Missing required field `{1}` in buildpack.toml\nPath: {0}")]
MissingRequiredField(PathBuf, String),
#[error("Invalid buildpack id `{1}` in buildpack.toml\nPath: {}", .0.display())]
#[error("Invalid buildpack id `{1}` in buildpack.toml\nPath: {0}")]
InvalidBuildpackId(PathBuf, String),
#[error("Invalid buildpack version `{1}` in buildpack.toml\nPath: {}", .0.display())]
#[error("Invalid buildpack version `{1}` in buildpack.toml\nPath: {0}")]
InvalidBuildpackVersion(PathBuf, String),
#[error("Could not read buildpack\nPath: {}\nError: {1}", .0.display())]
#[error("Could not read buildpack\nPath: {0}\nError: {1}")]
ReadingBuildpack(PathBuf, #[source] io::Error),
#[error("Could not parse buildpack\nPath: {}\nError: {1}", .0.display())]
#[error("Could not parse buildpack\nPath: {0}\nError: {1}")]
ParsingBuildpack(PathBuf, #[source] toml_edit::TomlError),
#[error("Could not write buildpack\nPath: {}\nError: {1}", .0.display())]
#[error("Could not write buildpack\nPath: {0}\nError: {1}")]
WritingBuildpack(PathBuf, #[source] io::Error),
}

Expand Down
16 changes: 9 additions & 7 deletions src/commands/update_builder/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@ use std::path::PathBuf;

#[derive(Debug, thiserror::Error)]
pub(crate) enum Error {
#[error("Failed to resolve path {}\nError: {1}", .0.display())]
#[error("Failed to resolve path {0}\nError: {1}")]
ResolvePath(PathBuf, std::io::Error),
#[error(transparent)]
FindReleasableBuildpacks(FindReleasableBuildpacksError),
#[error(transparent)]
ReadBuildpackDescriptor(ReadBuildpackDescriptorError),
#[error("No buildpacks were found in the given directory\nPath: {}", .0.display())]
#[error("No buildpacks were found in the given directory\nPath: {0}")]
NoBuildpacks(PathBuf),
#[error("Could not read builder\nPath: {}\nError: {1}", .0.display())]
#[error("Could not read builder\nPath: {0}\nError: {1}")]
ReadingBuilder(PathBuf, #[source] std::io::Error),
#[error("Could not parse builder\nPath: {}\nError: {1}", .0.display())]
#[error("Could not parse builder\nPath: {0}\nError: {1}")]
ParsingBuilder(PathBuf, #[source] toml_edit::TomlError),
#[error("Error writing builder\nPath: {}\nError: {1}", .0.display())]
#[error("Error writing builder\nPath: {0}\nError: {1}")]
WritingBuilder(PathBuf, #[source] std::io::Error),
#[error("No builder.toml files found in the given builder directories\n{}", list_builders(.0))]
NoBuilderFiles(Vec<String>),
#[error("The following buildpack is missing the metadata.release.image.repository entry\nPath: {}", .0.display())]
#[error(
"The following buildpack is missing the metadata.release.image.repository entry\nPath: {0}"
)]
MissingImageRepositoryMetadata(PathBuf),
#[error("Failed to calculate digest for buildpack\nPath: {}\nError: {1}", .0.display())]
#[error("Failed to calculate digest for buildpack\nPath: {0}\nError: {1}")]
CalculatingDigest(PathBuf, #[source] CalculateDigestError),
#[error("Missing required key `{0}` in builder")]
BuilderMissingRequiredKey(String),
Expand Down

0 comments on commit 491c29f

Please sign in to comment.