-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cue/load: move towards unified syntax cache
In order to to fix issue #3177, we need a cache that's shared between the module code in `internal/mod/...` and the `cue/load` package, which means that the syntax cache needs to be pushed down to a lower level in `cue/load` because currently it's based around cue/load-specific abstractions. This CL is an incremental progression towards that goal: it adds a `getCUESyntax` method to the internal filesystem abstraction in `cue/load`, which will become a cache in a subsequent CL. In order to do this, some refactoring was required, namely removal of the `matchFile` function, because that function read data without parsing the CUE, but the parsing and reading operations now need to be implemented by the same operation (the new `getCUESyntax` method). In any case, the `matchFile` function did not really fulfil its original purpose or fit the name any more. Also remove the return value from `fileProcessor.add` while we're refactoring it, because nothing uses it. For #3177. Signed-off-by: Roger Peppe <[email protected]> Change-Id: I1876f22b99a5c611e3d8650d3b7afb8f8e43f202 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1197525 Unity-Result: CUE porcuepine <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Paul Jolly <[email protected]>
- Loading branch information
Showing
5 changed files
with
108 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters