-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cue/interpreter/embed: error when embed is not in a module
The embed proposal is designed for CUE files within a module. Standalone CUE files should not be able to read arbitrary files inside the current directory unless they are being interpreted in the context of a module. We also need to fix the `encoding/jsonschema/internal/externaltest` package because it was using `ModuleRoot` inappropriately. When it's a relative path, that field is treated relative to `Dir`, but we were using it as if it were relative to the current directory. We also need to fix a few tests that were using embedding with CUE code that wasn't inside a module. Fixes #3530 Signed-off-by: Roger Peppe <rogpeppe@gmail.com> Change-Id: I2f06be29e6a3b15182c1b9c4a849e9e0c35ba0ff Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1203264 Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
- Loading branch information
Showing
7 changed files
with
24 additions
and
3 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module: "cue.example" | ||
language: { | ||
version: "v0.11.0" | ||
} |