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

Iainlane/move impl outwards #916

Closed
wants to merge 3 commits into from
Closed

Conversation

iainlane
Copy link
Member

No description provided.

julienduchesne and others added 3 commits August 23, 2023 20:54
Tanka currently evals jsonnet using the Go native code.
However, some other implementations have come up in the past years that could be worth using (ex: https://github.com/CertainLach/jrsonnet, which is much faster)

In this PR is the first step: I create an interface where all the jsonnet eval code happens. The Go Jsonnet implementation is now hidden behind this interface.

The setting can either be passed as a global flag or as an env spec attribute to be used when exporting (`spec.exportJsonnetImplementation`)
`VM` -> `Evaluator`
Add some docstrings
Add some comments
Add the `path` as a struct member of the Go-jsonnet implementation. We
have this available when we construct the loader. This lets us then drop
the same argument from `EvaluateAnonymousSnippet()` in the interface -
as not all implementations need it.
@github-actions
Copy link

github-actions bot commented Aug 24, 2023

PR Preview Action v1.4.4
Preview removed because the pull request was closed.
2023-08-24 17:37 UTC

@iainlane iainlane closed this Aug 24, 2023
julienduchesne added a commit that referenced this pull request Aug 24, 2023
Since #916, the JsonnetImplementation option is not used in the jsonnet package, so the jsonnet package doesn't need to know it
This removes the option there and shift it up to the `tanka.Opts` struct which is where the jsonnet implementation to use is determined
julienduchesne added a commit that referenced this pull request Aug 25, 2023
Since #916, the JsonnetImplementation option is not used in the jsonnet package, so the jsonnet package doesn't need to know it
This removes the option there and shift it up to the `tanka.Opts` struct which is where the jsonnet implementation to use is determined
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.

None yet

2 participants