From b55bec357b9c281ff6fb99d87692ba9b97f8e583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Bayo=C3=A1n=20Santiago=20Calder=C3=B3n=20=28?= =?UTF-8?q?=E5=8F=B2=E5=BF=97=E9=BC=8E=29?= Date: Wed, 22 Nov 2017 15:02:26 -0600 Subject: [PATCH 1/6] Address breaking change on nightly Fix to [225](https://github.com/JuliaIO/JSON.jl/issues/225) --- src/Writer.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Writer.jl b/src/Writer.jl index bee8829..5f93a6c 100644 --- a/src/Writer.jl +++ b/src/Writer.jl @@ -1,5 +1,6 @@ module Writer +import Dates using ..Common using ..Serializations: Serialization, StandardSerialization, CommonSerialization From f9c2199466456fbee8a73f73809f27156b518dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Bayo=C3=A1n=20Santiago=20Calder=C3=B3n=20=28?= =?UTF-8?q?=E5=8F=B2=E5=BF=97=E9=BC=8E=29?= Date: Wed, 22 Nov 2017 15:05:06 -0600 Subject: [PATCH 2/6] Compatibility fix --- src/Writer.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Writer.jl b/src/Writer.jl index 5f93a6c..9601a12 100644 --- a/src/Writer.jl +++ b/src/Writer.jl @@ -1,6 +1,8 @@ module Writer -import Dates +if VERSION >= v"0.7.0-DEV.2575" + import Dates +end using ..Common using ..Serializations: Serialization, StandardSerialization, CommonSerialization From 2095cd9bfa4c2aee8291db9254e9a2ddde2adf02 Mon Sep 17 00:00:00 2001 From: Nosferican Date: Fri, 24 Nov 2017 02:22:00 -0600 Subject: [PATCH 3/6] Compat to handle Dates --- REQUIRE | 2 +- src/Writer.jl | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/REQUIRE b/REQUIRE index e0ee8c3..8aee958 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,2 +1,2 @@ julia 0.6 -Compat 0.33.0 +Compat 0.37.0 diff --git a/src/Writer.jl b/src/Writer.jl index 9601a12..4d21c1d 100644 --- a/src/Writer.jl +++ b/src/Writer.jl @@ -1,8 +1,6 @@ module Writer -if VERSION >= v"0.7.0-DEV.2575" - import Dates -end +using Compat using ..Common using ..Serializations: Serialization, StandardSerialization, CommonSerialization From 81fd7389840e3d78226c16f7bfd80c5bc1cc69e8 Mon Sep 17 00:00:00 2001 From: Nosferican Date: Fri, 24 Nov 2017 03:41:50 -0600 Subject: [PATCH 4/6] Added Compat.Dates --- src/Writer.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Writer.jl b/src/Writer.jl index 4d21c1d..7bf4905 100644 --- a/src/Writer.jl +++ b/src/Writer.jl @@ -1,6 +1,6 @@ module Writer -using Compat +using Compat.Dates using ..Common using ..Serializations: Serialization, StandardSerialization, CommonSerialization From 7eefadc5d9d31c779d505296acc14918112b673c Mon Sep 17 00:00:00 2001 From: Nosferican Date: Fri, 24 Nov 2017 03:43:59 -0600 Subject: [PATCH 5/6] Added Compat.Dates to all files that required it --- test/REQUIRE | 2 +- test/lowering.jl | 1 + test/runtests.jl | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/REQUIRE b/test/REQUIRE index e191e81..4878360 100644 --- a/test/REQUIRE +++ b/test/REQUIRE @@ -1,4 +1,4 @@ DataStructures FixedPointNumbers OffsetArrays -Compat 0.31.0 +Compat 0.37.0 diff --git a/test/lowering.jl b/test/lowering.jl index 3eaad5f..55dca05 100644 --- a/test/lowering.jl +++ b/test/lowering.jl @@ -2,6 +2,7 @@ module TestLowering using JSON using Compat.Test +using Compat.Dates using FixedPointNumbers: Fixed if isdefined(Base, :Dates) diff --git a/test/runtests.jl b/test/runtests.jl index e27310c..8d1f013 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,6 +1,7 @@ using JSON using Compat.Test using Compat +using Compat.Dates using OffsetArrays import DataStructures From 32b4dc9688f12e7ee272fc4c94b385b97d70a84c Mon Sep 17 00:00:00 2001 From: Fengyang Wang Date: Fri, 24 Nov 2017 15:00:39 -0500 Subject: [PATCH 6/6] Remove isdefined(Base, :Dates) check --- test/lowering.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/lowering.jl b/test/lowering.jl index 55dca05..f4b8a35 100644 --- a/test/lowering.jl +++ b/test/lowering.jl @@ -5,9 +5,7 @@ using Compat.Test using Compat.Dates using FixedPointNumbers: Fixed -if isdefined(Base, :Dates) - @test JSON.json(Date(2016, 8, 3)) == "\"2016-08-03\"" -end +@test JSON.json(Date(2016, 8, 3)) == "\"2016-08-03\"" @test JSON.json(:x) == "\"x\"" @test_throws ArgumentError JSON.json(Base)