-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create turbo-static for compile time graph analysis #8037
base: 03-08-add_ability_to_filter_by_value_and_occurences
Are you sure you want to change the base?
create turbo-static for compile time graph analysis #8037
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
8 Ignored Deployments
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
🟢 Turbopack Benchmark CI successful 🟢Thanks |
|
✅ This change can build |
9f50dd4
to
d49e885
Compare
ce8e28a
to
e952f37
Compare
e952f37
to
b0c665b
Compare
d49e885
to
fbab81c
Compare
b0c665b
to
096a710
Compare
fbab81c
to
739c4e3
Compare
096a710
to
9bb9503
Compare
739c4e3
to
2671771
Compare
9bb9503
to
152f2e8
Compare
2671771
to
3fb2eb1
Compare
152f2e8
to
fd69cf9
Compare
fd69cf9
to
332fbfc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple quick comments about fjall and neo4j as I skimmed over this.
003b9b0
to
f0c3166
Compare
332fbfc
to
893bee0
Compare
f0c3166
to
1b49d92
Compare
fn get_name(item: &CallHierarchyItem) -> String { | ||
// open file, find range inside, extract text | ||
let file = fs::read_to_string(item.uri.path()).unwrap(); | ||
let start = item.selection_range.start; | ||
let end = item.selection_range.end; | ||
file.lines() | ||
.nth(start.line as usize) | ||
.unwrap() | ||
.chars() | ||
.skip(start.character as usize) | ||
.take(end.character as usize - start.character as usize) | ||
.collect() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming the name
field of CallHierarchyItem
isn't the thing you want? https://docs.rs/lsp-types/latest/lsp_types/struct.CallHierarchyItem.html#structfield.name
sender: Option<crossbeam_channel::Sender<Message>>, | ||
receiver: Option<crossbeam_channel::Receiver<Message>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor/FYI, std::sync::mpsc
uses crossbeam as of rust 1.67.0: https://blog.rust-lang.org/2023/01/26/Rust-1.67.0.html#stdsyncmpsc-implementation-updated
There used to be some general advice to avoid std::sync::mpsc
because the implementation was bad, but now I feel like you don't need to use crossbeam_channel
unless you need some features from it.
pub enum CallingStyle { | ||
Once, | ||
#[allow(dead_code)] | ||
ZeroOrOnce, | ||
#[allow(dead_code)] | ||
ZeroOrMore, | ||
#[allow(dead_code)] | ||
OneOrMore, | ||
} | ||
|
||
impl CallingStyle { | ||
fn bitset(self) -> u8 { | ||
match self { | ||
CallingStyle::Once => 0b0010, | ||
CallingStyle::ZeroOrOnce => 0b011, | ||
CallingStyle::ZeroOrMore => 0b0111, | ||
CallingStyle::OneOrMore => 0b0110, | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub enum CallingStyle { | |
Once, | |
#[allow(dead_code)] | |
ZeroOrOnce, | |
#[allow(dead_code)] | |
ZeroOrMore, | |
#[allow(dead_code)] | |
OneOrMore, | |
} | |
impl CallingStyle { | |
fn bitset(self) -> u8 { | |
match self { | |
CallingStyle::Once => 0b0010, | |
CallingStyle::ZeroOrOnce => 0b011, | |
CallingStyle::ZeroOrMore => 0b0111, | |
CallingStyle::OneOrMore => 0b0110, | |
} | |
} | |
} | |
pub enum CallingStyle { | |
Once = 0b0010, | |
#[allow(dead_code)] | |
ZeroOrOnce = 0b0011, | |
#[allow(dead_code)] | |
ZeroOrMore = 0b0111, | |
#[allow(dead_code)] | |
OneOrMore = 0b0110, | |
} | |
impl CallingStyle { | |
fn bitset(self) -> u8 { | |
self as u8 | |
} | |
} |
You also might not need the #[allow(dead_code)]
since fn add
should use the enum variants?
Description
Testing Instructions
Closes TURBO-2877