Commit Graph

21 Commits

Author SHA1 Message Date
Andrei Ciobanu
013097b631 Ephemeral variables (#3108)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-09-10 07:45:23 -04:00
Martin Atkins
b54e9af291 lang/marks: Additional unit test for diagnostic generation from expr
The handling of deprecation marks is currently tested mainly in a context
test (i.e. integration test) over in package tofu, but it's nice to also
have some nearby unit test coverage and so this is an initial step in that
direction which we could choose to extend in later commits.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-09-09 10:07:29 -07:00
Martin Atkins
e6955dd824 lang/marks: Use lower-overhead cty functions for marks
In the previous commit we upgraded to cty v1.17.0, which already gave us
some performance improvements for functions like UnmarkDeepWithPaths.

However, this release also includes some new functions that allow more
surgical work with marks, and so we can get some additional gains by using
those in the codepaths related to deprecation tracking.

In particular, using WrangleMarksDeep instead of UnmarkDeepWithPaths means
that we can tell cty that we only want to remove the deprecation-related
marks, and so when given a value that contains only non-deprecation-related
marks it can avoid constructing a new cty.Value altogether, and instead
just return the one that was given. In the case where there _are_
deprecation-related marks, it will rebuild only the parts of the data
structure that lead to those marks. Deprecation-related marks are rare in
practice, so this should be a relatively good payoff.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-09-09 10:07:29 -07:00
Christian Mesh
fd4e426a12 Fix test crash when using deprecated outputs in the root module (#3249)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-09-05 14:41:32 -04:00
James Humphries
c5fd93482a Fix crash in unmarkDeepWithPathsDeprecated (#3105)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
Signed-off-by: James Humphries <James@james-humphries.co.uk>
Co-authored-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-08-06 15:40:19 +01:00
Andrei Ciobanu
4077c3d84f Feature branch: Ephemeral resources (#2852)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-08-04 16:39:12 +03:00
Diógenes Fernandes
5fb4a1aed2 Using a Key on ExtraInfo to differentiate between Consolidation Warnings (#3036)
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
Signed-off-by: Diógenes Fernandes <diofeher@gmail.com>
2025-07-24 12:20:57 -03:00
Christian Mesh
8ee707b3e6 Fix lint issues in internal/lang (#2786)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-05-09 13:53:34 -07:00
Andrei Ciobanu
22dc9b2137 Add new CLI arg to control what warnings should be shown for deprecated outputs/variables (#2705)
Signed-off-by: yottta <andrei.ciobanu@opentofu.org>
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-05-08 17:01:40 +03:00
Oleksandr Levchenkov
82d71e50e8 add deprecation warnings support for terraform_remote_state (#2679)
Signed-off-by: ollevche <ollevche@gmail.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: Christian Mesh <christianmesh1@gmail.com>
2025-04-25 12:26:28 +03:00
Oleksandr Levchenkov
2bcd0e7d57 add deprecation marks for module outputs (#2633)
Signed-off-by: ollevche <ollevche@gmail.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: Christian Mesh <christianmesh1@gmail.com>
2025-04-24 11:16:06 -04:00
namgyalangmo
cb2e9119aa Update copyright notice (#1232)
Signed-off-by: namgyalangmo <75657887+namgyalangmo@users.noreply.github.com>
2024-02-08 09:48:59 +00:00
Yaron Yarimi
059190f273 Rename multiple packages to OpenTofu (#488) 2023-09-20 15:59:27 +03:00
RLRabinowitz
650b1a339a Adjust mentions of terraform in internal/lang 2023-08-23 11:12:15 +03:00
hashicorp-copywrite[bot]
325d18262e [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
Martin Atkins
49d7c879ac Fix problems caught by staticcheck v0.3.0
This will allow us to upgrade to this version in a later commit without
causing the our build checks to fail.
2022-04-04 08:12:44 -07:00
Alisdair McDiarmid
843c50e8ce lang: Further limit the console-only type function
This commit introduces a capsule type, `TypeType`, which is used to
extricate type information from the console-only `type` function. In
combination with the `TypeType` mark, this allows us to restrict the use
of this function to top-level display of a value's type. Any other use
of `type()` will result in an error diagnostic.
2022-02-10 06:12:58 -05:00
James Bardin
80ef795cbf add marks.Raw 2021-06-25 14:27:43 -04:00
James Bardin
cdf7469efd marks.Has and marks.Contains 2021-06-25 14:17:03 -04:00
James Bardin
d9dfd451ea update to use typed sensitive marks 2021-06-25 12:49:07 -04:00
James Bardin
2c493e38c7 marks package
marks.Sensitive
2021-06-25 12:35:51 -04:00