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

Go tools fails to identify codegen-framework as a tool dependency #122

Open
1 task done
TheNilesh opened this issue Feb 5, 2024 · 3 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@TheNilesh
Copy link

tfplugingen-framework CLI version

tfplugingen-framework module: v0.3.1

Provider Code Spec File

NA

Expected Behavior

No error when using this as tools dependency.

Actual Behavior

image

import "github.com/hashicorp/terraform-plugin-codegen-framework/cmd/tfplugingen-framework" is a program, not an importable package

Additional Information

Despite having same project layout, "github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs" works as a tools dependency.

Is there a new way to add tools dependency? Where is it documented?

Code of Conduct

  • I agree to follow this project's Code of Conduct
@TheNilesh TheNilesh added the bug Something isn't working label Feb 5, 2024
@austinvalle
Copy link
Member

austinvalle commented Feb 8, 2024

Hi there @TheNilesh 👋🏻 , thanks for filing the report and sorry you're running into this.

I don't believe there is a difference between how tfplugindocs and tfplugingen-framework are implemented that should change this. I'm assuming your go.mod contains the top level modules, like this:
image

Are you still able to run go generate ./... successfully? We actually have a different command line tools we use in our provider's go generate, which displays that same error although it still works fine:
image

In the case of the copywrite tool, that Go module is setup differently: https://github.com/hashicorp/copywrite

@ascopes
Copy link

ascopes commented Aug 5, 2024

I've got the same issue. How should this be configured to run as a tool?

@TheNilesh
Copy link
Author

Are you still able to run go generate ./... successfully?
Yes

@ascopes I run it as a standalone program

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants