# PackageCompiler: compiling modules not in a package

**URL:** https://discourse.julialang.org/t/packagecompiler-compiling-modules-not-in-a-package/24274
**Category:** General Usage
**Created:** [May 16, 2019, 10:38am UTC](https://discourse.julialang.org/t/packagecompiler-compiling-modules-not-in-a-package/24274 "2019-05-16T10:38:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![asprionj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asprionj/32/6856_2.png) [@asprionj](https://discourse.julialang.org/u/asprionj)
#### Post date: [May 16, 2019, 10:38am UTC](https://discourse.julialang.org/t/packagecompiler-compiling-modules-not-in-a-package/24274/1 "2019-05-16T10:38:59Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![Joris\_Pinkse](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joris_pinkse/32/216398_2.png) [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)
#### Post date: [April 24, 2021, 12:54pm UTC](https://discourse.julialang.org/t/packagecompiler-compiling-modules-not-in-a-package/24274/2 "2021-04-24T12:54:47Z")

</div>

What did you end up doing?

---

<div class="post-metadata">

### Author: ![asprionj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asprionj/32/6856_2.png) [@asprionj](https://discourse.julialang.org/u/asprionj)
#### Post date: [April 24, 2021, 7:32pm UTC](https://discourse.julialang.org/t/packagecompiler-compiling-modules-not-in-a-package/24274/3 "2021-04-24T19:32:04Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Joris\_Pinkse](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joris_pinkse/32/216398_2.png) [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)
#### Post date: [July 3, 2021, 11:15pm UTC](https://discourse.julialang.org/t/packagecompiler-compiling-modules-not-in-a-package/24274/4 "2021-07-03T23:15:28Z")

</div>

no.
