ruff/crates
Dhruv Manilawala 551ed2706b
[red-knot] Simplify virtual file support (#13043)
## Summary

This PR simplifies the virtual file support in the red knot core,
specifically:

* Update `File::add_virtual_file` method to `File::virtual_file` which
will always create a new virtual file and override the existing entry in
the lookup table
* Add `VirtualFile` which is a wrapper around `File` and provides
methods to increment the file revision / close the virtual file
* Add a new `File::try_virtual_file` to lookup the `VirtualFile` from
`Files`
* Add `File::sync_virtual_path` which takes in the `SystemVirtualPath`,
looks up the `VirtualFile` for it and calls the `sync` method to
increment the file revision
* Removes the `virtual_path_metadata` method on `System` trait

## Test Plan

- [x] Make sure the existing red knot tests pass
- [x] Updated code works well with the LSP
2024-08-23 07:04:15 +00:00
..
red_knot Eagerly validate typeshed versions (#12786) 2024-08-21 15:49:53 +00:00
red_knot_python_semantic Added bytes type and some inference (#13061) 2024-08-22 13:27:15 -07:00
red_knot_server [red-knot] Simplify virtual file support (#13043) 2024-08-23 07:04:15 +00:00
red_knot_wasm [red-knot] Simplify virtual file support (#13043) 2024-08-23 07:04:15 +00:00
red_knot_workspace [red-knot] Support textDocument/didChange notification (#13042) 2024-08-23 06:58:54 +00:00
ruff Bump version to 0.6.2 (#13056) 2024-08-22 18:59:27 +05:30
ruff_benchmark Eagerly validate typeshed versions (#12786) 2024-08-21 15:49:53 +00:00
ruff_cache Fix cache key collisions for paths with separators (#12159) 2024-07-03 07:36:46 -05:00
ruff_db [red-knot] Simplify virtual file support (#13043) 2024-08-23 07:04:15 +00:00
ruff_dev Drop deprecated nursery rule group (#10172) 2024-06-27 13:44:11 +02:00
ruff_diagnostics [Minor typo] Fix article in "an fix" (#12797) 2024-08-10 21:22:00 -04:00
ruff_formatter Upgrade to Rust 1.80 (#12586) 2024-07-30 19:18:08 +00:00
ruff_index [red-knot] small efficiency improvements and bugfixes to use-def map building (#12373) 2024-07-18 09:24:58 -07:00
ruff_linter Bump version to 0.6.2 (#13056) 2024-08-22 18:59:27 +05:30
ruff_macros Drop deprecated nursery rule group (#10172) 2024-06-27 13:44:11 +02:00
ruff_notebook Fallback to kernelspec to check if it's a Python notebook (#12875) 2024-08-14 12:36:09 +05:30
ruff_python_ast Added bytes type and some inference (#13061) 2024-08-22 13:27:15 -07:00
ruff_python_ast_integration_tests Rename PreorderVisitor to SourceOrderVisitor (#11798) 2024-06-07 17:01:58 +00:00
ruff_python_codegen Implement iter(), len() and is_empty() for all display-literal AST nodes (#12807) 2024-08-12 10:39:28 +00:00
ruff_python_formatter Implement iter(), len() and is_empty() for all display-literal AST nodes (#12807) 2024-08-12 10:39:28 +00:00
ruff_python_index Enable token-based rules on source with syntax errors (#11950) 2024-07-02 08:57:46 +00:00
ruff_python_literal Remove some unused pub functions (#11576) 2024-05-28 09:56:51 -04:00
ruff_python_parser Upgrade to Rust 1.80 (#12586) 2024-07-30 19:18:08 +00:00
ruff_python_resolver chore(deps): update rust crate insta to v1.38.0 (#10701) 2024-04-01 15:44:30 +00:00
ruff_python_semantic Select stable import name when multiple possible bindings are in scope (#12888) 2024-08-16 20:16:57 +02:00
ruff_python_stdlib Add a new script to generate builtin module names (#12696) 2024-08-05 21:33:36 +01:00
ruff_python_trivia Stabilize fixes for RET50{5-8} (#12840) 2024-08-14 18:15:45 +02:00
ruff_python_trivia_integration_tests Build CommentRanges outside the parser (#11792) 2024-06-09 09:55:17 +00:00
ruff_server Show full error context in server messages (#13029) 2024-08-21 15:36:16 +05:30
ruff_source_file Add API to emit type-checking diagnostics (#12988) 2024-08-20 07:22:30 +00:00
ruff_text_size Upgrade to Rust 1.79 (#11875) 2024-06-17 07:15:10 +01:00
ruff_wasm Bump version to 0.6.2 (#13056) 2024-08-22 18:59:27 +05:30
ruff_workspace Eagerly validate typeshed versions (#12786) 2024-08-21 15:49:53 +00:00