cue/load: make MultiplePackageError support relative dir paths
cue/errors already knew how to adjust Error.Msg arguments
of type token.Pos so that their filenames are relative.
However, cue/load.MultiplePackageError reported the directory argument
as simply a string, which we cannot safely know is a filename.
Shove the directory name as a token.Position filename,
which ends up working as the line and column numbers are omitted
when left empty. This is mild abuse of the type, hence the note.
However, being able to point to directory "positions" seems useful.
Then teach cue/errors to make both token.Pos and token.Position
argument filenames relative.
Fixes #3703.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I500b343a4f2b2c681a4649d73c3668d09fc2ecf0
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1214888
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Matthew Sackman <matthew@cue.works>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>