-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
configs: Remove unused *Parser.LoadValuesFile
#34716
configs: Remove unused *Parser.LoadValuesFile
#34716
Conversation
A funny coincidence that (as a background task while I was watching a presentation this morning) I just implemented something that could have been a caller of this function, if only I'd remembered that it existed: #34718 (the I don't feel that what this function does is complex enough that we necessarily need to retain a separate function for it vs. just having equivalent behavior inline as I did in that PR, but since this coincidence happened I suppose it's worth thinking about which of the two approaches we'd find preferable here. 🤔 (Since Terraform CLI is able to load |
My softly-held opinion: I think we're better off having separate implementations, and removing this one. The logic is both simple and divergent (for arguably-good reasons), so I don't think there's enough benefit to try to build a generic The other implementation of related logic is in the command package, and you can see it's got one significant difference: terraform/internal/command/meta_vars.go Lines 277 to 285 in 268c8e2
I can't remember why we delay evaluation of variable values, but I assume we won't want to change that at this time. |
We delay because of the historical quirk that we parse the environment variables and So indeed, it does seem like there's no commonality between these two cases: the hypothetical new function I added would have no benefit in delaying parsing in this way because it doesn't have any variable declarations to refer to anyway, and it's also always starting with HCL syntax and so doesn't need that extra nudge to sometimes skip parsing and just use the string value verbatim. |
Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
While working in the area I noticed that this method is not used anywhere, so we can remove it.
Target Release
1.8.x