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

crates.io package does not work with the example #9

Closed
itacud95 opened this issue Nov 28, 2022 · 1 comment
Closed

crates.io package does not work with the example #9

itacud95 opened this issue Nov 28, 2022 · 1 comment

Comments

@itacud95
Copy link

The example cargo_completion works when cloning this repo, but when using the crates.io package it fails to compile.

To reproduce, clone this repo and make the following changes:

git diff
diff --git a/cargo_completion/Cargo.toml b/cargo_completion/Cargo.toml
index 7ee4c76..2fb70ad 100644
--- a/cargo_completion/Cargo.toml
+++ b/cargo_completion/Cargo.toml
@@ -10,7 +10,7 @@ keywords = ["cli", "completion", "autocomplete", "cargo"]
 license = "MIT OR Apache-2.0"
 
 [dependencies]
-shell_completion = { path = "../shell_completion" }
+shell_completion = "0.0.1"
 
 [[bin]]
 name = "_cargo_completion"

Building the example will generate the following error (truncated):

cargo install --force --path cargo_completion
  Installing cargo_completion v0.0.1 (/home/jk/dev/rust/shell_completion/cargo_completion)
    Updating crates.io index
   Compiling shell_completion v0.0.1
   Compiling cargo_completion v0.0.1 (/home/jk/dev/rust/shell_completion/cargo_completion)
error[E0432]: unresolved import `shell_completion::CompletionSet`
 --> cargo_completion/src/main.rs:1:62
  |
1 | use shell_completion::{BashCompletionInput, CompletionInput, CompletionSet};
  |                                                              ^^^^^^^^^^^^^
  |                                                              |
  |                                                              no `CompletionSet` in the root
  |                                                              help: a similar name exists in the module: `CompletionInput`

Am I doing something wrong, or is the crates.io package out-dated?

@JoshMcguigan
Copy link
Owner

Thanks for the report!

I've pushed a 0.0.2 version to crates.io, and confirmed cargo build -p cargo_completion builds.

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