diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e87fb37..e8ca0de 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,15 +3,15 @@ name: Test on: push: branches: - - master - - staging - - trying + - master + - staging + - trying pull_request: paths: - - '**.rs' - - '**/Cargo.*' - - '.github/workflows/**.yml' - - 'salsa-2022-tests/tests/compile-fail/**.stderr' + - "**.rs" + - "**/Cargo.*" + - ".github/workflows/**.yml" + - "tests/compile-fail/**.stderr" merge_group: jobs: @@ -20,52 +20,52 @@ jobs: strategy: matrix: rust: - - stable - - beta + - stable + - beta experimental: - - false + - false include: - - rust: nightly - experimental: true + - rust: nightly + experimental: true continue-on-error: ${{ matrix.experimental }} runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - components: rustfmt, clippy - default: true - - name: Format - uses: actions-rs/cargo@v1 - with: - command: fmt - args: -- --check - - name: Clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-features --all-targets --all - - name: Test - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features --all-targets --all - - name: Test docs - uses: actions-rs/cargo@v1 - with: - command: test - args: --doc - - name: Check (without default features) - uses: actions-rs/cargo@v1 - with: - command: check - args: --no-default-features + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + components: rustfmt, clippy + default: true + - name: Format + uses: actions-rs/cargo@v1 + with: + command: fmt + args: -- --check + - name: Clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --all-features --all-targets --workspace + - name: Test + uses: actions-rs/cargo@v1 + with: + command: test + args: --all-features --all-targets --workspace + - name: Test docs + uses: actions-rs/cargo@v1 + with: + command: test + args: --doc + - name: Check (without default features) + uses: actions-rs/cargo@v1 + with: + command: check + args: --no-default-features miri: - name: "Miri" + name: Miri runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -75,4 +75,7 @@ jobs: rustup override set nightly cargo miri setup - name: Test with Miri - run: cargo miri test --no-fail-fast -p salsa-2022 -p salsa-2022-tests -p calc -p lazy-input + run: cargo miri test --no-fail-fast + - name: Run examples with Miri + run: | + cargo miri run --example calc diff --git a/Cargo.toml b/Cargo.toml index ee39217..f1a2d7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,25 +8,29 @@ repository = "https://github.com/salsa-rs/salsa" description = "A generic framework for on-demand, incrementalized computation (experimental)" [dependencies] -crossbeam = "0.8.1" -dashmap = "5.3.4" -rustc-hash = "1.1.0" -indexmap = "2" -hashlink = "0.8.0" arc-swap = "1.6.0" +crossbeam = "0.8.1" crossbeam-utils = { version = "0.8", default-features = false } +dashmap = "5.3.4" +hashlink = "0.8.0" +indexmap = "2" log = "0.4.5" parking_lot = "0.12.1" -smallvec = "1.0.0" +rustc-hash = "1.1.0" salsa-macros = { path = "components/salsa-macros" } +smallvec = "1.0.0" [dev-dependencies] -expect-test = "1.4.0" -parking_lot = "0.12.1" -test-log = "0.2.11" +derive-new = "0.5.9" env_logger = "*" -trybuild = "1.0" +expect-test = "1.4.0" +eyre = "0.6.8" +notify-debouncer-mini = "0.2.1" +ordered-float = "3.0" +parking_lot = "0.12.1" rustversion = "1.0" +test-log = "0.2.11" +trybuild = "1.0" [workspace] members = ["components/salsa-macros"] diff --git a/examples/calc/Cargo.toml b/examples/calc/Cargo.toml deleted file mode 100644 index 6301adc..0000000 --- a/examples/calc/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "calc" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -derive-new = "0.5.9" -salsa = { path = "../../components/salsa-2022", package = "salsa-2022" } -ordered-float = "3.0" -test-log = { version = "0.2.15", features = ["trace"] } - -[dev-dependencies] -expect-test = "1.4.0" diff --git a/examples/calc/src/compile.rs b/examples/calc/compile.rs similarity index 100% rename from examples/calc/src/compile.rs rename to examples/calc/compile.rs diff --git a/examples/calc/src/db.rs b/examples/calc/db.rs similarity index 100% rename from examples/calc/src/db.rs rename to examples/calc/db.rs diff --git a/examples/calc/src/ir.rs b/examples/calc/ir.rs similarity index 100% rename from examples/calc/src/ir.rs rename to examples/calc/ir.rs diff --git a/examples/calc/src/main.rs b/examples/calc/main.rs similarity index 100% rename from examples/calc/src/main.rs rename to examples/calc/main.rs diff --git a/examples/calc/src/parser.rs b/examples/calc/parser.rs similarity index 100% rename from examples/calc/src/parser.rs rename to examples/calc/parser.rs diff --git a/examples/calc/src/type_check.rs b/examples/calc/type_check.rs similarity index 100% rename from examples/calc/src/type_check.rs rename to examples/calc/type_check.rs diff --git a/examples/lazy-input/Cargo.toml b/examples/lazy-input/Cargo.toml deleted file mode 100644 index bf77815..0000000 --- a/examples/lazy-input/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "lazy-input" -version = "0.1.0" -edition = "2021" - -[dependencies] -crossbeam-channel = "0.5.6" -dashmap = "5.4.0" -eyre = "0.6.8" -notify-debouncer-mini = "0.2.1" -salsa = { path = "../../components/salsa-2022", package = "salsa-2022" } - -[dev-dependencies] -expect-test = "1.4.0" diff --git a/examples/lazy-input/src/main.rs b/examples/lazy-input/main.rs similarity index 99% rename from examples/lazy-input/src/main.rs rename to examples/lazy-input/main.rs index d31c253..ff305d5 100644 --- a/examples/lazy-input/src/main.rs +++ b/examples/lazy-input/main.rs @@ -1,6 +1,6 @@ use std::{path::PathBuf, sync::Mutex, time::Duration}; -use crossbeam_channel::{unbounded, Sender}; +use crossbeam::channel::{unbounded, Sender}; use dashmap::{mapref::entry::Entry, DashMap}; use eyre::{eyre, Context, Report, Result}; use notify_debouncer_mini::{