Skip to content

Commit

Permalink
Merge pull request #370 from maciejhirsz/logos
Browse files Browse the repository at this point in the history
chore(lib): back from logos2 to logos
  • Loading branch information
jeertmans authored Feb 7, 2024
2 parents 9ec6a64 + 5f02535 commit 0780d6b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 32 deletions.
9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rust-version = "1.65.0"
version = "0.14.0"

[package]
name = "logos2"
name = "logos"
authors.workspace = true
categories.workspace = true
description.workspace = true
Expand All @@ -34,20 +34,19 @@ msrv = "1.65.0" # Needed to duplicate, because cargo-msrv does not support work

[package.metadata.release]
pre-release-replacements = [
{file="book/src/getting-started.md", search="logos2 = \"[0-9]+\\.[0-9]+\\.[0-9]+\"", replace="logos2 = \"{{version}}\"", exactly=1},
{file="book/src/getting-started.md", search="logos = \"[0-9]+\\.[0-9]+\\.[0-9]+\"", replace="logos2 = \"{{version}}\"", exactly=1},
]
shared-version = true

[lib]
bench = false
name = "logos"

[features]
default = ["export_derive", "std"]
# Re-exports the `Logos` derive macro, so that end user only needs to
# import this crate and `use logos::Logos` to get both the trait and
# derive proc macro.
export_derive = ["logos-derive2"]
export_derive = ["logos-derive"]
# Should the crate use the standard library?
std = []

Expand All @@ -61,7 +60,7 @@ bench = {lto = true}
release = {lto = true}

[dependencies]
logos-derive2 = {version = "0.14.0", path = "./logos-derive", optional = true}
logos-derive = {version = "0.14.0", path = "./logos-derive", optional = true}

[dev-dependencies]
ariadne = {version = "0.2.0", features = ["auto-color"]}
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<img src="https://raw.githubusercontent.com/maciejhirsz/logos/master/logos.svg?sanitize=true" alt="Logos logo" width="250" align="right">

> **Warning**: as of v0.14, Logos is released under `logos2`,
> see [#365](https://github.com/maciejhirsz/logos/pull/365). However, the library name
> is still `logos`, so you should only change your dependencies in `Cargo.toml` to
> use the latest versions.
# Logos

![Test](https://github.com/maciejhirsz/logos/workflows/Test/badge.svg?branch=master)
Expand Down
9 changes: 1 addition & 8 deletions book/src/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,7 @@

```toml
[dependencies]
logos2 = "0.14.0"
```

```admonish warning
As of v0.14, Logos is released under `logos2`,
see [#365](https://github.com/maciejhirsz/logos/pull/365). However, the library name
is still `logos`, so you should only change your dependencies in `Cargo.toml` to
use the latest versions.
logos = "0.14.0"
```

Then, you can automatically derive the [`Logos`](https://docs.rs/logos2/latest/logos/trait.Logos.html) trait on your `enum` using the `Logos` derive macro:
Expand Down
9 changes: 2 additions & 7 deletions logos-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
[[bin]]
bench = false
name = "logos-cli"
path = "src/main.rs"

[dependencies]
anyhow = "1.0.57"
clap = {version = "3.1.18", features = ["derive"]}
fs-err = "2.7.0"
logos-codegen2 = {version = "0.14.0", path = "../logos-codegen"}
logos-codegen = {version = "0.14.0", path = "../logos-codegen"}
proc-macro2 = "1.0.39"

[dev-dependencies]
Expand All @@ -16,7 +11,7 @@ assert_fs = "1.0.7"
predicates = "2.1.1"

[package]
name = "logos-cli2"
name = "logos-cli"
authors.workspace = true
categories.workspace = true
description.workspace = true
Expand Down
3 changes: 1 addition & 2 deletions logos-codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ pretty_assertions = "1.4.0"

[lib]
bench = false
name = "logos_codegen"

[package]
name = "logos-codegen2"
name = "logos-codegen"
authors.workspace = true
categories.workspace = true
description.workspace = true
Expand Down
5 changes: 2 additions & 3 deletions logos-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
[dependencies]
logos-codegen2 = {version = "0.14.0", path = "../logos-codegen"}
logos-codegen = {version = "0.14.0", path = "../logos-codegen"}

[lib]
bench = false
name = "logos_derive"
proc-macro = true

[package]
name = "logos-derive2"
name = "logos-derive"
authors.workspace = true
categories.workspace = true
description.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ publish = false
version = "0.1.0"

[dependencies]
logos-derive2 = {path = "../logos-derive"}
logos2 = {path = "../", default-features = false, features = ["std"]}
logos-derive = {path = "../logos-derive"}
logos = {path = "../", default-features = false, features = ["std"]}

[dev-dependencies]
criterion = "0.4"
Expand Down

0 comments on commit 0780d6b

Please sign in to comment.