# How to skip precompilation on \`using\`/\`import\` (for any given package)?

**URL:** <https://discourse.julialang.org/t/how-to-skip-precompilation-on-using-import-for-any-given-package/116917>\
**Category:** General Usage\
**Tags:** repl, precompilation, import, using\
**Created:** [July 11, 2024, 3:30pm UTC](https://discourse.julialang.org/t/how-to-skip-precompilation-on-using-import-for-any-given-package/116917 "2024-07-11T15:30:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abhro/32/220753_2.png) [@Abhro](https://discourse.julialang.org/u/Abhro)\
**Post date:** [July 11, 2024, 3:30pm UTC](https://discourse.julialang.org/t/how-to-skip-precompilation-on-using-import-for-any-given-package/116917/1 "2024-07-11T15:30:29Z")

</div>

I have a startup.jl file with

```julia
using Revise
using OhMyREPL
redirect_stderr(devnull) do
    @eval using AbbreviatedStackTraces
end

```

Since AbbreviatedStackTraces.jl doesn’t support precompilation, I silenced the warnings with the answer from [How to disable the "skipping precompilation" info?](https://discourse.julialang.org/t/how-to-disable-the-skipping-precompilation-info/93905). But, this still checks for precompiling, and adds even more overhead with `redirect_stderr` and `@eval`, slowing down REPL launch. Is there a way to tell Julia to not bother precompiling a given module?

P.S. Before redirecting stderr, this was the REPL

```plaintext
$ julia
Precompiling AbbreviatedStackTraces
  ? AbbreviatedStackTraces
[Info: Precompiling AbbreviatedStackTraces [ac637c84-cc71-43bf-9c33-c1b4316be3d4]
[Info: Skipping precompilation since __precompile__ (false). Importing AbbreviatedStackTraces [ac637c84-cc71-43bf-9c33-c1b4316be3d4].
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.10.4 (2024-06-04)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

julia>

```

---

<div class="post-metadata">

**Author:** ![abraemer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abraemer/32/51403_2.png) [@abraemer](https://discourse.julialang.org/u/abraemer)\
**Post date:** [July 12, 2024, 7:11am UTC](https://discourse.julialang.org/t/how-to-skip-precompilation-on-using-import-for-any-given-package/116917/2 "2024-07-12T07:11:39Z")

</div>

I think a better way would be to use `atreplinit`:

```julia
atreplinit() do repl
    @eval using OhMyREPL
    redirect_stderr(devnull) do
        @eval using AbbreviatedStackTraces
    end
end

```

This should make the REPL load faster and also make it work inside VS Code. Ref: [issue #38](https://github.com/BioTurboNick/AbbreviatedStackTraces.jl/issues/38)
