# \[ANN\] SnoopCompile 1.2 - Package Precompilation

**URL:** <https://discourse.julialang.org/t/ann-snoopcompile-1-2-package-precompilation/33359>\
**Category:** Package Announcements\
**Tags:** announcement, benchmark, precompilation\
**Created:** [January 14, 2020, 7:31pm UTC](https://discourse.julialang.org/t/ann-snoopcompile-1-2-package-precompilation/33359 "2020-01-14T19:31:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amin\_Yahyaabadi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amin_yahyaabadi/32/9826_2.png) [@Amin\_Yahyaabadi](https://discourse.julialang.org/u/Amin_Yahyaabadi)\
**Post date:** [January 14, 2020, 7:31pm UTC](https://discourse.julialang.org/t/ann-snoopcompile-1-2-package-precompilation/33359/1 "2020-01-14T19:31:49Z")

</div>

I am happy to announce that SnoopCompile 1.2 now has a **GitHub Actions Bot** , and it introduces `@snoopiBot ` and `@snoopiBench` macros.

You can use this feature to automatically create precompilation signatures for your package, and update those in case of changes in the package. This is similar to a **Precompilation CI** for a package.

Full **documentation** is available here:  
[https://timholy.github.io/SnoopCompile.jl/stable/bot/](https://timholy.github.io/SnoopCompile.jl/stable/bot/)

Using this feature of SnoopCompile, I could improve infer time of different packages during their usage:

- [MatLang](https://github.com/juliamatlab/MatLang/runs/391951984?check_suite_focus=true#step:8:68) by 36%
- [Juno](https://github.com/aminya/Juno.jl/commit/67e26c8397d15725884b503f0603a4b267a20031/checks?check_suite_id=400431397#step:8:14) by 25%
- [Atom](https://github.com/aminya/Atom.jl/runs/409940740?check_suite_focus=true#step:8:167) by 19%

Full examples are available here: [MatLang](https://github.com/juliamatlab/MatLang) or [Juno](https://github.com/aminya/Juno.jl) or [Atom](https://github.com/aminya/Atom.jl)

`@snoopiBot ` and `@snoopiBench` macros use `snoopi` by @tim.holy in their backend.

---

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [January 15, 2020, 3:31am UTC](https://discourse.julialang.org/t/ann-snoopcompile-1-2-package-precompilation/33359/2 "2020-01-15T03:31:30Z")

</div>

This is fantastic! Thanks a lot for working on this.

Looking at the PR [https://github.com/aminya/Juno.jl/pull/3](https://github.com/aminya/Juno.jl/pull/3) generated by the bot, it looks like it works by checking in the precompile file. How does it handle platform-dependent precompile statements (e.g., different OSes and different julia versions)? Also, did you consider distributing the precompile file via the artifact system? Deploying it outside the git repository may be better if you want to support many platforms.

---

<div class="post-metadata">

**Author:** ![Amin\_Yahyaabadi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amin_yahyaabadi/32/9826_2.png) [@Amin\_Yahyaabadi](https://discourse.julialang.org/u/Amin_Yahyaabadi)\
**Post date:** [January 15, 2020, 9:58am UTC](https://discourse.julialang.org/t/ann-snoopcompile-1-2-package-precompilation/33359/3 "2020-01-15T09:58:35Z")

</div>

It automatically handles different Julia versions. Things like the following are covered:

```julia
if VERSION < v"1.3.0"
    foo(x, y) = 1
else
    foo(x) = 1
end

```

* * *

However, It doesn’t automatically handle OS-dependent signatures yet.

You can pass those functions in `blacklist`:

```julia
@snoopiBot BotConfig("packageName", blacklist = ["OSDependentFunction"])

```

* * *

Precompile signatures are like source files and they are shipped with each version. To support different OS version, we can use the same approach we took for different Julia versions. There is no plan to use artifact system.
