"log"
"os"
"path"
- "path/filepath"
)
func sourcesWalker(tgts []string) ([]string, error) {
seen := make(map[string]struct{}, 1<<10)
for _, tgt := range tgts {
- tgtAbsPath, err := filepath.Abs(path.Join(Cwd, tgt))
- if err != nil {
- panic(err)
- }
+ tgtAbsPath := mustAbs(path.Join(Cwd, tgt))
cwd, f := path.Split(path.Join(Cwd, tgt))
fdDep, err := os.Open(path.Join(cwd, RedoDir, f+DepSuffix))
if err != nil {
}
for _, m := range depInfo.ifchanges {
depTgt := m["Target"]
- depTgtAbsPath, err := filepath.Abs(path.Join(cwd, depTgt))
- if err != nil {
- panic(err)
- }
+ depTgtAbsPath := mustAbs(path.Join(cwd, depTgt))
if isSrc(cwd, depTgt) {
seen[cwdMustRel(depTgtAbsPath)] = struct{}{}
} else if depTgtAbsPath != tgtAbsPath {