---
# System prepended metadata

title: '2025-09-17'

---

# 2025-09-17

## rust-analyzer updates from David Barsky

Continuing to integrate new trait solver.

Main rust-analyzer maintainer continues to be Lukas.

## Persistence

Ibraheem hit pause to prioritize other work

## Fixed point in ty

* [Unsoundness bugs in fixed point](https://hackmd.io/ssTCBqsLSiioAARm5mlDGw)
* Performance bugs in deeply nested cycles

### Sketching

```mermaid
flowchart LR
    subgraph B
        B2 --> B1 --> B0
    end
    
    B0 --> A
    C --calls --> B2
```

* $A \rightarrow B$ means that A calls B

```python
def c():
    r = b()

def b():
    base_result = a()
    # other stuff that eventually calls b()

def a():
    ...
```

* Option A: whatever we do today, which we can review
* Option B: naively execute gives you 5 memos
* Option C: naively execute but then "flatten" the dependencies, so you wind up with

```mermaid
flowchart LR
    C --> B --> A
```

but what about this kind of thing

```mermaid
flowchart LR
    subgraph Cycle
        A --> B
        B --> A
    end
    
    A --> X
    B --> Y
```

problem here is:

* where X or Y "comes first" depends on which part of the cycle you start from
* Y may take a salsa struct as argument that was created by X, returned via A to B
    * normally when we validate Y we assume that whoever created its arguments has also been validated
    * but here because of how cycle recording works we may wind up validating just Y first
    * the result from prior iterations "burrows" its way without a visible dependency

to fix it you could

* flatten the head to things outside the cycle
* when validating the participant, you make a dependency on the head or etc

the diff outputs bug is

* do not diff outputs
* diff outputs only against the final revision

rough options

* "the pure option" -- we unfold iterations, making them part of the input/memo-id
    * benefit: reuse of intermediate cycle results
    * downside: memory usage may be high, cache footprint becomes bigger, etc
* "do what we're doing but do it right"
    * diff-outputs knows to "hold" on diff until final result
        * fix deep-verify-memo to start with the head or somethin
        * and/or isn't diff'd
    * benefit: compressed memory usage
    * downside: no reuse of intermediate cycle result
* "fixed reuse pattern"
    * keep iteration 0 + N only ... somehow

