You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order for the CUE syntax to be shared between cue/load and
internal/mod/modpkgload, it needs to be available in the `io.FS`
implementation passed to `modpkgload`, and thus it can't be inside the
`loader` because that gets created too late, after `modpkgload` has
already been invoked.
So we move the syntax cache into `fileSystem` so it will be easily
available to the `io.FS` implementation.
Also be a little more careful about caching: we make sure that we only
cache file syntax when the parsing is absolutely vanilla, which might be
slightly less efficient, but is very unlikely to make any significant
difference as non-vanilla loading only happens for files explicitly
mentioned on the command line, and those are usually not shared with
files used elsewhere in the build.
Signed-off-by: Roger Peppe <[email protected]>
Change-Id: I282557ffde6af410a237f0a13f91c7c87abf1cef
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1197529
Reviewed-by: Paul Jolly <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
0 commit comments