aminya / CompileBot.jl

Automatic compilation for Julia packages
MIT License
17 stars 10 forks source link

Difference between _precompile_() and __precompile__() #45

Closed StefanMathis closed 2 years ago

StefanMathis commented 2 years ago

Hello, this is probably a stupid question, but why does CompileBot.jl create a _precompile_() call (with one underscore per side) inside the precompile_includer.jl file instead of a __precompile__() command (with two underscores per side)? What is the difference between those functions (if there is any) and where is _precompile_() defined? I couldn't find a function definition in the Julia source code itself not in the CompileBot source code.

aminya commented 2 years ago

No worries. It is just bad naming that creates some confusion. The SnoopCompile package defines _procompile_ function. The other function is internal to Julia

https://github.com/timholy/SnoopCompile.jl/blob/d18b72257c18a11229e84e8f3932abe5447386bc/docs/src/snoopi.md#producing-precompile-directives-manually

StefanMathis commented 2 years ago

Thank you very much for the explanation :-)