Skip to content

Commit

Permalink
Rename salsa-2022 to salsa
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrobbel committed Jun 18, 2024
1 parent db75ae0 commit c785111
Show file tree
Hide file tree
Showing 174 changed files with 98 additions and 67 deletions.
32 changes: 32 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[package]
name = "salsa"
version = "0.18.0"
authors = ["Salsa developers"]
edition = "2021"
license = "Apache-2.0 OR MIT"
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-utils = { version = "0.8", default-features = false }
log = "0.4.5"
parking_lot = "0.12.1"
smallvec = "1.0.0"
salsa-macros = { path = "components/salsa-macros" }

[dev-dependencies]
expect-test = "1.4.0"
parking_lot = "0.12.1"
test-log = "0.2.11"
env_logger = "*"
trybuild = "1.0"
rustversion = "1.0"

[workspace]
members = ["components/salsa-macros"]
19 changes: 0 additions & 19 deletions components/salsa-2022/Cargo.toml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
[package]
name = "salsa-2022-macros"
version = "0.1.0"
name = "salsa-macros"
version = "0.18.0"
authors = ["Salsa developers"]
edition = "2021"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/salsa-rs/salsa"
description = "Procedural macros for the salsa crate"

[lib]
proc-macro = true
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 0 additions & 15 deletions salsa-2022-tests/Cargo.toml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 8 additions & 8 deletions components/salsa-2022/src/lib.rs → src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ pub use self::routes::IngredientIndex;
pub use self::runtime::Runtime;
pub use self::storage::DbWithJar;
pub use self::storage::Storage;
pub use salsa_2022_macros::accumulator;
pub use salsa_2022_macros::db;
pub use salsa_2022_macros::input;
pub use salsa_2022_macros::interned;
pub use salsa_2022_macros::jar;
pub use salsa_2022_macros::tracked;
pub use salsa_2022_macros::DebugWithDb;
pub use salsa_2022_macros::Update;
pub use salsa_macros::accumulator;
pub use salsa_macros::db;
pub use salsa_macros::input;
pub use salsa_macros::interned;
pub use salsa_macros::jar;
pub use salsa_macros::tracked;
pub use salsa_macros::DebugWithDb;
pub use salsa_macros::Update;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
//! Then mutate the values so that the tracked function re-executes.
//! Check that we accumulate the appropriate, new values.
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};

use expect_test::expect;
use test_log::test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
//! `accumulated` in a tracked function to get better
//! reuse.
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};

use expect_test::expect;
use test_log::test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
//! Tests behavior when a query's only inputs
//! are the accumulated values from another query.
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};

use expect_test::expect;
use test_log::test;
Expand Down
3 changes: 2 additions & 1 deletion salsa-2022-tests/tests/accumulate.rs → tests/accumulate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
//!
//! * entities not created in a revision are deleted, as is any memoized data keyed on them.
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};

use expect_test::expect;
use test_log::test;
Expand Down
5 changes: 4 additions & 1 deletion salsa-2022-tests/src/lib.rs → tests/common/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/// Utility for tests that lets us log when notable events happen.
//! Utility for tests that lets us log when notable events happen.
#![allow(dead_code)]

#[derive(Default)]
pub struct Logger {
logs: std::sync::Mutex<Vec<String>>,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ error: `singleton` option not allowed here
33 | #[salsa::accumulator(singleton)]
| ^^^^^^^^^

error[E0432]: unresolved import `salsa_2022_tests`
--> tests/compile-fail/singleton_only_for_input.rs:5:5
|
5 | use salsa_2022_tests::{HasLogger, Logger};
| ^^^^^^^^^^^^^^^^ use of undeclared crate or module `salsa_2022_tests`

error[E0412]: cannot find type `MyTracked` in this scope
--> tests/compile-fail/singleton_only_for_input.rs:10:21
|
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ error[E0277]: the trait bound `MyInput: TrackedStructInDb<dyn Db>` is not satisf
|
= help: the trait `TrackedStructInDb<DB>` is implemented for `MyTracked<'db>`
note: required by a bound in `function::specify::<impl FunctionIngredient<C>>::specify_and_record`
--> $WORKSPACE/components/salsa-2022/src/function/specify.rs
--> src/function/specify.rs
|
| pub fn specify_and_record<'db>(&'db self, db: &'db DynDb<'db, C>, key: Id, value: C::Value<'db>)
| ------------------ required by a bound in this associated function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ error[E0277]: the trait bound `MyInterned<'_>: TrackedStructInDb<dyn Db>` is not
|
= help: the trait `TrackedStructInDb<DB>` is implemented for `MyTracked<'db>`
note: required by a bound in `function::specify::<impl FunctionIngredient<C>>::specify_and_record`
--> $WORKSPACE/components/salsa-2022/src/function/specify.rs
--> src/function/specify.rs
|
| pub fn specify_and_record<'db>(&'db self, db: &'db DynDb<'db, C>, key: Id, value: C::Value<'db>)
| ------------------ required by a bound in this associated function
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
//! * when we delete memoized data, also delete outputs from that data
use salsa::DebugWithDb;
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};

use expect_test::expect;
use test_log::test;
Expand Down
3 changes: 2 additions & 1 deletion salsa-2022-tests/tests/deletion.rs → tests/deletion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
//! * entities not created in a revision are deleted, as is any memoized data keyed on them.
use salsa::DebugWithDb;
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};

use expect_test::expect;
use test_log::test;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//! Test that a `tracked` fn on a `salsa::input`
//! compiles and executes successfully.
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};

use expect_test::expect;
use test_log::test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
//! compiles and executes successfully.
#![allow(dead_code)]

use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};

use expect_test::expect;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
//! compiles and executes successfully.
#![allow(dead_code)]

use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};

use expect_test::expect;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//! Test that a `tracked` fn on a `salsa::input`
//! compiles and executes successfully.
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};

use expect_test::expect;
use test_log::test;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//! Test that a `tracked` fn on a `salsa::input`
//! compiles and executes successfully.
use salsa::DebugWithDb;
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};

use expect_test::expect;
use test_log::test;
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion salsa-2022-tests/tests/lru.rs → tests/lru.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ use std::sync::{
};

use salsa::Database;
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};
use test_log::test;

#[salsa::jar(db = Db)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//! Test that a setting a field on a `#[salsa::input]`
//! overwrites and returns the old value.
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};

use test_log::test;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ use std::cell::Cell;

use expect_test::expect;
use salsa::DebugWithDb;
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};
use test_log::test;

thread_local! {
Expand Down
3 changes: 2 additions & 1 deletion salsa-2022-tests/tests/singleton.rs → tests/singleton.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
use expect_test::expect;
use salsa::DebugWithDb;
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};

use test_log::test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
use expect_test::expect;
use salsa::DebugWithDb;
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};
use test_log::test;

#[salsa::jar(db = Db)]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
use expect_test::expect;
use salsa::DebugWithDb;
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};
use test_log::test;

#[salsa::jar(db = Db)]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
//! compiles and executes successfully.
use expect_test::expect;
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};
use test_log::test;

#[salsa::jar(db = Db)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use expect_test::expect;
use salsa::{Database as SalsaDatabase, DebugWithDb};
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};

#[salsa::jar(db = Db)]
struct Jar(MyInput, MyTracked<'_>, tracked_fn, tracked_fn_extra);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//! Test that tracked structs with lifetimes not named `'db`
//! compile successfully.
use salsa_2022_tests::{HasLogger, Logger};
mod common;
use common::{HasLogger, Logger};

use test_log::test;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c785111

Please sign in to comment.