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

Update types.Unknown with attribute trails #776

Merged
merged 3 commits into from
Jul 18, 2023

Conversation

TristonianJones
Copy link
Collaborator

@TristonianJones TristonianJones commented Jul 12, 2023

Update the types.Unknown definition.

Breaking change

Use *types.Unknown rather than types.Unknown during
type casting as the underlying type has changed from a slice
to a structured object.

Specifically, shift types.Unknown from a simple list of ints
to a structured object which contains the set of unknown
expression ids, as well as the attribute trails associated with
each.

In the future this object may be further augmented with
information about missing function invocations.

Closes #771

@TristonianJones TristonianJones marked this pull request as ready for review July 12, 2023 06:46
@TristonianJones
Copy link
Collaborator Author

FYI @josephschorr

common/types/unknown.go Outdated Show resolved Hide resolved
common/types/unknown_test.go Show resolved Hide resolved
interpreter/interpreter_test.go Show resolved Hide resolved
Additional test cases provided for unknown string formatting
as well as for handling unknown field selections across numeric
types.

This change also revealed an issues with how custom attribute
factorie qualifiers were not being tracked correctly during
state-tracking, nor was the type information correctly collected
for array index operations.
@TristonianJones
Copy link
Collaborator Author

@jnthntatum PTAL, thanks!

@TristonianJones TristonianJones merged commit bad352c into google:master Jul 18, 2023
2 checks passed
@TristonianJones TristonianJones deleted the useful-unknown branch July 18, 2023 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include missing attributes on types.Unknown
2 participants