-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cue/load: do not create packages unnecessarily for files outside pack…
…age directory The current logic creates instances for files outside a package's directory even when those have nothing to do with the package in question. Change the logic so that when a file in a parent directory is added, an instance is only created when that file's package matches one of the packages in the original directory. Note: this is only an issue when `PkgName` is set to `*` to load all packages. Note also: this fixes some of the existing behavior, as witness the other test result changes that mention `anon.cue` where that file is actually irrelevant and should not be included as part of the instance (packageless CUE files never include packageless CUE files from parent directories). Fixes #3306 Signed-off-by: Roger Peppe <[email protected]> Change-Id: I7f158b70f5d64068aa031b063aaca5680d738132 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1198686 Reviewed-by: Daniel Martí <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
- Loading branch information
Showing
3 changed files
with
46 additions
and
60 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