Skip to content

Commit

Permalink
Version the compilecache. (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt authored Jun 29, 2023
1 parent 4821e59 commit c0c9ab7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GPUCompiler"
uuid = "61eb1bfa-7361-4325-ad38-22787b887f55"
authors = ["Tim Besard <tim.besard@gmail.com>"]
version = "0.21.2"
version = "0.21.3"

[deps]
ExprTools = "e2ba6199-217a-4e67-a87a-7c52f15ade04"
Expand Down
11 changes: 10 additions & 1 deletion src/GPUCompiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,16 @@ compile_cache = "" # defined in __init__()
function __init__()
STDERR_HAS_COLOR[] = get(stderr, :color, false)

global compile_cache = @get_scratch!("compiled")
dir = @get_scratch!("compiled")
## add the Julia version
dir = joinpath(dir, "v$(VERSION.major).$(VERSION.minor)")
if VERSION > v"1.9"
## also add the package version
pkgver = Base.pkgversion(GPUCompiler)
dir = joinpath(dir, "v$(pkgver.major).$(pkgver.minor)")
end
mkpath(dir)
global compile_cache = dir
end

end # module

2 comments on commit c0c9ab7

@maleadt
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/86499

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.21.3 -m "<description of version>" c0c9ab7d2604c44dfb90a99332ba3eadad3679d7
git push origin v0.21.3

Please sign in to comment.