-
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.
This step prepares for duplicating much of the loader logic so that it can be modified for module loading. It factors out functions that can (probably) be used by both implementations into `loader_common.go` and defines an interface type that contains the loader methods that are actually used by the driving logic outside. There are still other bits which can/should be refactored, but this is a start. The only externally visible behavior that changes as a result of this CL is that when there's an invalid import path, the `Instance.Dir` field is not populated because there's no loader-agnostic way of finding the absolute path of an invalid import path (and the result was questionable anyway, so it's hopefully very unlikely that users will be relying on that particular behavior). Signed-off-by: Roger Peppe <rogpeppe@gmail.com> Change-Id: I8357850fbcca7ef394498df7deae929b28652d68 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/549500 Unity-Result: CUEcueckoo <cueckoo@cuelang.org> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>
- Loading branch information
Showing
9 changed files
with
155 additions
and
132 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
Oops, something went wrong.