Skip to content

Commit

Permalink
Describe exactly why the filter statement exists in the extension
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghvi17 committed Apr 20, 2024
1 parent 7b51b0e commit 70c6465
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext/GeometryOpsLibGEOSExt/GeometryOpsLibGEOSExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import GeometryOps: GI
import GeometryOps: GEOS, enforce

using GeometryOps
# The filter statement is required because in Julia, each module has its own versions of these
# functions, which serve to evaluate or include code inside the scope of the module.
# However, if you import those from another module (which you would with `all=true`),
# that creates an ambiguity which causes a warning during precompile/load time.
# In order to avoid this, we filter out these special functions.
for name in filter(!in((:var"#eval", :eval, :var"#include", :include)), names(GeometryOps; all = true))
@eval using GeometryOps: $name
end
Expand Down

0 comments on commit 70c6465

Please sign in to comment.