From f76bd983e21f87e4f24c5e74d5d31d2a3c944f51 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Sun, 25 Feb 2018 12:19:00 +0100 Subject: [PATCH] Revert "Merge pull request #26139 from JuliaLang/sk/checked-out" This reverts commit b098bdc553b1754e9476b9e391467088e148cd05, reversing changes made to b1189ce2d52c54b43c079b9644e7eb77f9cd6e8f. --- base/loading.jl | 14 ++------------ test/project/Manifest.toml | 4 +++- test/project/deps/Bar/Project.toml | 6 ------ 3 files changed, 5 insertions(+), 19 deletions(-) delete mode 100644 test/project/deps/Bar/Project.toml diff --git a/base/loading.jl b/base/loading.jl index 65b9af7d15f55..3a33e0f3ece77 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -515,8 +515,8 @@ end function explicit_manifest_deps_get(manifest_file::String, where::UUID, name::String)::Union{Bool,UUID} open(manifest_file) do io + uuid = deps = nothing state = :other - uuid = deps = path = nothing for line in eachline(io) if contains(line, re_array_of_tables) uuid == where && break @@ -525,8 +525,6 @@ function explicit_manifest_deps_get(manifest_file::String, where::UUID, name::St elseif state == :stanza if (m = match(re_uuid_to_string, line)) != nothing uuid = UUID(m.captures[1]) - elseif (m = match(re_path_to_string, line)) != nothing - path = String(m.captures[1]) elseif (m = match(re_deps_to_any, line)) != nothing deps = String(m.captures[1]) elseif contains(line, re_subsection_deps) @@ -541,15 +539,7 @@ function explicit_manifest_deps_get(manifest_file::String, where::UUID, name::St end end uuid == where || return false - if deps == nothing - (state == :deps || path == nothing) && return true - path = abspath(dirname(manifest_file), path) - project_file = env_project_file(path) - project_file isa String && - return explicit_project_deps_get(project_file, name) - pkg = identify_package(name) - return pkg == nothing || pkg.uuid - end + deps == nothing && return true # TODO: handle inline table syntax if deps[1] != '[' || deps[end] != ']' @warn "Unexpected TOML deps format:\n$deps" diff --git a/test/project/Manifest.toml b/test/project/Manifest.toml index 6eaea1cb40ec4..644823028ace2 100644 --- a/test/project/Manifest.toml +++ b/test/project/Manifest.toml @@ -12,6 +12,9 @@ path = "deps/Foo2.jl" [[Bar]] uuid = "2a550a13-6bab-4a91-a4ee-dff34d6b99d0" path = "deps/Bar" + [Bar.deps] + Baz = "6801f525-dc68-44e8-a4e8-cabd286279e7" + Foo = "6f418443-bd2e-4783-b551-cdbac608adf2" [[Baz]] uuid = "6801f525-dc68-44e8-a4e8-cabd286279e7" @@ -21,6 +24,5 @@ git-tree-sha1 = "efc7e24c53d6a328011975294a2c75fed2f9800a" Qux = "b5ec9b9c-e354-47fd-b367-a348bdc8f909" [[Qux]] -deps = [] uuid = "b5ec9b9c-e354-47fd-b367-a348bdc8f909" path = "deps/Qux.jl" diff --git a/test/project/deps/Bar/Project.toml b/test/project/deps/Bar/Project.toml deleted file mode 100644 index 4a35b12cac7ad..0000000000000 --- a/test/project/deps/Bar/Project.toml +++ /dev/null @@ -1,6 +0,0 @@ -name = "Bar" -uuid = "2a550a13-6bab-4a91-a4ee-dff34d6b99d0" - -[deps] -Baz = "6801f525-dc68-44e8-a4e8-cabd286279e7" -Foo = "6f418443-bd2e-4783-b551-cdbac608adf2"