-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
Merge binaries into main probe-rs crate. #1637
Conversation
@Dirbaio ... This file rename: Does it make sense to introduce a subfolder |
Yes, that's sort of what I'm doing. The main |
Looking at the final directory structure, it feels like there is an opportunity to move all the PS. There are some |
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.
At first, I thought there was no way to cargo install
the dap-server
, but then I figured out that the cargo install --features="cli"
will install the probe-rs
binary that includes the dap-server
sub command.
I'm wondering if it makes sense to make that the default feature? Or else perhaps update the error message for cargo install
, which currently gives you
warning: none of the package's binaries are available for install using the selected features
bin "probe-rs" requires the features: `cli`
bin "cargo-flash" requires the features: `cli`
bin "cargo-embed" requires the features: `cli`
example "nrf53_recover" requires the features:
example "ram_download" requires the features:
example "multidrop_raw" requires the features:
example "tcp_itm" requires the features:
1 more targets also requires features not enabled. See them in the Cargo.toml file.
Consider enabling some of the needed features by passing, e.g., `--features="cli"`
To help users understand that the --features="cli"
will enable gdb and dap servers also.
I'm not sure how to add this to review, but in the file
|
I'm not sure. Everything under
Yes, for now I've focused on merging everything as-is and not doing any cleanup/reorganization to make review easier/faster. There's lots of stuff to clean up, I was planning on doing it in future PRs.
The idea of the merge is that the user doesn't "install the DAP server" or "install cargo-embed". They "install probe-rs", that's it. It's a single thing with all the functionality.
Making it default means everyone using the I agree having to set the feature is not great UX. However, I'm not too worried about the
That error message is not customizable. :(
I don't think we should make the user worry about "getting the DAP server", they should just worry about "installing probe-rs". ie the vscode extension docs could tell the user "Install probe-rs, then install the probe-rs vscode extension. The extension uses the system-wide probe-rs installation". |
Totally understood and the logic about keeping the api dep tree clean. In that case, do we want to call that feature "cli" (the feature name sent me down the path of misunderstanding, because I didn't see 'server' components falling under 'cli')? Perhaps something like "tools"? |
It's not "tools", it's THE probe-rs tool :) IMO |
I will leave it up to tiwalun and yatekii to decide. I was just trying to help make sure new users don't get too confused when trying to get off the ground with probe-rs. |
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.
Refactoring is never fun, but it feels like this sets us on the right path ... thanks :)
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.
Looks good, thanks for all the work!
Just some small nits, but nothing big regarding the code.
I think we should update the README as well, now it seems that all the installation instructions which were part of the individual readmes are gone. Could also be done in a separate PR, but then we should create an issue so it doesn't get forgotten.
Merge this first I think, my rebase should be pretty straightforward. |
Rebased, resolved @Tiwalun 's comments (except one) |
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.
Thanks! ❤️
TODO: