PackageCompiler: compiling modules not in a package

I have several modules that are not in a package but defined in each one file in some local folder. For normal usage, I just add this folder to LOAD_PATH in the startup.jl and I can use using to load the modules. Is there a way of compiling such modules with PackageCompiler?

In more detail, I use some examples that are defined in several scripts in the snoopfile (by include-ing them). These examples utilise said modules by using them. I don’t see a way to make these modules known to the Julia instance executing the code in the snoopfile, and accordingly, I get Package XXX not found in current path errors.

One option would be to include the files defining the modules, but then I would have to skip the using statements in all files and also make sure that the dependencies are resolved in a sensible order (i.e. each module used by another module needed to be included first).

The other option would be to move each module into a dev package. This would involve quite some work to set up everything else though. But if it’s the only way, I’ll go it…

1 Like

What did you end up doing?

Uff that’s 2 years past now. By now this use case seems not to be relevant to me anymore since I never revisited this topic. Also don’t know how the situation looks like with the current versions of Julia and PackageCompiler… have you tried?

2 Likes

no.