Niko Matsakis
e1920bdda6
require databases and ingredients to be static
2024-07-06 08:15:27 -04:00
Niko Matsakis
a1bf3a613f
Merge pull request #507 from mbrobbel/remove-bors-update-ci
...
Book / Book (push) Has been cancelled
Test / Test (false, beta) (push) Has been cancelled
Test / Test (false, stable) (push) Has been cancelled
Test / Test (true, nightly) (push) Has been cancelled
Test / Miri (push) Has been cancelled
Book / Deploy (push) Has been cancelled
Remove `bors.toml` and update GitHub Actions
2024-06-23 10:11:23 +00:00
Niko Matsakis
4eaa4efdc5
Merge pull request #505 from mbrobbel/issue-504-deps
...
Remove some unused dependencies
2024-06-23 10:06:10 +00:00
Niko Matsakis
091421b839
Merge pull request #510 from Skepfyr/update-option
...
Implement Update for Option<T>
2024-06-23 10:03:00 +00:00
Jack Rickard
db4c0de45c
Implement Update for Option<T>
2024-06-21 14:37:12 +01:00
Matthijs Brobbel
396c4a4073
Also remove env_logger
2024-06-20 17:03:02 +02:00
Matthijs Brobbel
70976c2ea3
Remove bors.toml
and update GitHub Actions
2024-06-19 22:31:02 +02:00
Niko Matsakis
f706aa2d32
Merge pull request #502 from nikomatsakis/update-sets-and-maps
...
Book / Book (push) Has been cancelled
Test / Test (false, beta) (push) Has been cancelled
Test / Test (false, stable) (push) Has been cancelled
Test / Test (true, nightly) (push) Has been cancelled
Test / Miri (push) Has been cancelled
Book / Deploy (push) Has been cancelled
implement Update trait for sets/maps
2024-06-19 10:08:14 +00:00
Niko Matsakis
7c36154b36
drive by fix for some clippy warnings
2024-06-19 05:59:58 -04:00
Niko Matsakis
2abdd3f2d5
implement Update trait for sets/maps
2024-06-19 05:59:58 -04:00
Matthijs Brobbel
38070130a8
Remove some unused dependencies
2024-06-19 11:55:18 +02:00
Niko Matsakis
38a44eef87
Merge pull request #501 from mbrobbel/remove-old-salsa
...
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Test / Test (false, beta) (push) Waiting to run
Test / Test (false, stable) (push) Waiting to run
Test / Test (true, nightly) (push) Waiting to run
Test / Miri (push) Waiting to run
Remove the old Salsa, rename `salsa-2022` crate to `salsa`
2024-06-19 09:45:11 +00:00
Matthijs Brobbel
d65914b9ad
Merge branch 'master' into remove-old-salsa
2024-06-18 13:00:17 +02:00
Niko Matsakis
2c7cda5a8d
Merge pull request #499 from camelid/input-mut
...
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Test / Test (false, beta) (push) Waiting to run
Test / Test (false, stable) (push) Waiting to run
Test / Test (true, nightly) (push) Waiting to run
Test / Miri (push) Waiting to run
book: Creating inputs no longer requires `&mut dyn Db`
2024-06-18 10:52:14 +00:00
Matthijs Brobbel
d0e9b79e6a
Remove references to old selection example
2024-06-18 10:39:26 +02:00
Matthijs Brobbel
a0d7b0ee55
Fix book deployment
2024-06-18 10:35:36 +02:00
Matthijs Brobbel
0f2d5a516c
More book updates and a compile fail test fix
2024-06-18 10:03:53 +02:00
Matthijs Brobbel
b3838b1ca7
Update book
2024-06-18 09:59:17 +02:00
Matthijs Brobbel
5ba40cf36c
Fix CI and examples
2024-06-18 09:52:37 +02:00
Matthijs Brobbel
c7851112a5
Rename salsa-2022
to salsa
2024-06-18 09:40:21 +02:00
Matthijs Brobbel
db75ae00a2
Remove old salsa
2024-06-18 09:25:26 +02:00
Niko Matsakis
56eb9c21e1
Merge pull request #500 from camelid/syn-feature
...
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Test / Test (false, beta) (push) Waiting to run
Test / Test (false, stable) (push) Waiting to run
Test / Test (true, nightly) (push) Waiting to run
Test / Miri (push) Waiting to run
Add missing `syn` feature requirement
2024-06-17 21:33:10 +00:00
Noah Lev
19b40c377f
Add missing syn
feature requirement
...
With the latest commit (283ccda
), any project that uses Salsa hits tons
of internal errors within Salsa. That's because Salsa needs syn's `full`
feature, which was removed from the Cargo.toml as part of the Salsa 3.0
mega-PR. Because Salsa 1.0 still has the `full` feature in its
Cargo.toml, Cargo implicitly still enables `full` for Salsa 2022, and
thus the Salsa 2022 example projects compile fine -- even though any
external code using Salsa does not.
2024-06-17 13:36:37 -07:00
Noah Lev
5b99535837
book: Creating inputs no longer requires &mut dyn Db
...
This was changed in #404 .
2024-06-17 13:09:19 -07:00
Niko Matsakis
283ccda940
Merge pull request #490 from nikomatsakis/salsa-30-new-update-regime
...
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Test / Test (false, beta) (push) Waiting to run
Test / Test (false, stable) (push) Waiting to run
Test / Test (true, nightly) (push) Waiting to run
Test / Miri (push) Waiting to run
salsa 3.0
2024-06-17 12:30:42 +00:00
Niko Matsakis
1544ee97ce
Apply suggestions from code review
...
Co-authored-by: Micha Reiser <micha@reiser.io>
Co-authored-by: Ryan Cumming <etaoins@gmail.com>
Co-authored-by: David Barsky <me@davidbarsky.com>
2024-06-15 06:09:10 -04:00
Niko Matsakis
ab9aa3ac08
WIP: start writing a safety chapter
...
Still debating the best structure, so the contents
are rather scattershot.
I may have found a hole, but it's...obscure
and I'm comfortable with it for the time being,
though I think we want to close it eventually.
2024-06-13 08:05:16 -04:00
Niko Matsakis
bcad24c7f1
add a safety comment on Update
...
This was not obvious to me initially.
2024-06-13 08:05:00 -04:00
Niko Matsakis
af2c9737a9
rework tutorial a bit to be more up to date
2024-06-11 05:36:45 -04:00
Niko Matsakis
c02f30a4d6
remove dead code from interned structs
2024-06-11 05:24:47 -04:00
Niko Matsakis
f91eeb931d
remove dead code
...
tracked structs only support `'db` lifetimes
2024-06-11 05:20:04 -04:00
Niko Matsakis
53266837af
remove "setter" function altogether
...
This...seems dated. We have `specify` which is
a more correct and principled version. Not sure
what `set` was meant to be but I don't see any
tests for it so...kill it.
2024-05-30 09:46:20 -04:00
Niko Matsakis
ce750dadf5
allow elided lifetimes in tracked fn return values
2024-05-30 09:40:47 -04:00
Niko Matsakis
b9ab8fcebd
rustfmt has opinions
2024-05-30 08:46:15 -04:00
Niko Matsakis
0ad0be8095
pacify the merciless clippy
2024-05-30 08:40:18 -04:00
Niko Matsakis
88b964d18d
use const _: ()
to disable clippy lints
2024-05-30 08:40:18 -04:00
Niko Matsakis
07d0ead9f4
return a NonNull instead of a &'db
...
In old code, we converted to a `&'db` when
creating a new tracked struct or interning,
but this value in fact persisted beyond the end
of `'db` (i.e., into the new revision).
We now refactor so that we create the `Foo<'db>`
from a `NonNull<T>` instead of a `&'db T`, and
then only create safe references when users
access fields.
This makes miri happy.
2024-05-30 01:59:49 -04:00
Niko Matsakis
8c51f37292
Revert "WIP: temporarily add expanded version of test"
...
This reverts commit a7b2805b06
.
2024-05-27 07:40:40 -04:00
Niko Matsakis
81942f37e5
use Alloc not Box
...
to avoid uniqueness guarantees
2024-05-27 07:39:46 -04:00
Niko Matsakis
a7b2805b06
WIP: temporarily add expanded version of test
2024-05-26 09:22:32 -04:00
Niko Matsakis
ce88a8f9ca
apply cargo fmt
2024-05-25 16:25:06 -04:00
Niko Matsakis
68502ab27f
'db all the things
2024-05-24 07:16:50 -04:00
Niko Matsakis
1560634f96
support methods with 'db lifetimes
2024-05-24 07:16:50 -04:00
Niko Matsakis
b005820494
add a derive for DebugWithDb
2024-05-24 07:16:50 -04:00
Niko Matsakis
4f4d01958f
generate a custom std::fmt::Debug
impl
...
This leads less representation information
and in particular avoids serializing pointers.
2024-05-24 07:16:50 -04:00
Niko Matsakis
d98485d3cb
add a derive for salsa::Update
...
And a test for it. This is required if you
want to have structures in your tracked structs.
Looks we need one for salsa::DebugWithDb, too.
2024-05-24 07:16:50 -04:00
Niko Matsakis
2800076857
update to syn 2.0
2024-05-24 07:16:50 -04:00
Niko Matsakis
06b70975e9
impl Update/Send/Sync
...
and add dedicated tests for that
2024-05-24 07:16:50 -04:00
Niko Matsakis
56030df782
convert a test to use 'db in tracked functions
...
It works! Huzzah.
2024-05-24 07:16:50 -04:00
Niko Matsakis
b4b49fbd1b
split the Id conversion traits
...
We now have AsId (always present)
and FromId/LookupId (sometimes present).
AsId is no longer part of the
salsa public interface.
Replace the ad-hoc `salsa_id` etc methods with
calls to `AsId::as_id`.
2024-05-24 07:16:50 -04:00