Skip to content

v1.10 backport: Functions that allow marks must also deal with unknown values#35985

Merged
jbardin merged 8 commits intov1.10from
jbardin/backport-35981
Nov 11, 2024
Merged

v1.10 backport: Functions that allow marks must also deal with unknown values#35985
jbardin merged 8 commits intov1.10from
jbardin/backport-35981

Conversation

@jbardin
Copy link
Copy Markdown
Member

@jbardin jbardin commented Nov 11, 2024

Backport

Backport of #35981

The below text is copied from the body of the original PR.


You can't deal with marks in a function without also dealing with unknowns. If AllowMarked is true, but AllowKnown is not, the caller will short-circuit evaluation with an unknown, without being able to deal with marks from all arguments. The cty package can't guarantee that an unknown value contains all possible marks (some functions could alter marks based on the value), but it definitely helps to catch unexpected marks as early as possible during evaluation.


Overview of commits

@jbardin jbardin merged commit 1c71bb5 into v1.10 Nov 11, 2024
@jbardin jbardin deleted the jbardin/backport-35981 branch November 11, 2024 18:54
@github-actions
Copy link
Copy Markdown
Contributor

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

@github-actions
Copy link
Copy Markdown
Contributor

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant