From 28c7550199b8eefb7a2101b02554226d79cc1c06 Mon Sep 17 00:00:00 2001 From: Jacob Quinn Date: Wed, 8 Aug 2018 15:12:08 +0100 Subject: [PATCH 1/5] Fixes for 1.0 --- .gitignore | 1 + deps/build.jl | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..66ecdea --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +deps/build.log diff --git a/deps/build.jl b/deps/build.jl index 8263810..411cec8 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -4,10 +4,10 @@ module DefaultDeps if isfile("deps.jl") include("deps.jl") end - if !isdefined(:ROOTENV) + if !(@isdefined ROOTENV) const ROOTENV = abspath(dirname(@__FILE__), "usr") end - if !isdefined(:MINICONDA_VERSION) + if !(@isdefined MINICONDA_VERSION) const MINICONDA_VERSION = "3" end end From 08d9dd00dff847dce97b77c34f43ca69b5460803 Mon Sep 17 00:00:00 2001 From: Jacob Quinn Date: Wed, 8 Aug 2018 15:15:39 +0100 Subject: [PATCH 2/5] Fix another issue in deps/build.jl --- deps/build.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/build.jl b/deps/build.jl index 411cec8..b52591d 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -32,7 +32,7 @@ const ROOTENV = "$(escape_string(ROOTENV))" const MINICONDA_VERSION = "$(escape_string(MINICONDA_VERSION))" """ -if !isfile("deps.jl") || readstring("deps.jl") != deps +if !isfile("deps.jl") || String(read("deps.jl")) != deps write("deps.jl", deps) end From 69a7b60566943730103ed57c3ffdd645a61174e3 Mon Sep 17 00:00:00 2001 From: James Bradbury Date: Thu, 9 Aug 2018 15:15:00 -0700 Subject: [PATCH 3/5] Use `isdefined` on v0.6 The Compat situation for `isdefined`/`@isdefined` is complicated; see https://github.com/JuliaLang/Compat.jl/pull/402. --- deps/build.jl | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/deps/build.jl b/deps/build.jl index b52591d..1ce407b 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -4,11 +4,20 @@ module DefaultDeps if isfile("deps.jl") include("deps.jl") end - if !(@isdefined ROOTENV) - const ROOTENV = abspath(dirname(@__FILE__), "usr") - end - if !(@isdefined MINICONDA_VERSION) - const MINICONDA_VERSION = "3" + if isdefined(Base, Symbol("@isdefined")) + if !(@isdefined ROOTENV) + const ROOTENV = abspath(dirname(@__FILE__), "usr") + end + if !(@isdefined MINICONDA_VERSION) + const MINICONDA_VERSION = "3" + end + else + if !isdefined(:ROOTENV) + const ROOTENV = abspath(dirname(@__FILE__), "usr") + end + if !isdefined(:MINICONDA_VERSION) + const MINICONDA_VERSION = "3" + end end end @@ -32,7 +41,7 @@ const ROOTENV = "$(escape_string(ROOTENV))" const MINICONDA_VERSION = "$(escape_string(MINICONDA_VERSION))" """ -if !isfile("deps.jl") || String(read("deps.jl")) != deps +if !isfile("deps.jl") || read("deps.jl", String) != deps write("deps.jl", deps) end From ba312881d41555efea53a84830ec20358d5d8f4a Mon Sep 17 00:00:00 2001 From: James Bradbury Date: Thu, 9 Aug 2018 15:25:01 -0700 Subject: [PATCH 4/5] Always listen to Yichao --- deps/build.jl | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/deps/build.jl b/deps/build.jl index 1ce407b..15deec6 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -4,20 +4,11 @@ module DefaultDeps if isfile("deps.jl") include("deps.jl") end - if isdefined(Base, Symbol("@isdefined")) - if !(@isdefined ROOTENV) - const ROOTENV = abspath(dirname(@__FILE__), "usr") - end - if !(@isdefined MINICONDA_VERSION) - const MINICONDA_VERSION = "3" - end - else - if !isdefined(:ROOTENV) - const ROOTENV = abspath(dirname(@__FILE__), "usr") - end - if !isdefined(:MINICONDA_VERSION) - const MINICONDA_VERSION = "3" - end + if !isdefined(@__MODULE__, :ROOTENV) + const ROOTENV = abspath(dirname(@__FILE__), "usr") + end + if !isdefined(@__MODULE__, :MINICONDA_VERSION) + const MINICONDA_VERSION = "3" end end From e6625044604de816232b8b38d806bde3c3449edd Mon Sep 17 00:00:00 2001 From: James Bradbury Date: Thu, 9 Aug 2018 15:29:29 -0700 Subject: [PATCH 5/5] using Compat inside submodule --- deps/build.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/deps/build.jl b/deps/build.jl index 15deec6..95f4b91 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -1,6 +1,7 @@ using Compat module DefaultDeps + using Compat if isfile("deps.jl") include("deps.jl") end