this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cue/load: set the absolute file name when setting source

This means that when the file is decoded, the `internal/encoding.NewDecoder`
logic can find it, even though `internal/encoding.Config` doesn't
contain a directory field to interpret relative file paths.

This fixes a test failure that happens when the modules experiment
flag is enabled by default.

Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: Ia606ce2dc0fca816f3986c24fda96041862b0297
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194830
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>

+2
+2
cue/load/import.go
··· 250 250 } 251 251 if !filepath.IsAbs(fullPath) { 252 252 fullPath = filepath.Join(cfg.Dir, fullPath) 253 + // Ensure that encoding.NewDecoder will work correctly. 254 + f.Filename = fullPath 253 255 } 254 256 if fi := cfg.fileSystem.getOverlay(fullPath); fi != nil { 255 257 if fi.file != nil {