While working on #4266, I realized that the file paths we write to a lock file are platform specific. Specifically, on Windows, we use \ as a path separator, while on Unix, we use / as a path separator. I believe this implies that if developers on Windows and Unix work on the same project, they will generate different lock files. This is, I believe, untenable.
I think we either need to find a way to not write file paths to a lock file at all (this is what Cargo does), or we need to ensure we normalize all file paths into a portable representation.
It's not clear to me that the latter is strictly possible in all cases, but I think we are always writing Unix paths to requirements.txt by either converting \ to /, or using file URLs.