Skip to content

Fix stale File status in tests#15030

Merged
MichaReiser merged 1 commit intomainfrom
micha/fix-test-isolation
Dec 17, 2024
Merged

Fix stale File status in tests#15030
MichaReiser merged 1 commit intomainfrom
micha/fix-test-isolation

Conversation

@MichaReiser
Copy link
Member

Summary

Fixes #15027

The MemoryFileSystem::write_file API automatically creates non-existing ancestor directoryes
but we failed to update the status of the now created ancestor directories in the Files data structure.

Test Plan

Tested that the case in #15027 now passes regardless of whether the Simple case is commented out or not

@MichaReiser MichaReiser added the ty Multi-file analysis & type inference label Dec 17, 2024
let file = definition.file(db);
let _span = tracing::trace_span!(
"infer_definition_types",
definition = ?definition.as_id(),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the definition id gives us much here and it resulted in very long tracing lines but I'll revert if this ends up being controverisal

@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Contributor

@sharkdp sharkdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@MichaReiser MichaReiser merged commit dcb99cc into main Dec 17, 2024
@MichaReiser MichaReiser deleted the micha/fix-test-isolation branch December 17, 2024 11:45
dcreager added a commit that referenced this pull request Dec 17, 2024
* main:
  [red-knot] Explicitly test diagnostics are emitted for unresolvable submodule imports (#15035)
  Fix stale File status in tests (#15030)
  [red-knot] Basic support for other legacy `typing` aliases (#14998)
  feat(AIR302): extend the following rules (#15015)
  [`perflint`] Simplify finding the loop target in `PERF401` (#15025)
  [red-knot] Avoid undeclared path when raising conflicting declarations (#14958)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import-related mdtests aren't isolated

2 participants