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

Eliminate use of Eval() in encoding/cue and any internal helpers #60

Open
sdboyer opened this issue Jul 22, 2022 · 0 comments
Open

Eliminate use of Eval() in encoding/cue and any internal helpers #60

sdboyer opened this issue Jul 22, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@sdboyer
Copy link
Contributor

sdboyer commented Jul 22, 2022

In the formatters introduced in e.g. in #56 and #59, there are a number of calls to cue.Value.Eval(). IIRC, i used these originally as a quick hack to eliminate printed references to the lineage's joinSchema.

I knew it was suboptimal at the time and left in a bunch of TODOs to remove, but the immediate impacts of doing it did not occur to me. Now that i've tried it against Grafana's dashboard lineage, though, i realized that the eval call definitely eliminates field/list comprehensions. That changes the semantics of the dashboard, which needs those for its (current approach to) composition.

While that hacky composition approach is almost certain to change with #8 - like, that comprehension should probably not be in the body of the schema - it just emphasized to me just how important it is to preserve the original, textual input from the user for these cases.

@sdboyer sdboyer added the bug Something isn't working label Jul 22, 2022
@sdboyer sdboyer self-assigned this Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant