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

cliconfig: Move HCL 1.0-based language out of the way #27067

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

apparentlymart
Copy link
Member

We've been continuing to maintain the HCL 1-based CLI configuration language to keep compatibility with prior versions, but the HCL 1 API is constraining and it's annoying to have both versions of HCL in Terraform at once.

In this PR I'm hoping to gradually, as time allows, build a new HCL 2 based implementation alongside the existing one, with the intent of supporting them both for a while after and then hopefully eventually phasing out the legacy configuration.

However, this is not a high-priority effort so I'll be moving it forward slowly only to the extent that I have some spare moments around other work. For now it'll remain a draft until there's something more concrete to share.

We've been continuing to maintain the HCL 1-based CLI configuration
language to keep compatibility with prior versions, but the HCL 1 API is
constraining and it's annoying to have both versions of HCL in Terraform
at once.

This commit doesn't change any user-visible behavior but it does rename
a bunch of things in the cliconfig package to include the word "Legacy" so
that we can gradually build out an HCL 2 based new implementation
alongside and eventually support them both together.

The plan to support them both at once is to also switch over to using
OS-standard configuration file locations (like XDG Base Directory on Linux)
at the same time and treat the new locations as an opt-in for the new
language variant, with both continuing to be supported for the forseeable
future but the legacy one likely becoming increasingly more deprecated as
it ages.
@codecov
Copy link

codecov bot commented Dec 2, 2020

Codecov Report

Merging #27067 (cb8bb69) into master (0346eff) will decrease coverage by 0.02%.
The diff coverage is 55.01%.

Impacted Files Coverage Δ
command/cliconfig/cliconfig.go 0.00% <0.00%> (-48.30%) ⬇️
command/cliconfig/legacy_credentials.go 59.85% <0.00%> (ø)
command/cliconfig/legacy_unix.go 0.00% <0.00%> (ø)
command/cliconfig/provider_installation.go 0.00% <ø> (-63.10%) ⬇️
commands.go 0.67% <0.00%> (ø)
command/cliconfig/legacy.go 49.65% <49.65%> (ø)
command/cliconfig/legacy_provider_installation.go 65.43% <65.43%> (ø)
checkpoint.go 31.57% <100.00%> (ø)
main.go 39.63% <100.00%> (ø)
plugins.go 66.66% <100.00%> (ø)
... and 9 more

Base automatically changed from master to main February 24, 2021 18:01
@hashicorp-cla
Copy link

hashicorp-cla commented Mar 12, 2022

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants