From 1d74efccb0e22342cfc30260ad0992afc0d81696 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Thu, 12 Oct 2017 02:16:20 -0500 Subject: [PATCH] Normalize dependency paths On Windows just a difference in backslash/forwardslash can cause a matching failure, but we shouldn't care about such differences. --- base/loading.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base/loading.jl b/base/loading.jl index a539fadd26a76..0ecdeb6e58469 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -218,7 +218,7 @@ function _include_dependency(modstring::AbstractString, _path::AbstractString) path = joinpath(dirname(prev), _path) end if _track_dependencies[] - push!(_require_dependencies, (modstring, path, mtime(path))) + push!(_require_dependencies, (modstring, normpath(path), mtime(path))) end return path, prev end @@ -733,6 +733,10 @@ function read_dependency_src(io::IO, filename::AbstractString) modules, files, required_modules, srctextpos = parse_cache_header(io) srctextpos == 0 && error("no source-text stored in cache file") seek(io, srctextpos) + _read_dependency_src(io, filename) +end + +function _read_dependency_src(io::IO, filename::AbstractString) while !eof(io) filenamelen = ntoh(read(io, Int32)) filenamelen == 0 && break