# How to use Infiltrator?

**URL:** <https://discourse.julialang.org/t/how-to-use-infiltrator/124305>\
**Category:** General Usage\
**Created:** [December 31, 2024, 7:48am UTC](https://discourse.julialang.org/t/how-to-use-infiltrator/124305 "2024-12-31T07:48:04Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Janis\_Erdmanis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/janis_erdmanis/32/10869_2.png) [@Janis\_Erdmanis](https://discourse.julialang.org/u/Janis_Erdmanis)\
**Post date:** [January 7, 2025, 1:46pm UTC](https://discourse.julialang.org/t/how-to-use-infiltrator/124305/7 "2025-01-07T13:46:51Z")

</div>

I think you have stumbled on the case where you try to precompile code with the `@infiltrate` statements which does not work as `startup.jl` is not loaded by precompilation pipeline. The workflow that I use is:

1. Let the code to precompile without any `@infiltrate` statement in the code
2. Then add `@infiltrate` statements in the code and let `Revise` to recompile the necessary methods.

The first step could be resolved if we had ability to set a custom `startup.jl` file that is passed to precompilation, which could be ignored when running tests.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-use-infiltrator/124305)._
