Commit graph

1352 commits

Author SHA1 Message Date
Niko Matsakis
b050bd874a remove Key from Fn configuration
Just use salsa::Id for the most part.
2024-05-24 07:16:50 -04:00
Niko Matsakis
6e2647fa50 just take salsa::Id instead of id structs 2024-05-24 07:16:50 -04:00
Niko Matsakis
cb1a2bb75b Revert "WIP permit 'db on tracked struct definitions (opt)"
This reverts commit 43b1b8ef3f98213279b9d0768847603299162f1f.
2024-05-24 07:16:50 -04:00
Niko Matsakis
b6311d8102 WIP permit 'db on tracked struct definitions (opt) 2024-05-24 07:16:50 -04:00
Niko Matsakis
5ce5e3c374 track and assert struct ingredient indices
We need a cheap way to compute field indices.
2024-05-24 07:16:50 -04:00
Niko Matsakis
79d24e0ad7 allow (but don't test) lifetime parameters 2024-05-24 07:16:50 -04:00
Niko Matsakis
ea1d452143 create a struct_map that encapsulates access
The internal API is now based around providing
references to the `TrackedStructValue`.

Documenting the invariants led to one interesting
case, which is that we sometimes verify a tracked
struct as not having changed (and even create
`&`-ref to it!) but then re-execute the function
around it.

We now guarantee that, in this case, the data
does not change, even if it has leaked values.
This is required to ensure soundness.
Add a test case about it.
2024-05-24 07:16:47 -04:00
Niko Matsakis
20cb307301 give trait more info about lifetime relationships
In particular, the ingredient and the database
have the same lifetime.
This will be useful later for safety conditions.
2024-05-24 07:15:40 -04:00
Niko Matsakis
a32078153b separate marking the outputs as verified
There are 3 call-sites to this function:

* One of them has already marked the outputs
* One of them has no outputs
* The third does need to mark the outputs
2024-05-24 07:15:40 -04:00
Niko Matsakis
e24ace24eb return &TrackedStructValue<C> from new_struct
This is a step towards the goal of keep a pointer
in the structs themselves.
2024-05-24 07:15:40 -04:00
Niko Matsakis
4533cd9e4b adopt the Salsa 3.0 Update` trait
Right now, this doesn't change much except the
behavior in the event that `Eq` is not properly
implemented. In the future, it will enable
the use of references and slices and things.
2024-05-24 07:15:40 -04:00
Niko Matsakis
225a81ae8f update docs to mention durability 2024-05-24 07:15:40 -04:00
Niko Matsakis
05b4e3ebdc
Merge pull request #419 from kmicklas/mixed-cycle-fallback-docs
Remove inaccurate note about mixed cycles failing to recover
2024-04-24 14:26:41 +00:00
Niko Matsakis
dcf2b3ed55
Merge pull request #488 from salsa-rs/nikomatsakis-patch-1
remove stray eprintln
2024-04-12 08:58:26 +00:00
Niko Matsakis
90597b18ab
remove stray eprintln 2024-04-12 04:57:41 -04:00
Niko Matsakis
f5aec4abef
Merge pull request #486 from nikomatsakis/clippy-lints
allow various clippy lint groups
2024-04-05 09:48:29 +00:00
Niko Matsakis
82b672df3b allow various clippy lint groups 2024-04-05 05:48:11 -04:00
Niko Matsakis
3257fa95a7
Merge pull request #485 from nikomatsakis/issue-484
update tracked struct `created_at` when validated
2024-04-05 09:21:09 +00:00
Niko Matsakis
b12ff3297c update tracked struct created_at when validated
Fixes #484
2024-04-05 05:16:50 -04:00
Niko Matsakis
f4a8ed650f update tracked struct created_at when validated
Fixes #484
2024-04-05 05:15:59 -04:00
Niko Matsakis
45fd94120b
Merge pull request #483 from nikomatsakis/salsa-2022-spans
improve spans for getters, constructors
2024-04-04 10:34:23 +00:00
Niko Matsakis
5d6f883b18 improve spans for inputs 2024-04-04 06:24:07 -04:00
Niko Matsakis
e2f6437890 add tests that show improved spans 2024-04-04 06:21:33 -04:00
Niko Matsakis
1acbf2b0d4 improve spans for getters, constructors
This helps the IDE support.
2024-04-04 06:14:31 -04:00
Niko Matsakis
bdf7d9ca50
Merge pull request #482 from nikomatsakis/debug-with-db-improvements
[breaking-salsa-2022] Debug with db: ignore deps, support customization
2024-04-04 09:26:06 +00:00
Niko Matsakis
ce2f78290a add FIXME 2024-04-03 06:33:17 -04:00
Niko Matsakis
9dfa84b693 improve doc comments 2024-04-03 06:30:31 -04:00
Niko Matsakis
fd15c3a600 support customizing the DebugWithDb impl 2024-04-03 06:23:43 -04:00
Niko Matsakis
389aa66bcf print all fields in debug() but ignore deps
In a previous PR we added the `include_all_fields`
parameter to `DebugWithDb` to allow it to
not create spurious dependencies.

This PR takes a different approach: we simply
ignore the dependencies created during debug
operations. This is risky as it can create
incorrect dependencies, but it is way more
convenient and seems like what users probably
want.

It also means that `DebugWithDb` has a simpler
signature that matches the `Debug` trait again,
which seems good to me.
2024-04-03 05:59:11 -04:00
Niko Matsakis
b5aa4294bd
Merge pull request #481 from nikomatsakis/struct-field-ingredients
Struct field ingredients
2024-04-02 22:06:51 +00:00
Niko Matsakis
8772961573 clippy, you are truly righteous and exacting 2024-04-02 07:05:17 -04:00
Niko Matsakis
6eb9cb0d1b complete comment 2024-04-02 06:52:38 -04:00
Niko Matsakis
afd9b72203 pacify the merciless clippy 2024-04-02 06:51:39 -04:00
Niko Matsakis
e81b22315b driveby: fix use of indexmap remove
We do care about the order of things in this
set, in general, so use `shift_remove`.
2024-04-02 06:30:53 -04:00
Niko Matsakis
39321ed920 fix clippy warnings 2024-04-02 06:29:44 -04:00
Niko Matsakis
9a0a6518e7
Merge pull request #474 from Chronostasys/master
fix: wrong condvar usage
2024-04-02 10:15:49 +00:00
Niko Matsakis
9deaf3e149
Update components/salsa-2022/src/storage.rs 2024-04-02 06:15:43 -04:00
Niko Matsakis
3a15db7f36 book chapter 2024-04-02 06:08:55 -04:00
Niko Matsakis
54b33c335a create tracked field-ingredients 2024-04-02 06:08:55 -04:00
Niko Matsakis
796dc004f2 remove "id" fields from interned table
First step towards the new tracked struct design.

SUBTLE: This is actually broken if the `#[id]`
fields have a broken hash. We'll fix that in the
next commit and add a test.
2024-04-02 06:08:33 -04:00
Mona Lisa
998bcf606a chore: fmt 2024-03-15 23:01:30 +08:00
Mona Lisa
864344addb fix: wrong condvar usage 2024-03-15 22:44:09 +08:00
Niko Matsakis
0543972429 extract transmute_lifetime into plumbing module 2024-03-14 05:44:15 -04:00
Niko Matsakis
4142ebca97 remove unnecessary Option 2024-03-13 05:37:53 -04:00
Niko Matsakis
e909ca5c97 add a comment clarifying 2024-03-12 06:30:54 -04:00
Niko Matsakis
4151b09d3c
Merge pull request #443 from Veykril/self-span
Preserve span of receiver for query trait functions
2024-03-11 09:58:15 +00:00
Niko Matsakis
c38077fb6f
Merge pull request #470 from nodir-t/master
Remove `Implementing the Default trait` book section
2024-03-11 09:57:33 +00:00
Niko Matsakis
4a13020e61
Merge pull request #464 from DropDemBits/miri-ci
Add miri to CI
2024-03-11 09:57:07 +00:00
Nodir Turakulov
eeac4f8d33
Implementing the Default trait 2024-01-08 18:25:30 -08:00
DropDemBits
407d6bcaa7
Bump arc-swap to 1.6.0
1.6.0 fixes some UB in previous versions of `arc-swap`.
2023-11-11 00:42:47 -05:00