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

Error if generating bindings for non-existent component #14

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

itowlson
Copy link
Contributor

Fixes #13.

$ spin deps generate-bindings -L rust -o bindywoo -c nonexistentcomp
Error: The WIT file that `spin deps` uses to track component dependencies doesn't exist. This can happen if:
* the component name is incorrect
* you've not previously run `spin deps add` for this component
The expected file is ".wit/components/nonexistentcomp/deps.wit"

@itowlson itowlson merged commit ecaf069 into fermyon:main Dec 12, 2024
8 checks passed
@@ -34,8 +34,12 @@ impl GenerateBindingsCommand {
.join(SPIN_DEPS_WIT_FILE_NAME);

if !std::fs::exists(&wit_path)? {
// TODO: warn that the file does not exist
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOL!

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

Successfully merging this pull request may close these issues.

Providing a non-existing component id to spin deps generate-bindings fails silently
3 participants