Skip to content

Commit b378761

Browse files
committed
Update
1 parent abf6604 commit b378761

File tree

7 files changed

+23
-18
lines changed

7 files changed

+23
-18
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
version: ${{ matrix.julia-version }}
5151
- uses: julia-actions/julia-buildpkg@v1
5252
with:
53+
precompile: "yes"
5354
ignore-no-cache: true
5455
localregistry: https://github.com/0h7z/0hjl.git
5556
- uses: actions/cache@v4

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
authors = ["Heptazhou <[email protected]>"]
21
name = "Exts"
32
uuid = "0b12d779-4123-4875-9d6c-e33c2e29e2c9"
4-
version = "0.2.19"
3+
authors = ["Heptazhou <[email protected]>"]
4+
version = "0.2.20"
55

66
[deps]
77
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Exts = "0b12d779-4123-4875-9d6c-e33c2e29e2c9"
99
FITSIO = "525bcba6-941b-5504-bd06-fd0dc1a4d2eb"
1010
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
1111
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
12+
Mmap = "a63ad114-7e13-5084-954f-fe012c677804"
1213
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
1314
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
1415
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

ext/DatesExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ using Dates: Dates, DateTime, Date, UTC, UTM, now, value
2323
using Exts: Exts, datetime2mjd, mjd2datetime
2424

2525
const EPOCH_DJD = DateTime(+1899, 12, 31, 12) # Dublin Julian date (IAU)
26-
const EPOCH_J2K = DateTime(+2000, 01, 01, 12) # Julian date 2000
26+
const EPOCH_J2K = DateTime(+2000, 01, 01, 12) # Julian date 2000 (IAU)
2727
const EPOCH_JUL = DateTime(-4713, 11, 24, 12) # Julian date
2828
const EPOCH_M2K = DateTime(+2000, 01, 01, 00) # Modified Julian date 2000 (ESA)
2929
const EPOCH_MJD = DateTime(+1858, 11, 17, 00) # Modified Julian date (SAO)

src/Macro.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ end
154154
@eval macro $(:using)(x::Symbol)
155155
local m = Symbol(x, :Ext)
156156
quote
157-
@eval const $m = $ext($(QuoteNode(x)))::Module
157+
@eval const $m = $ext($(QuoteNode(x)))::$Module
158158
@eval using .$m
159159
@eval $m
160160
end

test/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Exts = "0b12d779-4123-4875-9d6c-e33c2e29e2c9"
99
FITSIO = "525bcba6-941b-5504-bd06-fd0dc1a4d2eb"
1010
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
1111
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
12+
Mmap = "a63ad114-7e13-5084-954f-fe012c677804"
1213
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
1314
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
1415
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

test/runtests.jl

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ using Test
2222

2323
const REPO = "https://github.com/0h7z/Exts.jl"
2424

25+
const BareModule() = Module(gensym(), false)
26+
const VoidModule() = Module(gensym(), false, false)
27+
2528
@testset "Pkg" begin
2629
using Pkg: PlatformEngines, Registry, Types, is_manifest_current
2730
@test getfield.(Registry.reachable_registries(), :name) ["General", "0hjl"]
@@ -349,20 +352,19 @@ end
349352
@test getindex.(Exts.walkdir(), 2) == getindex.(Base.walkdir(pwd()), 2)
350353
@test getindex.(Exts.walkdir(), 3) == getindex.(Base.walkdir(pwd()), 3)
351354

352-
@eval begin
353-
#! format: noindent
354-
@test @catch throw(true)
355-
@test @try error() true
356-
@test @trycatch throw(false) !
357-
@test @trycatch throw(true)
358-
@test @trycatch true
359-
@test ErrorException("") == @catch error()
360-
@test ErrorException("") == @trycatch error()
361-
@test isnothing(@catch true)
362-
@test isnothing(@try error())
363-
@test S":" === :(:)
364-
@trycatch throw(true) x -> @test x
365-
end
355+
@eval VoidModule() $Exts.@trycatch $throw($true) $(x -> @test x)
356+
@test @eval VoidModule() $Exts.@catch $throw($true)
357+
@test @eval VoidModule() $Exts.@try $error() $true
358+
@test @eval VoidModule() $Exts.@trycatch $throw($false) $!
359+
@test @eval VoidModule() $Exts.@trycatch $throw($true)
360+
@test @eval VoidModule() $Exts.@trycatch $true
361+
@test ErrorException("") == @eval VoidModule() $Exts.@catch $error()
362+
@test ErrorException("") == @eval VoidModule() $Exts.@trycatch $error()
363+
@test isnothing(@eval VoidModule() $Exts.@catch $true)
364+
@test isnothing(@eval VoidModule() $Exts.@try $error())
365+
@test Symbol(:(:)) === @eval VoidModule() $Exts.@S_str ":" # :(
366+
# https://github.com/JuliaLang/julia/issues/36566
367+
# v1.9 LoadError: syntax: cannot juxtapose string literal
366368

367369
@static if VERSION < v"1.10"
368370
@test freeze(Dict()) isa LittleDict{Bottom, Bottom}

0 commit comments

Comments
 (0)