This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/core/export: don't embed proper conjuncts
This now makes the distinction between conjuncts and embeddings, fixing a bug that resulted from the slight semantics changes in embeddings introduced in https://cue-review.googlesource.com/c/cue/+/8229 Note that scalar values can still always be embedded as it doesn't affect closedness. Also recersively nested embeddings can be merged. Nested closed conjunctions need to remain conjunctions. Change-Id: I14c1a30802132effe0c6c27a4a8e363236df5771 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/8363 Reviewed-by: CUE cueckoo <cueckoo@gmail.com> Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
- Loading branch information
Showing
8 changed files
with
190 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,7 @@ package foo | |
|
||
import "acme.com/pkg" | ||
|
||
a: { | ||
pkg.#A | ||
a: pkg.#A & { | ||
_val: 3 | ||
_#val: 6 | ||
} | ||
|
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,102 @@ | ||
-- in.cue -- | ||
#A: { | ||
_ | ||
#a: string | ||
} | ||
|
||
#E: {_} | ||
#F: {_} | ||
#G: {_} | ||
|
||
#B: #A & { | ||
{ 2, #def: 3 } | ||
2 | ||
#E & #F | ||
#f: int | ||
{ | ||
_ | ||
#bar: int | ||
#G | ||
} | ||
|
||
} | ||
-- out/definition -- | ||
#A: { | ||
#a: string | ||
} | ||
#E: {} | ||
#F: {} | ||
#G: {} | ||
#B: #A & { | ||
#E & #F | ||
#G | ||
2 | ||
#f: int | ||
#def: 3 | ||
#bar: int | ||
} | ||
-- out/doc -- | ||
[] | ||
[#A] | ||
[#A #a] | ||
[#E] | ||
[#F] | ||
[#G] | ||
[#B] | ||
[#B #a] | ||
[#B #def] | ||
[#B #bar] | ||
[#B #f] | ||
-- out/value -- | ||
== Simplified | ||
{} | ||
== Raw | ||
{ | ||
#A: { | ||
#a: string | ||
} | ||
#E: {} | ||
#F: {} | ||
#G: {} | ||
#B: { | ||
2 | ||
#a: string | ||
#f: int | ||
#def: 3 | ||
#bar: int | ||
} | ||
} | ||
== Final | ||
{} | ||
== All | ||
{ | ||
#A: { | ||
#a: string | ||
} | ||
#E: {} | ||
#F: {} | ||
#G: {} | ||
#B: { | ||
2 | ||
#a: string | ||
#f: int | ||
#def: 3 | ||
#bar: int | ||
} | ||
} | ||
== Eval | ||
{ | ||
#A: { | ||
#a: string | ||
} | ||
#E: {} | ||
#F: {} | ||
#G: {} | ||
#B: { | ||
2 | ||
#a: string | ||
#f: int | ||
#def: 3 | ||
#bar: int | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.