where the underlying data for the path p changes between evaluations, the evaluator output remains unchanged.
The workaround is to recreate the evaluator at appropriate intervals, but that leads to an overhead when the evaluator is being set up.
Originally created by @kallekoo on GitHub (May 17, 2024).
Hello!
Using pkl-go v0.6.0, when creating an evaluator like so
```go
var opts = func(o *pkl.EvaluatorOptions) {
o.AllowedModules = []string{".+"}
o.AllowedResources = []string{".+"}
o.CacheDir = ""
}
e, err := pkl.NewEvaluator(ctx, opts)
```
and evaluating a FileSource like so
```
s, err := e.EvaluateOutputText(ctx, pkl.FileSource(p))
```
where the underlying data for the path `p` changes between evaluations, the evaluator output remains unchanged.
The workaround is to recreate the evaluator at appropriate intervals, but that leads to an overhead when the evaluator is being set up.
This is expected behaviour. A single evaluator instance caches aggressively. This is how Pkl manages to be deterministic, which is a core design goal.
but that leads to an overhead when the evaluator is being set up
Not caching leads to overhead everywhere else.
@holzensp commented on GitHub (May 17, 2024):
This is expected behaviour. A single evaluator instance caches aggressively. This is how Pkl manages to be deterministic, which is a core design goal.
> but that leads to an overhead when the evaluator is being set up
Not caching leads to overhead _everywhere else_.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @kallekoo on GitHub (May 17, 2024).
Hello!
Using pkl-go v0.6.0, when creating an evaluator like so
and evaluating a FileSource like so
where the underlying data for the path
pchanges between evaluations, the evaluator output remains unchanged.The workaround is to recreate the evaluator at appropriate intervals, but that leads to an overhead when the evaluator is being set up.
@holzensp commented on GitHub (May 17, 2024):
This is expected behaviour. A single evaluator instance caches aggressively. This is how Pkl manages to be deterministic, which is a core design goal.
Not caching leads to overhead everywhere else.