-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cue/load: evaluate only those packages which are needed
This change changes the cue/load logic to expand package wildcards before invoking the `modpkgload.LoadPackages` resolution logic. This involves moving the wildcard expansion code into a new place, independent of the `cue/load.loader` which is created after doing that. We use the `modimports.AllModuleFiles` logic to enumerate the packages matched by a wildcard. This then removes the need to enumerate all packages in the entire module, because we know all the packages up front. This only works because we do not allow wildcard matching in external packages (something that is not currently supported anyway) which would require integrating the matching logic directly into `modload` which is a considerably larger refactor which we'll punt on for now. It would be nice to remove the previous wildcard matching logic, but unfortunately the current behavior relies on wildcards matching directories with no CUE files, which doesn't fit well with the way that the module file enumeration happens, so leave the old logic in place which considerably reduces the number of visible behavior changes. Fixes #3155. Signed-off-by: Roger Peppe <rogpeppe@gmail.com> Change-Id: I9f4b210eb0588e21ae942a97d7cf34c9887363dc
- Loading branch information
Showing
16 changed files
with
446 additions
and
94 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
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
Oops, something went wrong.