Git Product home page Git Product logo

Comments (5)

 avatar commented on June 6, 2024 1

from terraform-plugin-sdk.

apparentlymart avatar apparentlymart commented on June 6, 2024

Hi @sgendler-stem! Thanks for letting us know about this.

After chasing links for a while, it seems like the most relevant upstream issue here is golang/go#20478, which is the issue that inspired these init-time registrations and where there's some discussion about the vendoring problem it leads to.

As rakyll noted there, this should be a problem only if there's a violation of the usual pattern that only applications use vendoring, and not libraries. Unfortunately as we currently stand this repository is both an application (the terraform binary) and a set of libraries that providers depend on (in the helper/ directory), and so it violates this convention.

We have discussed before that we ought to move the provider libraries (helper/schema, etc) into a separate repository that is strictly Go libraries only, due to similar problems with encoding/gob registrations. However, we postponed that because we're currently doing some significant refactoring to support the improved configuration system we're integrating, and thus we're making coupled changes to both the Terraform application and the provider framework at the same time in order to preserve source compatibility with providers through these changes.

Since that remains true, I think unfortunately we can't reasonably address this immediately, but once we are finished with the current refactoring effort (which will leave us with a new provider RPC protocol that's designed to allow core and providers to be less coupled -- using grpc, ironically!) we should be in a good spot to split this repo and avoid the vendoring issue.

I understand that in the mean time this makes it difficult to develop providers that need to use grpc for other reasons, like for etcd. A potential (ugly!) workaround would be to manage vendoring for that provider in a more manual way and to delete either the entire vendor/github.com/hashicorp/terraform/vendor subtree or to surgically delete the vendor/github.com/hashicorp/terraform/vendor/golang/x/trace subtree, and thus force the vendored Terraform code to refer to the grpc library in the provider's vendor directory.

A quick skim of the vendor directories in some of the official providers led me to believe that govendor may already be doing this by default, since e.g. I don't see a vendor/github.com/hashicorp/terraform/vendor directory in the AWS provider's vendor dir.

from terraform-plugin-sdk.

paultyng avatar paultyng commented on June 6, 2024

In v2 of the plugin, we should finally be fully separate from the core repo so no more transitive dependency issue, hopefully solving this, especially for smaller providers.

from terraform-plugin-sdk.

paddycarver avatar paddycarver commented on June 6, 2024

I believe this issue is resolved in v2. Please open a new issue if the problem persists.

from terraform-plugin-sdk.

github-actions avatar github-actions commented on June 6, 2024

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

from terraform-plugin-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.