-
Notifications
You must be signed in to change notification settings - Fork 514
Added tool for generating vscode debug tasks #3671
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
base: main
Are you sure you want to change the base?
Conversation
e90ac2a
to
afad691
Compare
.unwrap_or_else(|_| panic!("couldn't open {:?}", &launch_json_path)); | ||
|
||
// Verify basic JSON structure | ||
assert!(content.contains(r#""version": "0.2.0""#)); |
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'd be tempted to actually parse the JSON here rather than doing string asserts, but also recognise going from 0 to non-0 dependencies is annoying
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.
Done
|
||
/// Don't pretty print generated JSON | ||
#[arg(long)] | ||
no_pretty: bool, |
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.
Maybe pretty
with default true
, rather than default negation?
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.
Does clap support this?
tools/vscode/src/lib.rs
Outdated
} | ||
|
||
/// Query information about a specific target. | ||
pub fn query_target_info(&mut self, target: &str) -> Result<TargetInfo> { |
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.
AFAICT this is unused?
I was going to ask why we need both this and find_rust_targets
, but I suspect the answer is we don't?
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.
Good catch, deleted!
Co-authored-by: Daniel Wagner-Hall <[email protected]>
Co-authored-by: Daniel Wagner-Hall <[email protected]>
Co-authored-by: Daniel Wagner-Hall <[email protected]>
This change introduces
//tools/vscode
which includes tools for vscode integrations. Separate from//tools/rust_analyzer
, this new package includes agen_launch_json
target which can be used to generate "Run and Debug" tasks forrust_binary
andrust_test
targets.closes #370