File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -53,17 +53,18 @@ _precompile_()
53
53
54
54
55
55
compile_cache = " " # defined in __init__()
56
- const pkgver = @static VERSION > v " 1.9" ? Base. pkgversion (GPUCompiler) : " "
57
-
56
+ const pkgver = @static VERSION > v " 1.9" ? Base. pkgversion (GPUCompiler) : nothing
58
57
59
58
function __init__ ()
60
59
STDERR_HAS_COLOR[] = get (stderr , :color , false )
61
60
62
61
dir = @get_scratch! (" compiled" )
63
62
# # add the Julia version
64
63
dir = joinpath (dir, " v$(VERSION . major) .$(VERSION . minor) " )
65
- if VERSION > v " 1.9"
66
- # # also add the package version
64
+ # # also add the package version
65
+ if pkgver != = nothing
66
+ # XXX : `Base.pkgversion` is buggy and sometimes returns `nothing`, see e.g.
67
+ # JuliaLang/PackageCompiler.jl#896 and JuliaGPU/GPUCompiler.jl#593
67
68
dir = joinpath (dir, " v$(pkgver. major) .$(pkgver. minor) " )
68
69
end
69
70
mkpath (dir)
You can’t perform that action at this time.
0 commit comments