From 07e85a3501b61856a5f94123ed11a00ae870b171 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Sunkara Date: Wed, 27 Sep 2023 02:03:05 +0100 Subject: [PATCH] Move eyre code into a folder --- .gitignore | 1 - Cargo.toml | 77 +------------------ README.md | 14 ++-- CHANGELOG.md => eyre/CHANGELOG.md | 18 ++--- eyre/Cargo.toml | 74 ++++++++++++++++++ eyre/LICENSE-APACHE | 1 + eyre/LICENSE-MIT | 1 + eyre/README.md | 1 + build.rs => eyre/build.rs | 0 {examples => eyre/examples}/custom_handler.rs | 0 {examples => eyre/examples}/usage.rs | 0 {src => eyre/src}/backtrace.rs | 0 {src => eyre/src}/chain.rs | 0 {src => eyre/src}/context.rs | 0 {src => eyre/src}/error.rs | 0 {src => eyre/src}/error/pyo3_compat.rs | 0 {src => eyre/src}/fmt.rs | 0 {src => eyre/src}/kind.rs | 0 {src => eyre/src}/lib.rs | 10 +-- {src => eyre/src}/macros.rs | 0 {src => eyre/src}/ptr.rs | 0 {src => eyre/src}/wrapper.rs | 0 {tests => eyre/tests}/common/mod.rs | 0 {tests => eyre/tests}/compiletest.rs | 0 {tests => eyre/tests}/drop/mod.rs | 0 {tests => eyre/tests}/test_autotrait.rs | 0 {tests => eyre/tests}/test_boxed.rs | 0 {tests => eyre/tests}/test_chain.rs | 0 {tests => eyre/tests}/test_context.rs | 0 {tests => eyre/tests}/test_context_access.rs | 0 {tests => eyre/tests}/test_convert.rs | 0 {tests => eyre/tests}/test_downcast.rs | 0 {tests => eyre/tests}/test_fmt.rs | 0 {tests => eyre/tests}/test_location.rs | 0 {tests => eyre/tests}/test_macros.rs | 0 {tests => eyre/tests}/test_no_install.rs | 0 {tests => eyre/tests}/test_pyo3.rs | 0 {tests => eyre/tests}/test_repr.rs | 0 {tests => eyre/tests}/test_source.rs | 0 39 files changed, 99 insertions(+), 98 deletions(-) rename CHANGELOG.md => eyre/CHANGELOG.md (67%) create mode 100644 eyre/Cargo.toml create mode 120000 eyre/LICENSE-APACHE create mode 120000 eyre/LICENSE-MIT create mode 120000 eyre/README.md rename build.rs => eyre/build.rs (100%) rename {examples => eyre/examples}/custom_handler.rs (100%) rename {examples => eyre/examples}/usage.rs (100%) rename {src => eyre/src}/backtrace.rs (100%) rename {src => eyre/src}/chain.rs (100%) rename {src => eyre/src}/context.rs (100%) rename {src => eyre/src}/error.rs (100%) rename {src => eyre/src}/error/pyo3_compat.rs (100%) rename {src => eyre/src}/fmt.rs (100%) rename {src => eyre/src}/kind.rs (100%) rename {src => eyre/src}/lib.rs (99%) rename {src => eyre/src}/macros.rs (100%) rename {src => eyre/src}/ptr.rs (100%) rename {src => eyre/src}/wrapper.rs (100%) rename {tests => eyre/tests}/common/mod.rs (100%) rename {tests => eyre/tests}/compiletest.rs (100%) rename {tests => eyre/tests}/drop/mod.rs (100%) rename {tests => eyre/tests}/test_autotrait.rs (100%) rename {tests => eyre/tests}/test_boxed.rs (100%) rename {tests => eyre/tests}/test_chain.rs (100%) rename {tests => eyre/tests}/test_context.rs (100%) rename {tests => eyre/tests}/test_context_access.rs (100%) rename {tests => eyre/tests}/test_convert.rs (100%) rename {tests => eyre/tests}/test_downcast.rs (100%) rename {tests => eyre/tests}/test_fmt.rs (100%) rename {tests => eyre/tests}/test_location.rs (100%) rename {tests => eyre/tests}/test_macros.rs (100%) rename {tests => eyre/tests}/test_no_install.rs (100%) rename {tests => eyre/tests}/test_pyo3.rs (100%) rename {tests => eyre/tests}/test_repr.rs (100%) rename {tests => eyre/tests}/test_source.rs (100%) diff --git a/.gitignore b/.gitignore index 751767d..6936990 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ /target **/*.rs.bk Cargo.lock -/.pijul/ diff --git a/Cargo.toml b/Cargo.toml index 9090fb2..a6bf453 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] members = [ - "." + "eyre" ] [workspace.package] @@ -14,78 +14,3 @@ rust-version = "1.65.0" [workspace.dependencies] indenter = "0.3.0" once_cell = "1.18.0" - -[package] -name = "eyre" -version = "0.6.8" -authors = ["David Tolnay ", "Jane Lusby "] -description = "Flexible concrete Error Reporting type built on std::error::Error with customizable Reports" -documentation = "https://docs.rs/eyre" -categories = ["rust-patterns"] - -edition = { workspace = true } -license = { workspace = true } -repository = { workspace = true } -readme = { workspace = true } -rust-version = { workspace = true } - -[features] -default = ["auto-install", "track-caller"] -auto-install = [] -track-caller = [] - -[dependencies] -indenter = { workspace = true } -once_cell = { workspace = true } -pyo3 = { version = "0.13", optional = true, default-features = false } - -[dev-dependencies] -futures = { version = "0.3", default-features = false } -rustversion = "1.0" -thiserror = "1.0" -trybuild = { version = "1.0.19", features = ["diff"] } -backtrace = "0.3.46" -anyhow = "1.0.28" -syn = { version = "2.0", features = ["full"] } -pyo3 = { version = "0.13", default-features = false, features = ["auto-initialize"] } - -[package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] -rustdoc-args = ["--cfg", "doc_cfg"] - -[package.metadata.release] -dev-version = false - -[[package.metadata.release.pre-release-replacements]] -file = "CHANGELOG.md" -search = "Unreleased" -replace = "{{version}}" - -[[package.metadata.release.pre-release-replacements]] -file = "src/lib.rs" -search = "#!\\[doc\\(html_root_url.*" -replace = "#![doc(html_root_url = \"https://docs.rs/{{crate_name}}/{{version}}\")]" -exactly = 1 - -[[package.metadata.release.pre-release-replacements]] -file = "CHANGELOG.md" -search = "\\.\\.\\.HEAD" -replace = "...{{tag_name}}" -exactly = 1 - -[[package.metadata.release.pre-release-replacements]] -file = "CHANGELOG.md" -search = "ReleaseDate" -replace = "{{date}}" - -[[package.metadata.release.pre-release-replacements]] -file = "CHANGELOG.md" -search = "" -replace = "\n\n## [Unreleased] - ReleaseDate" -exactly = 1 - -[[package.metadata.release.pre-release-replacements]] -file = "CHANGELOG.md" -search = "" -replace = "\n[Unreleased]: https://github.com/yaahc/{{crate_name}}/compare/{{tag_name}}...HEAD" -exactly = 1 diff --git a/README.md b/README.md index 4048d52..7510416 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ eyre [![Rust Documentation](https://img.shields.io/badge/api-rustdoc-blue.svg)](https://docs.rs/eyre) [![Discord chat][discord-badge]][discord-url] -[actions-badge]: https://github.com/yaahc/eyre/workflows/Continuous%20integration/badge.svg -[actions-url]: https://github.com/yaahc/eyre/actions?query=workflow%3A%22Continuous+integration%22 +[actions-badge]: https://github.com/eyre-rs/eyre/workflows/Continuous%20integration/badge.svg +[actions-url]: https://github.com/eyre-rs/eyre/actions?query=workflow%3A%22Continuous+integration%22 [discord-badge]: https://img.shields.io/discord/960645145018110012?label=eyre%20community%20discord [discord-url]: https://discord.gg/z94RqmUTKB @@ -252,14 +252,14 @@ implements `context` for options which you can import to make existing [`anyhow::Context`]: https://docs.rs/anyhow/*/anyhow/trait.Context.html [`anyhow`]: https://github.com/dtolnay/anyhow [`tracing_error::SpanTrace`]: https://docs.rs/tracing-error/*/tracing_error/struct.SpanTrace.html -[`stable-eyre`]: https://github.com/yaahc/stable-eyre -[`color-eyre`]: https://github.com/yaahc/color-eyre +[`stable-eyre`]: https://github.com/eyre-rs/stable-eyre +[`color-eyre`]: https://github.com/eyre-rs/color-eyre [`jane-eyre`]: https://github.com/yaahc/jane-eyre -[`simple-eyre`]: https://github.com/yaahc/simple-eyre -[`color-spantrace`]: https://github.com/yaahc/color-spantrace +[`simple-eyre`]: https://github.com/eyre-rs/simple-eyre +[`color-spantrace`]: https://github.com/eyre-rs/color-spantrace [`color-backtrace`]: https://github.com/athre0z/color-backtrace -[^1]: example and explanation of breakage https://github.com/yaahc/eyre/issues/30#issuecomment-647650361 +[^1]: example and explanation of breakage https://github.com/eyre-rs/eyre/issues/30#issuecomment-647650361 #### License diff --git a/CHANGELOG.md b/eyre/CHANGELOG.md similarity index 67% rename from CHANGELOG.md rename to eyre/CHANGELOG.md index 913649e..2ca4285 100644 --- a/CHANGELOG.md +++ b/eyre/CHANGELOG.md @@ -43,12 +43,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 -[Unreleased]: https://github.com/yaahc/eyre/compare/v0.6.8...HEAD -[0.6.8]: https://github.com/yaahc/eyre/compare/v0.6.7...v0.6.8 -[0.6.7]: https://github.com/yaahc/eyre/compare/v0.6.6...v0.6.7 -[0.6.6]: https://github.com/yaahc/eyre/compare/v0.6.5...v0.6.6 -[0.6.5]: https://github.com/yaahc/eyre/compare/v0.6.4...v0.6.5 -[0.6.4]: https://github.com/yaahc/eyre/compare/v0.6.3...v0.6.4 -[0.6.3]: https://github.com/yaahc/eyre/compare/v0.6.2...v0.6.3 -[0.6.2]: https://github.com/yaahc/eyre/compare/v0.6.1...v0.6.2 -[0.6.1]: https://github.com/yaahc/eyre/releases/tag/v0.6.1 +[Unreleased]: https://github.com/eyre-rs/eyre/compare/v0.6.8...HEAD +[0.6.8]: https://github.com/eyre-rs/eyre/compare/v0.6.7...v0.6.8 +[0.6.7]: https://github.com/eyre-rs/eyre/compare/v0.6.6...v0.6.7 +[0.6.6]: https://github.com/eyre-rs/eyre/compare/v0.6.5...v0.6.6 +[0.6.5]: https://github.com/eyre-rs/eyre/compare/v0.6.4...v0.6.5 +[0.6.4]: https://github.com/eyre-rs/eyre/compare/v0.6.3...v0.6.4 +[0.6.3]: https://github.com/eyre-rs/eyre/compare/v0.6.2...v0.6.3 +[0.6.2]: https://github.com/eyre-rs/eyre/compare/v0.6.1...v0.6.2 +[0.6.1]: https://github.com/eyre-rs/eyre/releases/tag/v0.6.1 diff --git a/eyre/Cargo.toml b/eyre/Cargo.toml new file mode 100644 index 0000000..afa349d --- /dev/null +++ b/eyre/Cargo.toml @@ -0,0 +1,74 @@ +[package] +name = "eyre" +version = "0.6.8" +authors = ["David Tolnay ", "Jane Lusby "] +description = "Flexible concrete Error Reporting type built on std::error::Error with customizable Reports" +documentation = "https://docs.rs/eyre" +categories = ["rust-patterns"] + +edition = { workspace = true } +license = { workspace = true } +repository = { workspace = true } +readme = { workspace = true } +rust-version = { workspace = true } + +[features] +default = ["auto-install", "track-caller"] +auto-install = [] +track-caller = [] + +[dependencies] +indenter = { workspace = true } +once_cell = { workspace = true } +pyo3 = { version = "0.13", optional = true, default-features = false } + +[dev-dependencies] +futures = { version = "0.3", default-features = false } +rustversion = "1.0" +thiserror = "1.0" +trybuild = { version = "1.0.19", features = ["diff"] } +backtrace = "0.3.46" +anyhow = "1.0.28" +syn = { version = "2.0", features = ["full"] } +pyo3 = { version = "0.13", default-features = false, features = ["auto-initialize"] } + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] +rustdoc-args = ["--cfg", "doc_cfg"] + +[package.metadata.release] +dev-version = false + +[[package.metadata.release.pre-release-replacements]] +file = "CHANGELOG.md" +search = "Unreleased" +replace = "{{version}}" + +[[package.metadata.release.pre-release-replacements]] +file = "src/lib.rs" +search = "#!\\[doc\\(html_root_url.*" +replace = "#![doc(html_root_url = \"https://docs.rs/{{crate_name}}/{{version}}\")]" +exactly = 1 + +[[package.metadata.release.pre-release-replacements]] +file = "CHANGELOG.md" +search = "\\.\\.\\.HEAD" +replace = "...{{tag_name}}" +exactly = 1 + +[[package.metadata.release.pre-release-replacements]] +file = "CHANGELOG.md" +search = "ReleaseDate" +replace = "{{date}}" + +[[package.metadata.release.pre-release-replacements]] +file = "CHANGELOG.md" +search = "" +replace = "\n\n## [Unreleased] - ReleaseDate" +exactly = 1 + +[[package.metadata.release.pre-release-replacements]] +file = "CHANGELOG.md" +search = "" +replace = "\n[Unreleased]: https://github.com/eyre-rs/{{crate_name}}/compare/{{tag_name}}...HEAD" +exactly = 1 diff --git a/eyre/LICENSE-APACHE b/eyre/LICENSE-APACHE new file mode 120000 index 0000000..965b606 --- /dev/null +++ b/eyre/LICENSE-APACHE @@ -0,0 +1 @@ +../LICENSE-APACHE \ No newline at end of file diff --git a/eyre/LICENSE-MIT b/eyre/LICENSE-MIT new file mode 120000 index 0000000..76219eb --- /dev/null +++ b/eyre/LICENSE-MIT @@ -0,0 +1 @@ +../LICENSE-MIT \ No newline at end of file diff --git a/eyre/README.md b/eyre/README.md new file mode 120000 index 0000000..32d46ee --- /dev/null +++ b/eyre/README.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/build.rs b/eyre/build.rs similarity index 100% rename from build.rs rename to eyre/build.rs diff --git a/examples/custom_handler.rs b/eyre/examples/custom_handler.rs similarity index 100% rename from examples/custom_handler.rs rename to eyre/examples/custom_handler.rs diff --git a/examples/usage.rs b/eyre/examples/usage.rs similarity index 100% rename from examples/usage.rs rename to eyre/examples/usage.rs diff --git a/src/backtrace.rs b/eyre/src/backtrace.rs similarity index 100% rename from src/backtrace.rs rename to eyre/src/backtrace.rs diff --git a/src/chain.rs b/eyre/src/chain.rs similarity index 100% rename from src/chain.rs rename to eyre/src/chain.rs diff --git a/src/context.rs b/eyre/src/context.rs similarity index 100% rename from src/context.rs rename to eyre/src/context.rs diff --git a/src/error.rs b/eyre/src/error.rs similarity index 100% rename from src/error.rs rename to eyre/src/error.rs diff --git a/src/error/pyo3_compat.rs b/eyre/src/error/pyo3_compat.rs similarity index 100% rename from src/error/pyo3_compat.rs rename to eyre/src/error/pyo3_compat.rs diff --git a/src/fmt.rs b/eyre/src/fmt.rs similarity index 100% rename from src/fmt.rs rename to eyre/src/fmt.rs diff --git a/src/kind.rs b/eyre/src/kind.rs similarity index 100% rename from src/kind.rs rename to eyre/src/kind.rs diff --git a/src/lib.rs b/eyre/src/lib.rs similarity index 99% rename from src/lib.rs rename to eyre/src/lib.rs index fa5d654..35a9026 100644 --- a/src/lib.rs +++ b/eyre/src/lib.rs @@ -314,7 +314,7 @@ //! implements `context` for options which you can import to make existing //! `.context` calls compile. //! -//! [^1]: example and explanation of breakage https://github.com/yaahc/eyre/issues/30#issuecomment-647650361 +//! [^1]: example and explanation of breakage https://github.com/eyre-rs/eyre/issues/30#issuecomment-647650361 //! //! [Report]: https://docs.rs/eyre/*/eyre/struct.Report.html //! [`eyre::EyreHandler`]: https://docs.rs/eyre/*/eyre/trait.EyreHandler.html @@ -322,11 +322,11 @@ //! [`anyhow::Context`]: https://docs.rs/anyhow/*/anyhow/trait.Context.html //! [`anyhow`]: https://github.com/dtolnay/anyhow //! [`tracing_error::SpanTrace`]: https://docs.rs/tracing-error/*/tracing_error/struct.SpanTrace.html -//! [`stable-eyre`]: https://github.com/yaahc/stable-eyre -//! [`color-eyre`]: https://github.com/yaahc/color-eyre +//! [`stable-eyre`]: https://github.com/eyre-rs/stable-eyre +//! [`color-eyre`]: https://github.com/eyre-rs/color-eyre //! [`jane-eyre`]: https://github.com/yaahc/jane-eyre -//! [`simple-eyre`]: https://github.com/yaahc/simple-eyre -//! [`color-spantrace`]: https://github.com/yaahc/color-spantrace +//! [`simple-eyre`]: https://github.com/eyre-rs/simple-eyre +//! [`color-spantrace`]: https://github.com/eyre-rs/color-spantrace //! [`color-backtrace`]: https://github.com/athre0z/color-backtrace #![doc(html_root_url = "https://docs.rs/eyre/0.6.8")] #![warn( diff --git a/src/macros.rs b/eyre/src/macros.rs similarity index 100% rename from src/macros.rs rename to eyre/src/macros.rs diff --git a/src/ptr.rs b/eyre/src/ptr.rs similarity index 100% rename from src/ptr.rs rename to eyre/src/ptr.rs diff --git a/src/wrapper.rs b/eyre/src/wrapper.rs similarity index 100% rename from src/wrapper.rs rename to eyre/src/wrapper.rs diff --git a/tests/common/mod.rs b/eyre/tests/common/mod.rs similarity index 100% rename from tests/common/mod.rs rename to eyre/tests/common/mod.rs diff --git a/tests/compiletest.rs b/eyre/tests/compiletest.rs similarity index 100% rename from tests/compiletest.rs rename to eyre/tests/compiletest.rs diff --git a/tests/drop/mod.rs b/eyre/tests/drop/mod.rs similarity index 100% rename from tests/drop/mod.rs rename to eyre/tests/drop/mod.rs diff --git a/tests/test_autotrait.rs b/eyre/tests/test_autotrait.rs similarity index 100% rename from tests/test_autotrait.rs rename to eyre/tests/test_autotrait.rs diff --git a/tests/test_boxed.rs b/eyre/tests/test_boxed.rs similarity index 100% rename from tests/test_boxed.rs rename to eyre/tests/test_boxed.rs diff --git a/tests/test_chain.rs b/eyre/tests/test_chain.rs similarity index 100% rename from tests/test_chain.rs rename to eyre/tests/test_chain.rs diff --git a/tests/test_context.rs b/eyre/tests/test_context.rs similarity index 100% rename from tests/test_context.rs rename to eyre/tests/test_context.rs diff --git a/tests/test_context_access.rs b/eyre/tests/test_context_access.rs similarity index 100% rename from tests/test_context_access.rs rename to eyre/tests/test_context_access.rs diff --git a/tests/test_convert.rs b/eyre/tests/test_convert.rs similarity index 100% rename from tests/test_convert.rs rename to eyre/tests/test_convert.rs diff --git a/tests/test_downcast.rs b/eyre/tests/test_downcast.rs similarity index 100% rename from tests/test_downcast.rs rename to eyre/tests/test_downcast.rs diff --git a/tests/test_fmt.rs b/eyre/tests/test_fmt.rs similarity index 100% rename from tests/test_fmt.rs rename to eyre/tests/test_fmt.rs diff --git a/tests/test_location.rs b/eyre/tests/test_location.rs similarity index 100% rename from tests/test_location.rs rename to eyre/tests/test_location.rs diff --git a/tests/test_macros.rs b/eyre/tests/test_macros.rs similarity index 100% rename from tests/test_macros.rs rename to eyre/tests/test_macros.rs diff --git a/tests/test_no_install.rs b/eyre/tests/test_no_install.rs similarity index 100% rename from tests/test_no_install.rs rename to eyre/tests/test_no_install.rs diff --git a/tests/test_pyo3.rs b/eyre/tests/test_pyo3.rs similarity index 100% rename from tests/test_pyo3.rs rename to eyre/tests/test_pyo3.rs diff --git a/tests/test_repr.rs b/eyre/tests/test_repr.rs similarity index 100% rename from tests/test_repr.rs rename to eyre/tests/test_repr.rs diff --git a/tests/test_source.rs b/eyre/tests/test_source.rs similarity index 100% rename from tests/test_source.rs rename to eyre/tests/test_source.rs