Skip to content

Commit 03d08c5

Browse files
felixcremeryeesian
authored andcommitted
Fix deprecation Warnings for julia 0.7 (#52)
* Set julia version to 0.7 for FemtoCleaner * Femtocleaning * Add using LinearAlgebra * Fix Deprecation Warnings * Change CI Julia Version from 0.6 to 0.7 * Remove LinearAlgebra dependency The normalize function should not be dependent on the LinearAlgebra normalize! function. Removes the LinearAlgebra imports. * Update tests to use LibGEOS.normalize!
1 parent f7bcf02 commit 03d08c5

File tree

13 files changed

+139
-122
lines changed

13 files changed

+139
-122
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ os:
33
- osx
44
- linux
55
julia:
6-
- 0.6
6+
- 0.7
77
- nightly
88
matrix:
99
allow_failures:

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
julia 0.6
1+
julia 0.7-alpha
22
GeoInterface 0.2.1
33
BinaryProvider 0.3.0

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
environment:
22
matrix:
3-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
4-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
3+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.7/julia-0.7-latest-win32.exe"
4+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7-latest-win64.exe"
55
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
66
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
77

deps/build.log

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
┌ Warning: Deprecated syntax `try without catch or finally` at /home/qe89hep/.julia/packages/BinaryProvider/2Hlv/src/PlatformNames.jl:347.
2+
└ @ nothing PlatformNames.jl:347
3+
┌ Warning: Deprecated syntax `try without catch or finally` at /home/qe89hep/.julia/packages/BinaryProvider/2Hlv/src/Prefix.jl:337.
4+
└ @ nothing Prefix.jl:337
5+
[ Info: Downloading https://github.com/JuliaGeo/GEOSBuilder/releases/download/v3.6.2-2/GEOS.x86_64-linux-gnu.tar.gz to /home/qe89hep/.julia/dev/LibGEOS/deps/usr/downloads/GEOS.x86_64-linux-gnu.tar.gz...
6+
┌ Warning: `wait(t::Task)` is deprecated, use `fetch(t)` instead.
7+
│ caller = macro expansion at OutputCollector.jl:63 [inlined]
8+
└ @ Core OutputCollector.jl:63
9+
┌ Warning: `wait(t::Task)` is deprecated, use `fetch(t)` instead.
10+
│ caller = wait(::OutputCollector) at OutputCollector.jl:158
11+
└ @ BinaryProvider OutputCollector.jl:158
12+
┌ Warning: `wait(t::Task)` is deprecated, use `fetch(t)` instead.
13+
│ caller = wait(::OutputCollector) at OutputCollector.jl:159
14+
└ @ BinaryProvider OutputCollector.jl:159
15+
┌ Warning: `wait(t::Task)` is deprecated, use `fetch(t)` instead.
16+
│ caller = wait(::OutputCollector) at OutputCollector.jl:163
17+
└ @ BinaryProvider OutputCollector.jl:163
18+
[15:17:12] [15:17:12] ######################################################################## 100,0%[15:17:13] ######################################################################## 100,0%[15:17:13] 0,1%[15:17:13] 0,2%[15:17:13] 0,2%[15:17:13] 0,3%[15:17:13] 0,5%[15:17:13] 0,6%[15:17:13] 0,8%[15:17:14] 0,9%[15:17:14] 1,2%[15:17:14] # 1,5%[15:17:14] # 1,9%[15:17:14] # 2,2%[15:17:14] # 2,7%[15:17:14] ## 3,3%[15:17:14] ## 3,6%[15:17:14] ## 4,0%[15:17:15] ### 4,5%[15:17:15] ### 5,0%[15:17:15] #### 5,6%[15:17:15] #### 6,3%[15:17:15] ##### 7,1%[15:17:15] ##### 7,6%[15:17:15] ###### 8,3%[15:17:15] ###### 9,1%[15:17:15] ####### 9,9%[15:17:16] ####### 10,9%[15:17:16] ######## 11,8%[15:17:16] ######### 12,5%[15:17:16] ######### 13,4%[15:17:16] ########## 14,4%[15:17:16] ########### 15,4%[15:17:16] ########### 16,6%[15:17:16] ############ 17,9%[15:17:16] ############# 19,4%[15:17:17] ############### 21,0%[15:17:17] ################ 22,3%[15:17:17] ################# 23,7%[15:17:17] ################## 25,4%[15:17:17] ################### 27,2%[15:17:17] #################### 29,2%[15:17:17] ###################### 31,5%[15:17:17] ######################## 33,4%[15:17:17] ######################### 35,9%[15:17:18] ########################### 38,6%[15:17:18] ############################# 41,6%[15:17:18] ################################ 44,9%[15:17:18] ################################## 47,9%[15:17:18] #################################### 50,1%[15:17:18] ##################################### 52,5%[15:17:18] ####################################### 55,3%[15:17:18] ######################################### 58,3%[15:17:18] ############################################ 61,9%[15:17:19] ############################################### 65,9%[15:17:19] ################################################## 70,5%[15:17:19] ###################################################### 75,6%[15:17:19] ########################################################## 81,3%[15:17:19] ############################################################### 87,6%[15:17:19] #################################################################### 94,6%[15:17:19] ######################################################################## 100,0%

src/LibGEOS.jl

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module LibGEOS
1010
include(depsjl_path)
1111

1212
using GeoInterface
13+
using Libdl
1314
import Base: contains
1415

1516
export Point, MultiPoint, LineString, MultiLineString, LinearRing, Polygon, MultiPolygon, GeometryCollection,
@@ -47,9 +48,9 @@ module LibGEOS
4748
context = new(GEOS_init_r())
4849
GEOSContext_setNoticeHandler_r(context.ptr, C_NULL)
4950
GEOSContext_setErrorHandler_r(context.ptr,
50-
cfunction(geosjl_errorhandler,Ptr{Void},(Ptr{UInt8},Ptr{Void}))
51+
@cfunction(geosjl_errorhandler,Ptr{Cvoid},(Ptr{UInt8},Ptr{Cvoid}))
5152
)
52-
finalizer(context, context -> (GEOS_finish_r(context.ptr); context.ptr = C_NULL))
53+
finalizer(context -> (GEOS_finish_r(context.ptr); context.ptr = C_NULL), context)
5354
context
5455
end
5556
end
@@ -59,10 +60,10 @@ module LibGEOS
5960

6061
function WKTReader(context::GEOSContext)
6162
reader = new(GEOSWKTReader_create_r(context.ptr))
62-
finalizer(reader, function(reader)
63+
finalizer( function(reader)
6364
GEOSWKTReader_destroy_r(context.ptr, reader.ptr)
6465
reader.ptr = C_NULL
65-
end)
66+
end, reader)
6667
reader
6768
end
6869
end
@@ -72,13 +73,13 @@ module LibGEOS
7273

7374
function WKTWriter(context::GEOSContext; trim::Bool=true, outputdim::Int=3, roundingprecision::Int=-1)
7475
writer = new(GEOSWKTWriter_create_r(context.ptr))
75-
finalizer(writer, function(writer)
76+
finalizer(function(writer)
7677
GEOSWKTWriter_destroy_r(context.ptr, writer.ptr)
7778
GEOSWKTWriter_setTrim_r(context.ptr, writer.ptr, UInt8(trim))
7879
GEOSWKTWriter_setOutputDimension_r(context.ptr, writer.ptr, outputdim)
7980
GEOSWKTWriter_setRoundingPrecision_r(context.ptr, writer.ptr, roundingprecision)
8081
writer.ptr = C_NULL
81-
end)
82+
end, writer)
8283
writer
8384
end
8485
end
@@ -88,10 +89,10 @@ module LibGEOS
8889

8990
function WKBReader(context::GEOSContext)
9091
reader = new(GEOSWKBReader_create_r(context.ptr))
91-
finalizer(reader, function(reader)
92+
finalizer(function(reader)
9293
GEOSWKBReader_destroy_r(context.ptr, reader.ptr)
9394
reader.ptr = C_NULL
94-
end)
95+
end, reader)
9596
reader
9697
end
9798
end
@@ -101,10 +102,10 @@ module LibGEOS
101102

102103
function WKBWriter(context::GEOSContext)
103104
writer = new(GEOSWKBWriter_create_r(context.ptr))
104-
finalizer(writer, function(writer)
105+
finalizer( function(writer)
105106
GEOSWKBWriter_destroy_r(context.ptr, writer.ptr)
106107
writer.ptr = C_NULL
107-
end)
108+
end, writer)
108109
writer
109110
end
110111
end
@@ -113,7 +114,7 @@ module LibGEOS
113114
# Always check your dependencies from `deps.jl`
114115
check_deps()
115116

116-
global const _context = GEOSContext()
117+
global _context = GEOSContext()
117118
end
118119

119120
include("geos_functions.jl")

src/geo_interface.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ GeoInterface.coordinates(multipoint::MultiPoint) = Vector{Float64}[getCoordinate
2020
GeoInterface.coordinates(multiline::MultiLineString) = Vector{Vector{Float64}}[getCoordinates(getCoordSeq(geom)) for geom in getGeometries(multiline.ptr)]
2121
function GeoInterface.coordinates(multipolygon::MultiPolygon)
2222
geometries = getGeometries(multipolygon.ptr)
23-
coords = Array{Vector{Vector{Vector{Float64}}}}(length(geometries))
23+
coords = Array{Vector{Vector{Vector{Float64}}}}(undef, length(geometries))
2424
for (i,geom) in enumerate(getGeometries(multipolygon.ptr))
2525
exterior = getCoordinates(getCoordSeq(exteriorRing(geom)))
2626
interiors = [getCoordinates(getCoordSeq(ring)) for ring in interiorRings(geom)]

0 commit comments

Comments
 (0)