cue/load: more correct treatment of module paths with major versions
Currently if the module path contains a major version,
the cue/load logic naively appends the relative package
path, but that's not correct, as the major version comes after
the import path and before the qualifier.
We can use the `module.ImportPath` logic to correctly form such
an import path.
Also return a `*PackageError` in modules mode too.
Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: I8a703cb92e81161ca06a1f8647985770b69bf9b9
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194789
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>