Skip to content

Commit

Permalink
Avoid the recompilation trap that is unique!
Browse files Browse the repository at this point in the history
Don't ask me why, but switching from using unique! to just plain unique
eliminates the recompilation that's been plaguing his package in 1.10+.

This has been a massive headache to track down, and I absolutely hate
that such a pitfall like this exists at all. Frankly, it's rather
disappointing to discover that I can't just take the safety/performance
of Base's API for granted.
  • Loading branch information
tecosaur committed Oct 5, 2024
1 parent f629604 commit cd4390a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/unix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ function reload()
@setxdg TEMPLATES_DIR get(userdirs, :XDG_TEMPLATES_DIR, "~/Templates")
@setxdg PUBLICSHARE_DIR get(userdirs, :XDG_PUBLICSHARE_DIR, "~/Public")
# Other directories
FONTS_DIRS[] =
append!([joinpath(DATA_HOME[], "fonts"), expanduser("~/.fonts")],
[joinpath(d, "fonts") for d::String in DATA_DIRS[]]) |> unique!
APPLICATIONS_DIRS[] =
append!([joinpath(DATA_HOME[], "applications")],
[joinpath(d, "applications") for d::String in DATA_DIRS[]]) |> unique!
FONTS_DIRS =
append!([joinpath(DATA_HOME, "fonts"), expanduser("~/.fonts")],
[joinpath(d, "fonts") for d::String in DATA_DIRS]) |> unique
APPLICATIONS_DIRS =
append!([joinpath(DATA_HOME, "applications")],
[joinpath(d, "applications") for d::String in DATA_DIRS]) |> unique
nothing
end

Expand Down

0 comments on commit cd4390a

Please sign in to comment.