Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exporting all symbols in Julia

Is there a way to export all symbols in a Julia module (something like the semantic counterpart to importall)? Such a functionality would be very useful when the number of symbols to be exported grows large. TIA.

like image 567
Arets Paeglis Avatar asked Aug 08 '14 12:08

Arets Paeglis


2 Answers

There's the Reexport.jl package that provides a form of this; it's use case is when you have a submodule and you want to reexport all of the exported symbols from the inner module into your current module. I know, not exportall, but part of the functionality.

like image 132
quinnj Avatar answered Oct 15 '22 22:10

quinnj


I wrote a minimal ExportAll.jl package. It works and is tested for Julia 1.1.1 and it is available as a Julia package. Basically, it exports all symbols(!) defined in a module that is not part of any of the core modules. Disclaimer doing things like this is not good practice and should only be done with great care.

like image 32
JKRT Avatar answered Oct 15 '22 21:10

JKRT