diff --git a/ChunkCodecCore/Project.toml b/ChunkCodecCore/Project.toml index 7a35c69..4154f63 100644 --- a/ChunkCodecCore/Project.toml +++ b/ChunkCodecCore/Project.toml @@ -4,4 +4,4 @@ authors = ["nhz2 "] version = "0.4.0" [compat] -julia = "1.11" +julia = "1.10" diff --git a/ChunkCodecCore/src/ChunkCodecCore.jl b/ChunkCodecCore/src/ChunkCodecCore.jl index dcb4079..55ee36b 100644 --- a/ChunkCodecCore/src/ChunkCodecCore.jl +++ b/ChunkCodecCore/src/ChunkCodecCore.jl @@ -2,36 +2,41 @@ module ChunkCodecCore export decode, encode -public Codec -public EncodeOptions -public DecodeOptions +if VERSION >= v"1.11.0-DEV.469" + eval(Meta.parse(""" + public + Codec, + EncodeOptions, + DecodeOptions, -public DecodingError -public DecodedSizeError + DecodingError, + DecodedSizeError, -public decode_options + decode_options, -public decoded_size_range -public encode_bound -public try_encode! + decoded_size_range, + encode_bound, + try_encode!, -public try_find_decoded_size -public try_decode! + try_find_decoded_size, + try_decode!, -public check_in_range -public check_contiguous + check_in_range, + check_contiguous, -public can_concatenate -public is_thread_safe -public try_resize_decode! + can_concatenate, + is_thread_safe, + try_resize_decode!, -public NoopCodec -public NoopEncodeOptions -public NoopDecodeOptions + NoopCodec, + NoopEncodeOptions, + NoopDecodeOptions, -public ShuffleCodec -public ShuffleEncodeOptions -public ShuffleDecodeOptions + ShuffleCodec, + ShuffleEncodeOptions, + ShuffleDecodeOptions + """)) +end include("types.jl") include("errors.jl") @@ -39,4 +44,4 @@ include("interface.jl") include("noop.jl") include("shuffle.jl") -end \ No newline at end of file +end diff --git a/ChunkCodecCore/test/runtests.jl b/ChunkCodecCore/test/runtests.jl index b1cfe09..c4966d0 100644 --- a/ChunkCodecCore/test/runtests.jl +++ b/ChunkCodecCore/test/runtests.jl @@ -43,7 +43,9 @@ end @testset "check helpers" begin @test_throws Exception ChunkCodecCore.check_contiguous(@view(zeros(UInt8, 8)[1:2:end])) @test_throws Exception ChunkCodecCore.check_contiguous(0x00:0xFF) - @test isnothing(ChunkCodecCore.check_contiguous(Memory{UInt8}(undef, 3))) + if VERSION ≥ v"1.11" + @test isnothing(ChunkCodecCore.check_contiguous(Memory{UInt8}(undef, 3))) + end @test isnothing(ChunkCodecCore.check_contiguous(Vector{UInt8}(undef, 3))) @test isnothing(ChunkCodecCore.check_contiguous(@view(zeros(UInt8, 8)[1:1:end]))) @test_throws ArgumentError ChunkCodecCore.check_in_range(1:6; x=0) @@ -87,4 +89,42 @@ end # negative max_size @test_throws DecodedSizeError(Int64(-1), nothing) decode(d, ones(UInt8, Int64(100)); max_size=Int64(-1)) @test_throws DecodedSizeError(typemin(Int64), nothing) decode(d, ones(UInt8, Int64(100)); max_size=typemin(Int128)) -end \ No newline at end of file +end +@testset "public" begin + if VERSION >= v"1.11.0-DEV.469" + for sym in ( + :Codec, + :EncodeOptions, + :DecodeOptions, + + :DecodingError, + :DecodedSizeError, + + :decode_options, + + :decoded_size_range, + :encode_bound, + :try_encode!, + + :try_find_decoded_size, + :try_decode!, + + :check_in_range, + :check_contiguous, + + :can_concatenate, + :is_thread_safe, + :try_resize_decode!, + + :NoopCodec, + :NoopEncodeOptions, + :NoopDecodeOptions, + + :ShuffleCodec, + :ShuffleEncodeOptions, + :ShuffleDecodeOptions + ) + @test Base.ispublic(ChunkCodecCore, sym) + end + end +end diff --git a/ChunkCodecTests/Project.toml b/ChunkCodecTests/Project.toml index 1426cdb..b027a3b 100644 --- a/ChunkCodecTests/Project.toml +++ b/ChunkCodecTests/Project.toml @@ -10,4 +10,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] ChunkCodecCore = "0.4" Test = "1" -julia = "1.11" +julia = "1.10" diff --git a/ChunkCodecs/Project.toml b/ChunkCodecs/Project.toml index b8362bd..723d9c0 100644 --- a/ChunkCodecs/Project.toml +++ b/ChunkCodecs/Project.toml @@ -20,7 +20,7 @@ ChunkCodecLibLz4 = "0.1" ChunkCodecLibSnappy = "0.1" ChunkCodecLibZlib = "0.1" ChunkCodecLibZstd = "0.1" -julia = "1.11" +julia = "1.10" [sources] ChunkCodecCore = {path = "../ChunkCodecCore"} diff --git a/LibBlosc/Project.toml b/LibBlosc/Project.toml index f45c9eb..a193131 100644 --- a/LibBlosc/Project.toml +++ b/LibBlosc/Project.toml @@ -10,4 +10,4 @@ ChunkCodecCore = "0b6fb165-00bc-4d37-ab8b-79f91016dbe1" [compat] Blosc_jll = "1" ChunkCodecCore = "0.4" -julia = "1.11" +julia = "1.10" diff --git a/LibBlosc/src/ChunkCodecLibBlosc.jl b/LibBlosc/src/ChunkCodecLibBlosc.jl index fedbe81..56eef69 100644 --- a/LibBlosc/src/ChunkCodecLibBlosc.jl +++ b/LibBlosc/src/ChunkCodecLibBlosc.jl @@ -22,7 +22,9 @@ export BloscCodec, BloscDecodeOptions, BloscDecodingError -public is_compressor_valid, compcode, compname +if VERSION >= v"1.11.0-DEV.469" + eval(Meta.parse("public is_compressor_valid, compcode, compname")) +end # reexport ChunkCodecCore using ChunkCodecCore: ChunkCodecCore, encode, decode diff --git a/LibBlosc/test/runtests.jl b/LibBlosc/test/runtests.jl index 5f68fcd..908b9a7 100644 --- a/LibBlosc/test/runtests.jl +++ b/LibBlosc/test/runtests.jl @@ -77,3 +77,10 @@ end c[end-5] = 0x40 @test_throws BloscDecodingError decode(BloscDecodeOptions(), c) end +@testset "public" begin + if VERSION >= v"1.11.0-DEV.469" + for sym in (:is_compressor_valid, :compcode, :compname) + @test Base.ispublic(ChunkCodecLibBlosc, sym) + end + end +end diff --git a/LibBzip2/Project.toml b/LibBzip2/Project.toml index 4ec1bf6..228ea20 100644 --- a/LibBzip2/Project.toml +++ b/LibBzip2/Project.toml @@ -10,4 +10,4 @@ ChunkCodecCore = "0b6fb165-00bc-4d37-ab8b-79f91016dbe1" [compat] Bzip2_jll = "1" ChunkCodecCore = "0.4" -julia = "1.11" +julia = "1.10" diff --git a/LibLz4/Project.toml b/LibLz4/Project.toml index 16cd954..20e5c95 100644 --- a/LibLz4/Project.toml +++ b/LibLz4/Project.toml @@ -10,4 +10,4 @@ Lz4_jll = "5ced341a-0733-55b8-9ab6-a4889d929147" [compat] ChunkCodecCore = "0.4" Lz4_jll = "1" -julia = "1.11" +julia = "1.10" diff --git a/LibSnappy/Project.toml b/LibSnappy/Project.toml index 142bafc..c297dbe 100644 --- a/LibSnappy/Project.toml +++ b/LibSnappy/Project.toml @@ -10,4 +10,4 @@ snappy_jll = "fe1e1685-f7be-5f59-ac9f-4ca204017dfd" [compat] ChunkCodecCore = "0.4" snappy_jll = "1" -julia = "1.11" +julia = "1.10" diff --git a/LibZlib/Project.toml b/LibZlib/Project.toml index 2af13f0..f27756d 100644 --- a/LibZlib/Project.toml +++ b/LibZlib/Project.toml @@ -10,4 +10,4 @@ Zlib_jll = "83775a58-1f1d-513f-b197-d71354ab007a" [compat] ChunkCodecCore = "0.4" Zlib_jll = "1" -julia = "1.11" +julia = "1.10" diff --git a/LibZstd/Project.toml b/LibZstd/Project.toml index df7f5fc..fd82f52 100644 --- a/LibZstd/Project.toml +++ b/LibZstd/Project.toml @@ -10,4 +10,4 @@ Zstd_jll = "3161d3a3-bdf6-5164-811a-617609db77b4" [compat] ChunkCodecCore = "0.4" Zstd_jll = "1.5.6" -julia = "1.11" +julia = "1.10" diff --git a/LibZstd/src/ChunkCodecLibZstd.jl b/LibZstd/src/ChunkCodecLibZstd.jl index aa9d7fe..8444d1f 100644 --- a/LibZstd/src/ChunkCodecLibZstd.jl +++ b/LibZstd/src/ChunkCodecLibZstd.jl @@ -25,14 +25,20 @@ export ZstdCodec, ZstdDecodeOptions, ZstdDecodingError -public ZSTD_minCLevel, - ZSTD_maxCLevel, - ZSTD_defaultCLevel, - ZSTD_versionNumber, - ZSTD_isError, - ZSTD_bounds, - ZSTD_cParam_getBounds, - ZSTD_dParam_getBounds + +if VERSION >= v"1.11.0-DEV.469" + eval(Meta.parse(""" + public + ZSTD_minCLevel, + ZSTD_maxCLevel, + ZSTD_defaultCLevel, + ZSTD_versionNumber, + ZSTD_isError, + ZSTD_bounds, + ZSTD_cParam_getBounds, + ZSTD_dParam_getBounds + """)) +end # reexport ChunkCodecCore using ChunkCodecCore: ChunkCodecCore, encode, decode diff --git a/LibZstd/test/runtests.jl b/LibZstd/test/runtests.jl index 552ef89..9898df2 100644 --- a/LibZstd/test/runtests.jl +++ b/LibZstd/test/runtests.jl @@ -97,3 +97,19 @@ end "ZstdDecodingError: ", ) end +@testset "public" begin + if VERSION >= v"1.11.0-DEV.469" + for sym in ( + :ZSTD_minCLevel, + :ZSTD_maxCLevel, + :ZSTD_defaultCLevel, + :ZSTD_versionNumber, + :ZSTD_isError, + :ZSTD_bounds, + :ZSTD_cParam_getBounds, + :ZSTD_dParam_getBounds + ) + @test Base.ispublic(ChunkCodecLibZstd, sym) + end + end +end