Skip to content

go: potential for mismatch between package name and output directory #1500

@asteurer

Description

@asteurer

Consider the following command:

wit-bindgen go -w wrld --out-dir baz --mod-name github.com/foo/bar/baz ./wit

The package name wit_component contained in the generated baz/wit_bindings.go and the output directory baz won't match and cause package errors.

I see two possible ways to view this:

  1. This is acceptable behavior and just needs to be documented
  2. This is not acceptable behavior and we need to update the logic on this line.

@dicej Eager to hear your thoughts!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions