mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-19 09:48:32 -05:00
version: Update which dependencies we consider "interesting"
InterestingDependencies is used to include version information for a small subset of our dependencies whose behavior is directly exposed in the OpenTofu UX, such as including a parser for some syntax that OpenTofu relies on and that is covered by our compatibility promises. Unfortunately we recently switched to using our own forks of certain libraries and hadn't updated this to match, so the corresponding logs had become less complete. This updates those to the dependencies we actually use, and also adds a few new ones that have similar characteristics. We'll also now skip calling InterestingDependencies altogether if the log level isn't high enough for the results to be visible, since that avoids us wasting time generating a data structure that will not be used. Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
This commit is contained in:
@@ -125,9 +125,11 @@ func realMain() int {
|
||||
}
|
||||
|
||||
log.Printf("[INFO] OpenTofu version: %s %s", Version, VersionPrerelease)
|
||||
if logging.IsDebugOrHigher() {
|
||||
for _, depMod := range version.InterestingDependencies() {
|
||||
log.Printf("[DEBUG] using %s %s", depMod.Path, depMod.Version)
|
||||
}
|
||||
}
|
||||
log.Printf("[INFO] Go runtime version: %s", runtime.Version())
|
||||
if dynamicGodebug := os.Getenv("GODEBUG"); dynamicGodebug != "" {
|
||||
log.Printf("[WARN] GODEBUG environment variable is set to %q, which may activate unsupported and untested behavior", dynamicGodebug)
|
||||
|
||||
@@ -11,15 +11,18 @@ import "runtime/debug"
|
||||
// intended to mean here. We should keep this set relatively small to avoid
|
||||
// bloating the logs too much.
|
||||
var interestingDependencies = map[string]struct{}{
|
||||
"github.com/opentofu/provider-client": {},
|
||||
"github.com/opentofu/registry-address/v2": {},
|
||||
"github.com/opentofu/svchost": {},
|
||||
"github.com/hashicorp/go-getter": {},
|
||||
"github.com/hashicorp/hcl": {},
|
||||
"github.com/hashicorp/hcl/v2": {},
|
||||
"github.com/zclconf/go-cty": {},
|
||||
"github.com/hashicorp/go-tfe": {},
|
||||
"github.com/hashicorp/terraform-svchost": {},
|
||||
}
|
||||
|
||||
// InterestingDependencies returns the compiled-in module version info for
|
||||
// a small number of dependencies that Terraform uses broadly and which we
|
||||
// tend to upgrade relatively often as part of improvements to Terraform.
|
||||
// a small number of dependencies that OpenTofu uses broadly and which we
|
||||
// tend to upgrade relatively often as part of improvements to OpenTofu.
|
||||
//
|
||||
// The set of dependencies this reports might change over time if our
|
||||
// opinions change about what's "interesting". This is here only to create
|
||||
|
||||
Reference in New Issue
Block a user