Skip to content

Commit 232d9ee

Browse files
Merge pull request #255 from mh-northlander/feature/minimum-rust-support
Aggregate package information into root Cargo.toml
2 parents 930a4a7 + d75d43d commit 232d9ee

File tree

10 files changed

+72
-60
lines changed

10 files changed

+72
-60
lines changed

Cargo.toml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
[workspace]
2+
resolver = "2"
23
members = [
34
"sudachi",
45
"sudachi-cli",
56
"sudachi-fuzz",
67
"plugin/input_text/*",
78
"plugin/oov/*",
89
"plugin/path_rewrite/*",
9-
"python"
10+
"python",
1011
]
12+
default-members = ["sudachi", "sudachi-cli"]
1113

12-
default-members = [
13-
"sudachi",
14-
"sudachi-cli"
15-
]
16-
17-
resolver = "2"
14+
[workspace.package]
15+
version = "0.6.9-a1"
16+
authors = ["Works Applications <sudachi@worksap.co.jp>"]
17+
edition = "2021"
18+
rust-version = "1.74.1"
19+
description = "Rust version of Sudachi, the Japanese Morphological Analyzer"
20+
readme = "README.md"
21+
homepage = "https://github.com/WorksApplications/sudachi.rs"
22+
repository = "https://github.com/WorksApplications/sudachi.rs"
23+
license = "Apache-2.0"

plugin/input_text/default_input_text/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[package]
22
name = "default_input_text"
3-
version = "0.6.9-a1"
4-
authors = ["Works Applications <sudachi@worksap.co.jp>"]
5-
edition = "2018"
6-
license = "Apache-2.0"
3+
version.workspace = true
4+
authors.workspace = true
5+
edition.workspace = true
6+
rust-version.workspace = true
7+
license.workspace = true
78

89
[lib]
910
crate-type = ["cdylib"]

plugin/oov/simple_oov/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[package]
22
name = "simple_oov"
3-
version = "0.6.9-a1"
4-
authors = ["Works Applications <sudachi@worksap.co.jp>"]
5-
edition = "2018"
6-
license = "Apache-2.0"
3+
version.workspace = true
4+
authors.workspace = true
5+
edition.workspace = true
6+
rust-version.workspace = true
7+
license.workspace = true
78

89
[lib]
910
crate-type = ["cdylib"]

plugin/path_rewrite/join_katakana_oov/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[package]
22
name = "join_katakana_oov"
3-
version = "0.6.9-a1"
4-
authors = ["Works Applications <sudachi@worksap.co.jp>"]
5-
edition = "2018"
6-
license = "Apache-2.0"
3+
version.workspace = true
4+
authors.workspace = true
5+
edition.workspace = true
6+
rust-version.workspace = true
7+
license.workspace = true
78

89
[lib]
910
crate-type = ["cdylib"]

plugin/path_rewrite/join_numeric/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[package]
22
name = "join_numeric"
3-
version = "0.6.9-a1"
4-
authors = ["Works Applications <sudachi@worksap.co.jp>"]
5-
edition = "2018"
6-
license = "Apache-2.0"
3+
version.workspace = true
4+
authors.workspace = true
5+
edition.workspace = true
6+
rust-version.workspace = true
7+
license.workspace = true
78

89
[lib]
910
crate-type = ["cdylib"]

python/Cargo.toml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
[package]
22
name = "sudachipy"
3-
version = "0.6.9-a1"
4-
edition = "2018"
3+
version.workspace = true
4+
authors.workspace = true
5+
edition.workspace = true
6+
rust-version.workspace = true
57
description = "Python bindings of sudachi.rs, the Japanese Morphological Analyzer"
6-
homepage = "https://github.com/WorksApplications/sudachi.rs"
7-
repository = "https://github.com/WorksApplications/sudachi.rs"
8-
license = "Apache-2.0"
9-
8+
readme = "README.md"
9+
homepage.workspace = true
10+
repository.workspace = true
11+
license.workspace = true
1012

1113
[lib]
1214
name = "sudachipy"

sudachi-cli/Cargo.toml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
[package]
22
name = "sudachi-cli"
3-
version = "0.6.9-a1"
4-
authors = ["Works Applications <sudachi@worksap.co.jp>"]
5-
edition = "2018"
6-
description = "Rust version of Sudachi, the Japanese Morphological Analyzer"
7-
readme = "../README.md"
8-
homepage = "https://github.com/WorksApplications/sudachi.rs"
9-
repository = "https://github.com/WorksApplications/sudachi.rs"
10-
license = "Apache-2.0"
3+
version.workspace = true
4+
authors.workspace = true
5+
edition.workspace = true
6+
rust-version.workspace = true
7+
description.workspace = true
8+
readme.workspace = true
9+
homepage.workspace = true
10+
repository.workspace = true
11+
license.workspace = true
1112

1213
[dependencies]
1314
sudachi = { path = "../sudachi" }
@@ -22,4 +23,4 @@ path = "src/main.rs"
2223

2324
[features]
2425
# Compile dictionary into executable (specifying dictionary becomes optional)
25-
bake_dictionary = []
26+
bake_dictionary = []

sudachi-fuzz/Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
[package]
22
name = "sudachi-fuzz"
33
version = "0.0.1"
4-
authors = ["Works Applications <sudachi@worksap.co.jp>"]
5-
edition = "2021"
6-
description = "Rust version of Sudachi, the Japanese Morphological Analyzer"
4+
authors.workspace = true
5+
edition.workspace = true
6+
rust-version.workspace = true
7+
description.workspace = true
8+
license.workspace = true
79

810
[dependencies]
911
sudachi = { path = "../sudachi" }
1012
criterion = "0.5"
1113
arbitrary = "1"
1214

1315
[target.'cfg(unix)'.dependencies]
14-
honggfuzz = "0.5"
16+
honggfuzz = "0.5"

sudachi/Cargo.toml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
[package]
22
name = "sudachi"
3-
version = "0.6.9-a1"
4-
authors = ["Works Applications <sudachi@worksap.co.jp>"]
5-
edition = "2018"
6-
description = "Rust version of Sudachi, the Japanese Morphological Analyzer"
7-
readme = "README.md"
8-
homepage = "https://github.com/WorksApplications/sudachi.rs"
9-
repository = "https://github.com/WorksApplications/sudachi.rs"
10-
license = "Apache-2.0"
3+
version.workspace = true
4+
authors.workspace = true
5+
edition.workspace = true
6+
rust-version.workspace = true
7+
description.workspace = true
8+
readme.workspace = true
9+
homepage.workspace = true
10+
repository.workspace = true
11+
license.workspace = true
1112

1213
[dependencies] # this should be sorted
1314
aho-corasick = "1" # MIT/Apache 2.0
@@ -38,4 +39,4 @@ join_numeric = { path = "../plugin/path_rewrite/join_numeric" }
3839
join_katakana_oov = { path = "../plugin/path_rewrite/join_katakana_oov" }
3940

4041
[lib]
41-
crate-type = ["rlib"]
42+
crate-type = ["rlib"]

update_version.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
set -eu
44

5-
if [ $# -lt 2 ] && [ "$1" != "show" ] ; then
5+
if [ $# -lt 1 ] || ( [ $# -lt 2 ] && [ "$1" != "show" ] ) ; then
66
echo "Provide 2 arguments [from] and [to] to update version, or 'show' to print current one."
77
exit 1
88
fi
99

10-
VERSION_CRR=$(cat ./sudachi/Cargo.toml | grep -m1 "version \?=" | sed -r 's/^.*"(.*)".*$/\1/')
10+
VERSION_CRR=$(cat ./Cargo.toml | grep -m1 "version \?=" | sed -r 's/^.*"(.*)".*$/\1/')
1111

1212
if [ $1 = "show" ] ; then
1313
echo ${VERSION_CRR}
@@ -25,13 +25,9 @@ fi
2525
# update
2626
echo "Update version from ${VERSION_FROM} to ${VERSION_TO}"
2727

28-
CARGO_FILES="$(find . -name Cargo.toml)"
29-
30-
for FILE in $CARGO_FILES ; do
31-
echo $FILE
32-
# replace the first occurrence of `^version = "<version>"$`
33-
sed -i -r "1,/^version = / s/^version = \"${VERSION_FROM}\"$/version = \"${VERSION_TO}\"/" $FILE
34-
done
28+
WORKSPACE_CARGO_FILE="./Cargo.toml"
29+
echo $WORKSPACE_CARGO_FILE
30+
sed -i -r "1,/^version = / s/^version = \"${VERSION_FROM}\"$/version = \"${VERSION_TO}\"/" $WORKSPACE_CARGO_FILE
3531

3632
PY_SETUP_FILE="./python/setup.py"
3733
echo $PY_SETUP_FILE

0 commit comments

Comments
 (0)