Skip to content

Commit

Permalink
Move piracy to init, enable precompile
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghvi17 committed May 30, 2024
1 parent 262be9e commit 314f8e5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
13 changes: 12 additions & 1 deletion src/GeoMakie.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module GeoMakie
# at `__init__`, but that would also invalidate lots of Makie caches.
# One way might be to define a const array in MakieCore which can be
# pushed to by different packages...
__precompile__(false)
# __precompile__(false)

using Statistics, LinearAlgebra

Expand Down Expand Up @@ -67,4 +67,15 @@ export FileIO

export GeoAxis, datalims, datalims!, automatic

function __init__()
@eval Makie.MakieCore begin
# Since Makie explicitly sets its allow list, this is definitely piracy,
# but if we don't do this then passing `source` or `dest` almost universally
# errors.
function attribute_name_allowlist()
(:xautolimits, :yautolimits, :zautolimits, :label, :rasterize, :model, :transformation, :dest, :source, :specular, :matcap, :backlight, :shininess, :interpolate, :diffuse, :dim_conversions)
end
end
end

end # module
6 changes: 0 additions & 6 deletions src/makie_piracy.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@

# Quick fixes for Makie
Makie.to_colormap(::Nothing) = nothing
# Since Makie explicitly sets its allow list, this is definitely piracy,
# but if we don't do this then passing `source` or `dest` almost universally
# errors.
function Makie.MakieCore.attribute_name_allowlist()
(:xautolimits, :yautolimits, :zautolimits, :label, :rasterize, :model, :transformation, :dest, :source, :specular, :matcap, :backlight, :shininess, :interpolate, :diffuse, :dim_conversions)
end

#=
function Makie.transform_bbox(scenelike, lims::Rect{N, T}) where {N, T}
Expand Down

0 comments on commit 314f8e5

Please sign in to comment.