Skip to content

Rust: try to speed things up a bit#17849

Merged
redsun82 merged 4 commits into
mainfrom
aibaars/single-semantics
Nov 4, 2024
Merged

Rust: try to speed things up a bit#17849
redsun82 merged 4 commits into
mainfrom
aibaars/single-semantics

Conversation

@aibaars

@aibaars aibaars commented Oct 25, 2024

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions github-actions Bot added the Rust Pull requests that update Rust code label Oct 25, 2024
Files were reloaded to handle cases were there was no content
for a file_id, causing a panic. Missing contents was caused by
files that did not contain valid UTF-8 data. These are skipped
by rust-analyzer when it is loading data into the RootDatabase.
Comment thread rust/extractor/src/rust_analyzer.rs Outdated
WithDatabase { db: RootDatabase, vfs: Vfs },
pub enum RustAnalyzer<'a> {
WithDatabase {
db: &'a RootDatabase,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is probably not needed any more, as it can be accessed via semantics.db

@aibaars aibaars force-pushed the aibaars/single-semantics branch from 7859e5f to 7792b5c Compare October 28, 2024 17:35
@aibaars aibaars force-pushed the aibaars/single-semantics branch from 7792b5c to fa3bc06 Compare October 28, 2024 17:56
If:
* the text for a file_id is not found (likely non-utf data in file)
* path does not appear in Vfs, in which case we fall back on loading the file from disk with no "semantics" available
@aibaars aibaars force-pushed the aibaars/single-semantics branch from fa3bc06 to 0e511d6 Compare October 30, 2024 12:18
@aibaars aibaars marked this pull request as ready for review October 30, 2024 12:18
@redsun82 redsun82 merged commit bde517f into main Nov 4, 2024
@redsun82 redsun82 deleted the aibaars/single-semantics branch November 4, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants