cue/load: treat all absDirFromImportPath errors as PackageErrors
When `cue fmt` is formatting files, it explicitly checks for,
and ignores, `load.PackageError`. If we fail to load a package
in any way, we should ignore such a failure, so make
all errors returned by `absDirFromImportPath` (the primary
source of such errors), into a `PackageError`.
Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: I3dafe2c7432342ebb96119b29d5b8796979a18d2
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194851
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
authored by