-
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.
mod/module: improve handling of Qualifier in ImportPath
This change fixes a couple of issues with `module.ImportPath`: - it only sets `Qualifier` when it's a valid identifier - it always includes the package qualifier when it's needed. This exposes an issue with the cue/load logic: it was ignoring an error when it should not be. We fix that with a minor refactoring of the `absDirFromImportPath` logic. As the error from determining the name from the import path seems independent of the error from trying to get the package, it feels like it's better exposed as an extra error. For #3155. Signed-off-by: Roger Peppe <rogpeppe@gmail.com> Change-Id: Id14ed268b7c5e77b92b8fe853656479d7254130f Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1195193 Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> Reviewed-by: Chief Cueckoo <chief.cueckoo@gmail.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
- Loading branch information
Showing
5 changed files
with
39 additions
and
42 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