Closed jessfraz closed 7 years ago
yeah, i need to create a regression test to specifically cover this. i just wish the trace output here:
| ? revisit github.com/golang/notexist to add 1 pkgs
indicated which package it was trying add :/
We figured out what the problem is - there's a filepath.Clean()
call in the bowels of gps.PackageTree.ExternalReach()
, which causes slashes to get normalized back to os.Separator
. It's ephemeral, so we don't see the results emerge anywhere outside of the method call, but the normalized path is used to do prefix checking.
Thus, on a windows machine, github.com/golang/notexist
is mistaken as NOT being a prefix of github.com/golang/notexist/foo/bar
, and the solver ends up trying to revisit something in the root project. 💥 💥
I need to figure out if that filepath.Clean()
call is even necessary. IIRC, my original intent was to use it to deal with weird relative import path situations, but I'm not actually sure if that's really possible anymore at that point, or if it's even worth dealing with the situation when it arises.
should be all solved now
happening on solve when packages are nested in root project: