Skip to content

Commit ffbe238

Browse files
authored
Merge pull request #114 from JuliaIO/tan/compat
Julia 1.0 compat
2 parents 9fe8d0c + c7f4386 commit ffbe238

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ before_install:
1717
- sudo ./test/setup_protoc3.sh
1818
script:
1919
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
20-
- PROTOC2=protoc PROTOC3=/proto3/protobuf-3.6.0/install/bin/protoc julia --check-bounds=yes -e 'Pkg.clone(pwd()); Pkg.build("ProtoBuf"); Pkg.test("ProtoBuf"; coverage=true)'
20+
- PROTOC2=protoc PROTOC3=/proto3/protobuf-3.6.0/install/bin/protoc julia --check-bounds=yes -e '(VERSION > v"0.7.0-") && (using Pkg); Pkg.clone(pwd()); Pkg.build("ProtoBuf"); Pkg.test("ProtoBuf"; coverage=true)'
2121
after_success:
2222
- julia -e 'cd(Pkg.dir("ProtoBuf")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder());'
2323
- julia -e 'cd(Pkg.dir("ProtoBuf")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'

src/codec.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ function meta(typ::Type, required::Vector{Symbol}, numbers::Vector{Int}, default
566566
types = typ.types
567567
for fldidx in 1:length(names)
568568
fldname = names[fldidx]
569-
fldtyp = (fldname in keys(field_types)) ? Core.eval(typ.name.module, parse(field_types[fldname])) : types[fldidx]
569+
fldtyp = (fldname in keys(field_types)) ? Core.eval(typ.name.module, (@static (VERSION < v"0.7.0-alpha") ? parse : Meta.parse)(field_types[fldname])) : types[fldidx]
570570
fldnum = isempty(numbers) ? fldidx : numbers[fldidx]
571571
isarr = (fldtyp <: Array) && !(fldtyp === Vector{UInt8})
572572
repeat = isarr ? 2 : (fldname in required) ? 1 : 0

0 commit comments

Comments
 (0)