Skip to content

Conversation

MichaReiser
Copy link
Member

Summary

Update salsa to now get warned about unknown attributes on salsa-structs and documented getters.

Test Plan

cargo build

@MichaReiser MichaReiser added the internal An internal refactor or improvement label Jun 10, 2025
Copy link
Contributor

github-actions bot commented Jun 10, 2025

mypy_primer results

No ecosystem changes detected ✅

@MichaReiser
Copy link
Member Author

@ibraheemdev I'm not sure if this is the same as salsa-rs/salsa#904 but many corpus tests are failing with

thread 'typeshed_no_panic' panicked at /Users/micha/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/8924db1/src/interned.rs:698:9:
Data was not interned in the latest revision for its durability.

@AlexWaygood
Copy link
Member

Also one mdtest:

descriptor_protocol.… - Descriptor protocol - Basic properties - Descriptors only wor… (82302db0798c7f28)

      crates/ty_python_semantic/resources/mdtest/descriptor_protocol.md:201 panicked at /home/runner/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/8924db1/src/interned.rs:698:9
      crates/ty_python_semantic/resources/mdtest/descriptor_protocol.md:201 Data was not interned in the latest revision for its durability.
      crates/ty_python_semantic/resources/mdtest/descriptor_protocol.md:201 run with `RUST_BACKTRACE=1` environment variable to display a backtrace
      crates/ty_python_semantic/resources/mdtest/descriptor_protocol.md:201 query stacktrace:
      crates/ty_python_semantic/resources/mdtest/descriptor_protocol.md:201    0: infer_expression_types(Id(1001)) -> (R24, Durability::LOW)
      crates/ty_python_semantic/resources/mdtest/descriptor_protocol.md:201              at crates/ty_python_semantic/src/types/infer.rs:240
      crates/ty_python_semantic/resources/mdtest/descriptor_protocol.md:201    1: infer_scope_types(Id(800)) -> (R24, Durability::LOW)
      crates/ty_python_semantic/resources/mdtest/descriptor_protocol.md:201              at crates/ty_python_semantic/src/types/infer.rs:135
      crates/ty_python_semantic/resources/mdtest/descriptor_protocol.md:201    2: check_types(Id(0)) -> (R24, Durability::LOW)
      crates/ty_python_semantic/resources/mdtest/descriptor_protocol.md:201              at crates/ty_python_semantic/src/types.rs:88
      crates/ty_python_semantic/resources/mdtest/descriptor_protocol.md:201 

    To rerun this specific test, set the environment variable: MDTEST_TEST_FILTER='descriptor_protocol.… - Descriptor protocol - Basic properties - Descriptors only wor… (82302db0798c7f28)'
    MDTEST_TEST_FILTER='descriptor_protocol.… - Descriptor protocol - Basic properties - Descriptors only wor… (82302db0798c7f28)' cargo test -p ty_python_semantic --test mdtest -- mdtest__descriptor_protocol

    --------------------------------------------------

    test mdtest__descriptor_protocol ... FAILED

    failures:

    failures:
        mdtest__descriptor_protocol

@AlexWaygood AlexWaygood added the ty Multi-file analysis & type inference label Jun 10, 2025
@AlexWaygood AlexWaygood removed their request for review June 10, 2025 15:53
@MichaReiser MichaReiser force-pushed the micha/fix-incorrect-salsa-attr branch from 45c9032 to a5d62c0 Compare June 11, 2025 07:11
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@MichaReiser MichaReiser merged commit 3aae1cd into main Jun 11, 2025
35 checks passed
@MichaReiser MichaReiser deleted the micha/fix-incorrect-salsa-attr branch June 11, 2025 07:19
dcreager added a commit that referenced this pull request Jun 12, 2025
* main:
  [ty] Add some "inside string" tests for `object.<CURSOR>` completions
  [ty] Pull types on synthesized Python files created by mdtest (#18539)
  Update Rust crate anstyle to v1.0.11 (#18583)
  [`pyupgrade`] Fix `super(__class__, self)` detection in UP008 (super-call-with-parameters) (#18478)
  [ty] Generate the top and bottom materialization of a type (#18594)
  `SourceOrderVisitor` should visit the `Identifier` part of the `PatternKeyword` node (#18635)
  Update salsa (#18636)
  [ty] Update mypy_primer doc (#18638)
  [ty] Improve support for `object.<CURSOR>` completions
  [ty] Add `CoveringNode::find_last`
  [ty] Refactor covering node representation
  [ty] Infer the Python version from `--python=<system installation>` on Unix (#18550)
  [`flake8-return`] Fix `RET504` autofix generating a syntax error (#18428)
  Fix incorrect salsa `return_ref` attribute (#18605)
  Move corpus tests to `ty_python_semantic` (#18609)
  [`pyupgrade`] Don't offer fix for `Optional[None]` in non-pep604-annotation-optional (`UP045)` or non-pep604-annotation-union (`UP007`) (#18545)
  [`pep8-naming`] Suppress fix for `N804` and `N805` if the recommend name is already used (#18472)
  [`ruff`] skip fix for `RUF059` if dummy name is already bound (unused-unpacked-variable) (#18509)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement ty Multi-file analysis & type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants