Skip to content

Commit

Permalink
Merge pull request #197 from azriel91/feature/182/item-interactions-a…
Browse files Browse the repository at this point in the history
…nd-locations
  • Loading branch information
azriel91 authored Oct 27, 2024
2 parents a226b8f + 16a4669 commit 99e7f0d
Show file tree
Hide file tree
Showing 249 changed files with 9,980 additions and 1,719 deletions.
8 changes: 8 additions & 0 deletions .cargo/audit.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[advisories]
ignore = [
# `proc-macro-error` is Unmaintained.
#
# Transitive dependency of `syn_derive`.
# Pending https://github.com/Kyuuhachi/syn_derive/issues/4.
"RUSTSEC-2024-0370",
]
38 changes: 38 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
[alias]
clippy_cli = [
"clippy",
"--workspace",
"--features",
"cli error_reporting output_progress item_interactions item_state_example",
"--fix",
"--exclude",
"peace_rt_model_web",
"--",
"-D",
"warnings",
]

# Nextest for different feature combinations
test_0 = ["nextest", "run", "--workspace", "--no-default-features"]
test_1 = ["nextest", "run", "--workspace", "--all-features"]
Expand All @@ -10,5 +23,30 @@ coverage_1 = ["llvm-cov", "--no-report", "nextest", "--workspace", "--all-featur
coverage_merge = 'llvm-cov report --lcov --output-path ./target/coverage/lcov.info'
coverage_open = 'llvm-cov report --open --output-dir ./target/coverage'

# Build envman example
# cargo leptos build --project "envman" --features "item_interactions item_state_example" --bin-features "cli" --release
envman_build_debug = [
"leptos",
"build",
"--project",
"envman",
"--features",
"item_interactions item_state_example",
"--bin-features",
"cli",
]

envman_build_release = [
"leptos",
"build",
"--project",
"envman",
"--features",
"item_interactions item_state_example",
"--bin-features",
"cli",
"--release",
]

[env]
CLICOLOR_FORCE = "1"
16 changes: 5 additions & 11 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@ jobs:
- name: 'Install `wasm-pack`'
uses: jetli/[email protected]
with:
version: 'v0.11.1'
version: 'v0.13.0'

- name: mdbook Cache
id: mdbook_cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cargo/bin/mdbook
key: ${{ runner.os }}-mdbook

- name: mdbook-graphviz Cache
id: mdbook_graphviz_cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cargo/bin/mdbook-graphviz
key: ${{ runner.os }}-mdbook-graphviz

- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
uses: ts-graphviz/setup-graphviz@v2

- run: cargo install mdbook-graphviz
if: steps.mdbook_graphviz_cache.outputs.cache-hit != 'true'
Expand All @@ -56,12 +56,6 @@ jobs:
--features 'error_reporting'
done
# Build and publish book
# - name: Install `mdbook`
# uses: peaceiris/actions-mdbook@v1
# with:
# mdbook-version: latest

# use custom version of mdbook for now
- name: Install `mdbook`
run: cargo install mdbook --git https://github.com/azriel91/mdBook.git --branch improvement/code-blocks
Expand All @@ -77,7 +71,7 @@ jobs:

- name: Publish to `gh-pages`
if: ${{ github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/book
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: bp3d-actions/audit-check@9c23bd47e5e7b15b824739e0862cb878a52cc211
- uses: actions-rust-lang/audit@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -28,7 +28,7 @@ jobs:

- name: cargo-about cache
id: cargo-about-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cargo/bin/cargo-about
key: cargo-about-${{ runner.os }}
Expand Down Expand Up @@ -83,12 +83,7 @@ jobs:
- name: 'Run clippy'
# we cannot use `--all-features` because `envman` has features that are mutually exclusive.
run: |
cargo clippy \
--workspace \
--features "cli error_reporting output_progress" \
--fix \
--exclude peace_rt_model_web \
-- -D warnings
cargo clippy_cli
# Ideally we'd also run it for WASM, but:
#
Expand Down Expand Up @@ -139,9 +134,10 @@ jobs:
run: du -sh target/coverage target/llvm-cov-target

- name: Upload to codecov.io
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./target/coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }}

build_and_test_linux:
name: Build and Test (Linux)
Expand Down Expand Up @@ -203,7 +199,7 @@ jobs:

- name: cargo-leptos cache
id: cargo-leptos-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cargo/bin/cargo-leptos
key: cargo-leptos-${{ runner.os }}
Expand All @@ -213,7 +209,7 @@ jobs:
run: cargo install --git https://github.com/leptos-rs/cargo-leptos.git --locked cargo-leptos

- name: 'Example: envman (leptos)'
run: cargo leptos build --project "envman" --bin-features "cli" -v
run: cargo envman_build_debug

# When updating this, also update book.yml
- name: 'Example: download (WASM)'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: bp3d-actions/audit-check@9c23bd47e5e7b15b824739e0862cb878a52cc211
- uses: actions-rust-lang/audit@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:

- name: cargo-release Cache
id: cargo_release_cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cargo/bin/cargo-release
key: ${{ runner.os }}-cargo-release
Expand Down
82 changes: 52 additions & 30 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ peace_diff = { workspace = true }
peace_flow_model = { workspace = true }
peace_fmt = { workspace = true }
peace_params = { workspace = true }
peace_item_model = { workspace = true, optional = true }
peace_resource_rt = { workspace = true }
peace_rt = { workspace = true }
peace_rt_model = { workspace = true }
Expand Down Expand Up @@ -71,9 +72,26 @@ output_progress = [
"peace_cli?/output_progress",
"peace_cmd_rt/output_progress",
"peace_cfg/output_progress",
"peace_item_model/output_progress",
"peace_rt/output_progress",
"peace_rt_model/output_progress",
"peace_webi?/output_progress",
"peace_cmd_model/output_progress",
]
item_interactions = [
"dep:peace_item_model",
"peace_cfg/item_interactions",
"peace_webi?/item_interactions",
"peace_webi_components?/item_interactions",
]
item_state_example = [
"peace_cfg/item_state_example",
"peace_cmd/item_state_example",
"peace_data/item_state_example",
"peace_params/item_state_example",
"peace_rt_model/item_state_example",
"peace_webi?/item_state_example",
"peace_webi_components?/item_state_example",
]
ssr = [
"peace_webi?/ssr",
Expand Down Expand Up @@ -118,6 +136,7 @@ peace_flow_model = { path = "crate/flow_model", version = "0.0.13" }
peace_fmt = { path = "crate/fmt", version = "0.0.13" }
peace_params = { path = "crate/params", version = "0.0.13" }
peace_params_derive = { path = "crate/params_derive", version = "0.0.13" }
peace_item_model = { path = "crate/item_model", version = "0.0.13" }
peace_resource_rt = { path = "crate/resource_rt", version = "0.0.13" }
peace_rt = { path = "crate/rt", version = "0.0.13" }
peace_rt_model = { path = "crate/rt_model", version = "0.0.13" }
Expand All @@ -144,55 +163,58 @@ peace_item_tar_x = { path = "items/tar_x", version = "0.0.13" }
#
# This does not include examples' dependencies, because we want it to be easy for
# developers to see the dependencies to create an automation tool.
async-trait = "0.1.77"
axum = "0.7.4"
base64 = "0.22.0"
bytes = "1.5.0"
async-trait = "0.1.81"
axum = "0.7.5"
base64 = "0.22.1"
bytes = "1.7.1"
cfg-if = "1.0.0"
chrono = { version = "0.4.35", default-features = false, features = ["clock", "serde"] }
chrono = { version = "0.4.38", default-features = false, features = ["clock", "serde"] }
console = "0.15.8"
derivative = "2.2.0"
diff-struct = "0.5.3"
downcast-rs = "1.2.0"
dot_ix = { version = "0.5.0", default-features = false }
dot_ix = { version = "0.8.1", default-features = false }
dot_ix_model = "0.8.1"
downcast-rs = "1.2.1"
dyn-clone = "1.0.17"
enser = "0.1.4"
erased-serde = "0.4.3"
fn_graph = { version = "0.13.2", features = ["async", "graph_info", "interruptible", "resman"] }
erased-serde = "0.4.5"
fn_graph = { version = "0.13.3", features = ["async", "graph_info", "interruptible", "resman"] }
futures = "0.3.30"
heck = "0.4.1"
indexmap = "2.2.5"
gloo-timers = "0.3.0"
heck = "0.5.0"
indexmap = "2.5.0"
indicatif = "0.17.8"
interruptible = "0.2.2"
interruptible = "0.2.4"
leptos = { version = "0.6" }
leptos_axum = "0.6"
leptos_meta = { version = "0.6" }
leptos_router = { version = "0.6" }
libc = "0.2.153"
libc = "0.2.158"
miette = "7.2.0"
own = "0.1.0"
own = "0.1.3"
pretty_assertions = "1.4.0"
proc-macro2 = "1.0.78"
quote = "1.0.35"
proc-macro2 = "1.0.86"
quote = "1.0.37"
raw_tty = "0.1.0"
reqwest = "0.11.25"
resman = "0.17.0"
serde = "1.0.197"
reqwest = "0.12.7"
resman = "0.17.2"
serde = "1.0.209"
serde-wasm-bindgen = "0.6.5"
serde_json = "1.0.114"
serde_yaml = "0.9.32"
syn = "2.0.52"
tar = "0.4.40"
tempfile = "3.10.1"
thiserror = "1.0.57"
tokio = "1.36"
tokio-util = "0.7.10"
serde_json = "1.0.127"
serde_yaml = "0.9.34"
smallvec = "1.13.2"
syn = "2.0.77"
tar = "0.4.41"
tempfile = "3.12.0"
thiserror = "1.0.63"
tokio = "1.40"
tokio-util = "0.7.11"
tower-http = "0.5.2"
tynm = "0.1.10"
type_reg = { version = "0.7.0", features = ["debug", "untagged", "ordered"] }
url = "2.5.0"
wasm-bindgen = "0.2.92"
web-sys = "0.3.69"
url = "2.5.2"
wasm-bindgen = "0.2.95"
web-sys = "0.3.70"

[workspace.lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] }
9 changes: 8 additions & 1 deletion crate/cfg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,18 @@ enser = { workspace = true }
peace_core = { workspace = true }
peace_data = { workspace = true }
peace_params = { workspace = true }
peace_item_model = { workspace = true, optional = true }
peace_resource_rt = { workspace = true }
serde = { workspace = true, features = ["derive"] }
tynm = { workspace = true }

[features]
default = []
error_reporting = ["peace_params/error_reporting"]
output_progress = ["peace_core/output_progress"]
output_progress = [
"dep:peace_item_model",
"peace_core/output_progress",
"peace_item_model/output_progress",
]
item_interactions = ["dep:peace_item_model"]
item_state_example = []
4 changes: 2 additions & 2 deletions crate/cfg/src/accessors/stored.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ where
}
}

impl<'borrow, T> DataAccess for Stored<'borrow, T> {
impl<T> DataAccess for Stored<'_, T> {
fn borrows() -> TypeIds
where
Self: Sized,
Expand All @@ -78,7 +78,7 @@ impl<'borrow, T> DataAccess for Stored<'borrow, T> {
}
}

impl<'borrow, T> DataAccessDyn for Stored<'borrow, T> {
impl<T> DataAccessDyn for Stored<'_, T> {
fn borrows(&self) -> TypeIds
where
Self: Sized,
Expand Down
Loading

0 comments on commit 99e7f0d

Please sign in to comment.