I noticed that the macros exported by PrecompileTools, unlike those of SnoopPrecompile, requires the package to have access to the name PrecompileTools. This means that the following code will fail:
using PrecompileTools: @setup_workload, @compile_workload
@setup_workload let
...
@compile_workload let
...
end
end
It is generally preferred to explicitly import names from packages instead of using a broad using Package statement, since that can cause newly exported names in non-breaking releases to lead to a name being unresolvable, thus breaking code.
So, I propose either:
If possible, change PrecompileTools such that it's not necessary for the user to need to be able to resolve the name Precompile (it's probably just some macro hygeine stuff)
If not possible, amend the documentation to be clear that you need to do using PrecompileTools: PrecompileTools, @setup_workload, @compile_workload
First, thank you for a great package.
I noticed that the macros exported by
PrecompileTools
, unlike those ofSnoopPrecompile
, requires the package to have access to the namePrecompileTools
. This means that the following code will fail:It is generally preferred to explicitly import names from packages instead of using a broad
using Package
statement, since that can cause newly exported names in non-breaking releases to lead to a name being unresolvable, thus breaking code.So, I propose either:
PrecompileTools
such that it's not necessary for the user to need to be able to resolve the namePrecompile
(it's probably just some macro hygeine stuff)using PrecompileTools: PrecompileTools, @setup_workload, @compile_workload