Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

salsa 3.0 #490

Merged
Merged

Commits on May 24, 2024

  1. Configuration menu
    Copy the full SHA
    225a81a View commit details
    Browse the repository at this point in the history
  2. 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.
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    4533cd9 View commit details
    Browse the repository at this point in the history
  3. return &TrackedStructValue<C> from new_struct

    This is a step towards the goal of keep a pointer
    in the structs themselves.
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    e24ace2 View commit details
    Browse the repository at this point in the history
  4. 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
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    a320781 View commit details
    Browse the repository at this point in the history
  5. 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.
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    20cb307 View commit details
    Browse the repository at this point in the history
  6. 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.
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    ea1d452 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    79d24e0 View commit details
    Browse the repository at this point in the history
  8. track and assert struct ingredient indices

    We need a cheap way to compute field indices.
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    5ce5e3c View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b6311d8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    cb1a2bb View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6e2647f View commit details
    Browse the repository at this point in the history
  12. remove Key from Fn configuration

    Just use salsa::Id for the most part.
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    b050bd8 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    44a8a2f View commit details
    Browse the repository at this point in the history
  14. give fields a lifetime

    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    e95c8b2 View commit details
    Browse the repository at this point in the history
  15. permit <'db> on tracked struct

    tracked structs with `'db` carry a pointer
    and not an id.
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    a84777d View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    fe4ff98 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    04e041b View commit details
    Browse the repository at this point in the history
  18. pipe debug output through rustfmt

    is there a nicer way to do this?!
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    4f74037 View commit details
    Browse the repository at this point in the history
  19. generate configuration struct in salsa_struct

    It will be shared between tracked structs and
    interned structs.
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    8ba6e60 View commit details
    Browse the repository at this point in the history
  20. move interned-specific fns out of salsa struct

    Salsa struct is already a grab-bag, best to keep
    it to shared functionality.
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    54c9586 View commit details
    Browse the repository at this point in the history
  21. rework interning to have a Configuration

    This will permit GATs so that interned values
    can carry lifetimes.
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    97fc6a0 View commit details
    Browse the repository at this point in the history
  22. update tests for new error messages

    also fix name of a fn in one case
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    3441666 View commit details
    Browse the repository at this point in the history
  23. introduce helper functions

    We'll need these for use with tracked functions
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    d190beb View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    4822013 View commit details
    Browse the repository at this point in the history
  25. have tracked struct intern its own keys

    Previously tracked structs relied on an
    interned ingredient to intern their keys.
    But really it has more complex logic than we
    need. Simpler to just remove it and duplicate
    the basic concept.
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    d6d5226 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    af94b25 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    d92f2aa View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    5095d79 View commit details
    Browse the repository at this point in the history
  29. rename from TrackedStruct to just Struct

    this will let us use different packages
    but the same struct name from salsa struct
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    0b8c27b View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    9d8a60b View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    9607638 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    d361e8a View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    8d0f8fc View commit details
    Browse the repository at this point in the history
  34. introduce IdLookup trait

    We are going to need it for tracked functions.
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    cf2fa67 View commit details
    Browse the repository at this point in the history
  35. introduce LookupId trait

    We are going to need it for tracked functions.
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    ab70786 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    7519c3e View commit details
    Browse the repository at this point in the history
  37. 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`.
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    b4b49fb View commit details
    Browse the repository at this point in the history
  38. convert a test to use 'db in tracked functions

    It works! Huzzah.
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    56030df View commit details
    Browse the repository at this point in the history
  39. impl Update/Send/Sync

    and add dedicated tests for that
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    06b7097 View commit details
    Browse the repository at this point in the history
  40. update to syn 2.0

    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    2800076 View commit details
    Browse the repository at this point in the history
  41. 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.
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    d98485d View commit details
    Browse the repository at this point in the history
  42. generate a custom std::fmt::Debug impl

    This leads less representation information
    and in particular avoids serializing pointers.
    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    4f4d019 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    b005820 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    1560634 View commit details
    Browse the repository at this point in the history
  45. 'db all the things

    nikomatsakis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    68502ab View commit details
    Browse the repository at this point in the history

Commits on May 25, 2024

  1. apply cargo fmt

    nikomatsakis committed May 25, 2024
    Configuration menu
    Copy the full SHA
    ce88a8f View commit details
    Browse the repository at this point in the history

Commits on May 26, 2024

  1. Configuration menu
    Copy the full SHA
    a7b2805 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2024

  1. use Alloc not Box

    to avoid uniqueness guarantees
    nikomatsakis committed May 27, 2024
    Configuration menu
    Copy the full SHA
    81942f3 View commit details
    Browse the repository at this point in the history
  2. Revert "WIP: temporarily add expanded version of test"

    This reverts commit a7b2805.
    nikomatsakis committed May 27, 2024
    Configuration menu
    Copy the full SHA
    8c51f37 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2024

  1. 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.
    nikomatsakis committed May 30, 2024
    Configuration menu
    Copy the full SHA
    07d0ead View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    88b964d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0ad0be8 View commit details
    Browse the repository at this point in the history
  4. rustfmt has opinions

    nikomatsakis committed May 30, 2024
    Configuration menu
    Copy the full SHA
    b9ab8fc View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ce750da View commit details
    Browse the repository at this point in the history
  6. 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.
    nikomatsakis committed May 30, 2024
    Configuration menu
    Copy the full SHA
    5326683 View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2024

  1. remove dead code

    tracked structs only support `'db` lifetimes
    nikomatsakis committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    f91eeb9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c02f30a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    af2c973 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2024

  1. add a safety comment on Update

    This was not obvious to me initially.
    nikomatsakis committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    bcad24c View commit details
    Browse the repository at this point in the history
  2. 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.
    nikomatsakis committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    ab9aa3a View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2024

  1. Apply suggestions from code review

    Co-authored-by: Micha Reiser <[email protected]>
    Co-authored-by: Ryan Cumming <[email protected]>
    Co-authored-by: David Barsky <[email protected]>
    4 people authored Jun 15, 2024
    Configuration menu
    Copy the full SHA
    1544ee9 View commit details
    Browse the repository at this point in the history