aboutsummaryrefslogtreecommitdiff
path: root/development/tools/cargo-workspace2/docs/ws2ql.md
blob: a255a650bb50d80f7e2d794a374e548fc5a40ecd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# ws2 query language

The `cargo-ws2` query language (`ws2ql`) allows users to specify a
set of inputs, and an operation to execute on it.

## Basic rules

* Inside `[]` are sets (meaning items de-dup), space separated
* IF `[]` contains a `/` anywhere _but_ the beginning AND end,
  query becomes a path glob
* IF `[]` contains `/` at start AND end, query becomes a regex
* An operation is parsed in the order of the fields in it's struct
  (so publish order is `type mod devel`, etc)
* Inside `{}` you can create dependency maps
  * `{ foo < }` represents all crates that depend on `foo`
  * `{ foo < bar &< }` represents all crates that depend on `foo` AND `bar`
  * `{ foo < bar |< }` represents all crates that depend on `foo` OR `bar`
  * `{ foo < bar &!< }` represents all crates that depend on `foo` AND NOT `bar`