Skip to content
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

Support binary name regex or filter #1701

Open
cavivie opened this issue May 16, 2024 · 5 comments
Open

Support binary name regex or filter #1701

cavivie opened this issue May 16, 2024 · 5 comments

Comments

@cavivie
Copy link

cavivie commented May 16, 2024

When I install nushell, I wish to install the nu plugins of the archive package at the same time. This may require regex/filter such as nu_plugin*, or may need to use other solutions that I don't know?

2024-05-16_23-26

@NobodyXu
Copy link
Member

I noticed that each nu-plugin is a separate crate, https://github.com/nushell/nushell/blob/main/crates/nu_plugin_polars/Cargo.toml

The most simple way to support this, is for esch of them to have a package.metadata.binstall as documented in here

cargp-binstall may download the same file multiple times though, that's something I'd like to optimize on.

@cavivie
Copy link
Author

cavivie commented May 17, 2024

Let's not talk about the situation where each bin is an independent crate. I want to first consider what happens if there are multiple bins in the same crate?

Cargo.toml:

[[bin]]
name = "main1"
path = "src/main1.rs"

[[bin]]
name = "main2"
path = "src/main2.rs"

@NobodyXu
Copy link
Member

In that case, binstall would try to install all of them.

If any binary is gated behind a feature, then binstall would ignore if it can't find it in the artifact.

In your case, the plugin seems to be in a separate crate in the workspace, instead of another binary in the same crate.

@cavivie
Copy link
Author

cavivie commented May 17, 2024

In your case, the plugin seems to be in a separate crate in the workspace, instead of another binary in the same crate.

But actually, these binaries are in an archive file

@NobodyXu
Copy link
Member

But actually, these binaries are in an archive file

Yes, in one archive file, but I checked the repository yesterday and it does have separate crates for plugins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants