Skip to content

Commit

Permalink
chore: publish util and pattern-matcher crates (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
morgante authored Apr 29, 2024
1 parent 027b9b0 commit 6e29510
Show file tree
Hide file tree
Showing 24 changed files with 163 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --features test_ci --exclude marzano-wasm-bindings -- -D warnings
args: --workspace --features test_ci --exclude grit-wasm-bindings -- -D warnings
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
run: |
cargo test --workspace \
--features test_ci \
--exclude marzano-wasm-bindings \
--exclude grit-wasm-bindings \
--exclude rustfsm \
--exclude temporal-sdk-core-test-utils \
--exclude temporal-client \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-plz.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release-plz
name: release-plz

permissions:
pull-requests: write
Expand All @@ -11,7 +11,7 @@ on:

jobs:
release-plz:
name: Release-plz
name: release-plz
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
20 changes: 20 additions & 0 deletions .grit/patterns/cargo_meta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Inject correct cargo metadata into the markdown file

```grit
language toml
`[package]
$props` where {
$filename <: includes "Cargo.toml",
$filename <: not includes or {"language-metavariables", "language-submodules" },
any {
and { $props <: not contains `version`, $props += `version.workspace = true` },
and { $props <: not contains `authors`, $props += `authors.workspace = true` },
and { $props <: not contains `description`, $props += `description.workspace = true` },
and { $props <: not contains `documentation`, $props += `documentation.workspace = true` },
and { $props <: not contains `homepage`, $props += `homepage.workspace = true` },
and { $props <: not contains `license`, $props += `license = "MIT"` },
and { $props <: not contains `publish`, $props += `publish = false` },
}
}
```
42 changes: 21 additions & 21 deletions Cargo.lock

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

7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,10 @@ members = [
"crates/cli_bin",
]
exclude = ["resources", "vendor/web-tree-sitter", "vendor/tree-sitter-facade"]

[workspace.package]
version = "0.1.0"
authors = ["Iuvo AI, Inc.", "Grit Contributors"]
description = "GritQL is a query language for searching, linting, and modifying code."
homepage = "https://docs.grit.io/language/overview"
documentation = "https://docs.grit.io/tutorials/gritql"
6 changes: 6 additions & 0 deletions crates/auth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
name = "marzano-auth"
version = "0.1.0"
edition = "2021"
authors.workspace = true
description.workspace = true
documentation.workspace = true
homepage.workspace = true
license = "MIT"
publish = false

[lints]
rust.unused_crate_dependencies = "warn"
Expand Down
5 changes: 5 additions & 0 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name = "marzano-cli"
version = "0.1.1"
edition = "2021"
authors = ["Grit Developers <[email protected]>"]
description.workspace = true
documentation.workspace = true
homepage.workspace = true
license = "MIT"
publish = false

[lints]
rust.unused_crate_dependencies = "warn"
Expand Down
4 changes: 4 additions & 0 deletions crates/cli_bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ description = "GritQL is a query language for searching, linting, and modifying
homepage = "https://docs.grit.io/"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
authors.workspace = true
documentation.workspace = true
license = "MIT"
publish = false

[dependencies]
anyhow = { version = "1.0.70" }
Expand Down
6 changes: 6 additions & 0 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
name = "marzano-core"
version = "0.2.0"
edition = "2021"
authors.workspace = true
description.workspace = true
documentation.workspace = true
homepage.workspace = true
license = "MIT"
publish = false

[lints]
rust.unused_crate_dependencies = "warn"
Expand Down
6 changes: 6 additions & 0 deletions crates/externals/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
name = "marzano-externals"
version = "0.1.0"
edition = "2021"
authors.workspace = true
description.workspace = true
documentation.workspace = true
homepage.workspace = true
license = "MIT"
publish = false

[lints]
rust.unused_crate_dependencies = "warn"
Expand Down
6 changes: 6 additions & 0 deletions crates/graphql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
name = "marzano-graphql"
version = "0.1.0"
edition = "2021"
authors.workspace = true
description.workspace = true
documentation.workspace = true
homepage.workspace = true
license = "MIT"
publish = false

[lints]
rust.unused_crate_dependencies = "warn"
Expand Down
13 changes: 10 additions & 3 deletions crates/grit-pattern-matcher/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
[package]
name = "grit-pattern-matcher"
description = "Grit pattern definitions and matching logic"
version = "0.1.0"
description = "Pattern definitions and core matching logic for GritQL"
edition = "2021"
keywords = ["gritql", "ast", "query", "language", "pl"]
repository = "https://github.com/getgrit/gritql/tree/main/crates/grit-pattern-matcher"
version.workspace = true
authors.workspace = true
documentation.workspace = true
homepage.workspace = true
license = "MIT"
publish = true

[lints]
rust.unused_crate_dependencies = "warn"
Expand All @@ -11,7 +18,7 @@ rust.unused_crate_dependencies = "warn"
anyhow = { version = "1.0.70" }
elsa = { version = "1.9.0" }
getrandom = { version = "0.2.11", optional = true }
grit-util = { path = "../grit-util" }
grit-util = { path = "../grit-util", version = "0.1.0" }
im = { version = "15.1.0" }
itertools = { version = "0.10.5" }
rand = { version = "0.8.5" }
Expand Down
10 changes: 9 additions & 1 deletion crates/grit-util/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
[package]
name = "grit-util"
version = "0.1.0"
description = "Utility functions for GritQL and associated tools"
edition = "2021"
keywords = ["gritql", "grit", "util"]
repository = "https://github.com/getgrit/gritql/tree/main/crates/grit-util"
version.workspace = true
authors.workspace = true
documentation.workspace = true
homepage.workspace = true
license = "MIT"
publish = true

[lints]
rust.unused_crate_dependencies = "warn"
Expand Down
7 changes: 7 additions & 0 deletions crates/grit-util/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# `grit-util`

This crate contains miscellaneous utility functions and types that are used
throughout the GritQL engine. It is intended to be a catch-all for things that
don't fit neatly into other crates, without taking any dependencies on other `grit` crates.

See the [GritQL homepage](https://docs.grit.io/language/overview) for more information about GritQL.
6 changes: 6 additions & 0 deletions crates/gritcache/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
name = "grit_cache"
version = "0.1.0"
edition = "2021"
authors.workspace = true
description.workspace = true
documentation.workspace = true
homepage.workspace = true
license = "MIT"
publish = false

[lints]
rust.unused_crate_dependencies = "warn"
Expand Down
8 changes: 7 additions & 1 deletion crates/gritmodule/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
[package]
name = "marzano-gritmodule"
version = "0.1.0"
edition = "2021"
version.workspace = true
authors.workspace = true
description.workspace = true
documentation.workspace = true
homepage.workspace = true
license = "MIT"
publish = false

[lints]
rust.unused_crate_dependencies = "warn"
Expand Down
6 changes: 6 additions & 0 deletions crates/language/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
name = "marzano-language"
version = "0.1.0"
edition = "2021"
authors.workspace = true
description.workspace = true
documentation.workspace = true
homepage.workspace = true
license = "MIT"
publish = false

[lints]
rust.unused_crate_dependencies = "warn"
Expand Down
6 changes: 6 additions & 0 deletions crates/lsp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
name = "marzano-lsp"
version = "0.1.0"
edition = "2021"
authors.workspace = true
description.workspace = true
documentation.workspace = true
homepage.workspace = true
license = "MIT"
publish = false

[lints]
rust.unused_crate_dependencies = "warn"
Expand Down
6 changes: 6 additions & 0 deletions crates/marzano_messenger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
name = "marzano_messenger"
version = "0.1.0"
edition = "2021"
authors.workspace = true
description.workspace = true
documentation.workspace = true
homepage.workspace = true
license = "MIT"
publish = false

[lints]
rust.unused_crate_dependencies = "warn"
Expand Down
6 changes: 6 additions & 0 deletions crates/test_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
name = "marzano-test-utils"
version = "0.1.0"
edition = "2021"
authors.workspace = true
description.workspace = true
documentation.workspace = true
homepage.workspace = true
license = "MIT"
publish = false

[lints]
rust.unused_crate_dependencies = "warn"
Expand Down
6 changes: 6 additions & 0 deletions crates/util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
name = "marzano-util"
version = "0.1.0"
edition = "2021"
authors.workspace = true
description.workspace = true
documentation.workspace = true
homepage.workspace = true
license = "MIT"
publish = false

[lints]
rust.unused_crate_dependencies = "warn"
Expand Down
10 changes: 8 additions & 2 deletions crates/wasm-bindings/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
[package]
name = "marzano-wasm-bindings"
version = "0.1.0"
name = "grit-wasm-bindings"
description = "WASM bindings for GritQL"
edition = "2021"
publish = false
license = "MIT"
version.workspace = true
authors.workspace = true
documentation.workspace = true
homepage.workspace = true

[lints]
rust.unused_crate_dependencies = "warn"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"scripts": {
"test:wasm": "cd wasm-bindings && wasm-pack test --node",
"test:watch": "nodemon --ext rs --exec \"cargo test --exclude marzano-wasm-bindings\"",
"test:watch": "nodemon --ext rs --exec \"cargo test --exclude grit-wasm-bindings\"",
"lint:clippy": "cargo clippy -- -D warnings"
}
}

0 comments on commit 6e29510

Please sign in to comment.