-
Notifications
You must be signed in to change notification settings - Fork 640
Comparing changes
Open a pull request
base repository: hashicorp/hcl
base: v2.12.0
head repository: hashicorp/hcl
compare: v2.13.0
- 13 commits
- 161 files changed
- 5 contributors
Commits on Apr 1, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 4fd729c - Browse repository at this point
Copy the full SHA 4fd729cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e304a4 - Browse repository at this point
Copy the full SHA 3e304a4View commit details
Commits on Apr 22, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 5cff078 - Browse repository at this point
Copy the full SHA 5cff078View commit details
Commits on May 17, 2022
-
deps: update crypto dependency for macOS support
Not sure if this is M1 specific or just newer versions of macOS altogether, but hclfmt cannot be installed with the transitive dependency on `golang.org/x/sys@v0.0.0-20190502175342-a43fa875dd82` caused by the dependency on `golang.org/x/crypto`. Update the crypto library so that a newer version of sys gets pulled in, which compiles fine.
Configuration menu - View commit details
-
Copy full SHA for 8927e75 - Browse repository at this point
Copy the full SHA 8927e75View commit details
Commits on May 20, 2022
-
Merge pull request #522 from hashicorp/update-deps-for-macos
deps: update crypto dependency for macOS support
Configuration menu - View commit details
-
Copy full SHA for d0c4fa8 - Browse repository at this point
Copy the full SHA d0c4fa8View commit details
Commits on Jun 14, 2022
-
hclwrite: fix data race modifying the internal "nilToken" variable
This global variable is supposed to be treated as immutable.
Configuration menu - View commit details
-
Copy full SHA for 63d288b - Browse repository at this point
Copy the full SHA 63d288bView commit details -
Configuration menu - View commit details
-
Copy full SHA for efb710f - Browse repository at this point
Copy the full SHA efb710fView commit details -
go.mod: Specify that we use the Go 1.17 language in this module
The main motivation here is that we were apparently using bit shifting with signed shift amounts even though modern Go toolchains seem to raise that as an error if the go.mod file selects a language version less than Go 1.13. Go 1.17 is therefore newer than we strictly need to solve that particular problem, but gets us caught up with a relatively release of the language. This alone doesn't break compatibility for anyone using older versions of Go with HCL, since the Go toolchain will still attempt to compile modules targeting later versions and will only mention the newer language version if compilation would already have failed for some other reason.
Configuration menu - View commit details
-
Copy full SHA for c3b6715 - Browse repository at this point
Copy the full SHA c3b6715View commit details
Commits on Jun 21, 2022
-
Configuration menu - View commit details
-
Copy full SHA for c020cb9 - Browse repository at this point
Copy the full SHA c020cb9View commit details -
Merge pull request #508 from hashicorp/go118fuzz
Port fuzz testing to Go 1.18 native fuzzing
Configuration menu - View commit details
-
Copy full SHA for 986b881 - Browse repository at this point
Copy the full SHA 986b881View commit details
Commits on Jun 22, 2022
-
hcl: Allow individual diagnostics to carry extra information
The primary goal of the diagnostics design in HCL is to return high-quality diagnostics messages primarily for human consumption, and so their regular structure is only machine-processable in a general sense where we treat all diagnostics as subject to the same processing. A few times now we've ended up wanting to carry some additional optional contextual information along with the diagnostic, for example so that a more advanced diagnostics renderer might optionally annotate a diagnostic with extra notes to help the reader debug. We got pretty far with our previous extension of hcl.Diagnostic to include the Expression and EvalContext fields, which allow an advanced diagnostic renderer to offer hints about what values contributed to the expression that failed, but some context is even more specific than that, or is defined by the application itself and therefore not appropriate to model directly here in HCL. As a pragmatic compromise then, here we introduce one more field Extra to hcl.Diagnostic, which comes with a documented convention of placing into it situation-specific values that implement particular interfaces, and therefore a diagnostics renderer or other consumer can potentially "sniff" this field for particular interfaces it knows about and treat them in a special way if present. Since there is only one field here that might end up being asked to capture multiple extra values as the call stack unwinds, there is also a simple predefined protocol for "unwrapping" extra values in order to find nested implementations within. For callers that are prepared to require Go 1.18, the helper function hcl.DiagnosticExtra provides a type-assertion-like mechanism for sniffing for a particular interface type while automatically respecting the nesting protocol. For the moment that function lives behind a build constraint so that callers which are not yet ready to use Go 1.18 can continue to use other parts of HCL, and can implement a non-generic equivalent of this function within their own codebase if absolutely necessary. As an initial example to demonstrate the idea I've also implemented some extra information for error diagnostics returned from FunctionCallExpr, which gives the name of the function being called and, if the diagnostic is describing an error returned by the function itself, a direct reference to the raw error value returned from the function call. I anticipate a diagnostic renderer sniffing for hclsyntax.FunctionCallDiagExtra to see if a particular diagnostic is related to a function call, and if so to include additional context about the signature of that function in the diagnostic messages (by correlating with the function in the EvalContext functions table). For example: While calling: join(separator, list) An example application-specific "extra value" could be for Terraform to annotate diagnostics that relate to situations where an unknown value is invalid, or where a "sensitive" value (a Terraform-specific value mark) is invalid, so that the diagnostic renderer can avoid distracting users with "red herring" commentary about unknown or sensitive values unless they seem likely to be relevant to the error being printed.
Configuration menu - View commit details
-
Copy full SHA for 88ecd13 - Browse repository at this point
Copy the full SHA 88ecd13View commit details -
Configuration menu - View commit details
-
Copy full SHA for ee5af8c - Browse repository at this point
Copy the full SHA ee5af8cView commit details -
Configuration menu - View commit details
-
Copy full SHA for bc4516e - Browse repository at this point
Copy the full SHA bc4516eView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v2.12.0...v2.13.0