# Precompile?

**URL:** <https://discourse.julialang.org/t/precompile/15320>\
**Category:** New to Julia\
**Created:** [September 22, 2018, 12:06am UTC](https://discourse.julialang.org/t/precompile/15320 "2018-09-22T00:06:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iwelch](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Post date:** [September 22, 2018, 12:06am UTC](https://discourse.julialang.org/t/precompile/15320/1 "2018-09-22T00:06:48Z")

</div>

I am wondering if I can write a script that both adds and precompiles a set of packages. Alas

```julia
s= "CSV"
Pkg.add(s)
using s

```

does not work, because s is considered a name. is there a callable string method to the `using` command?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [September 22, 2018, 12:14am UTC](https://discourse.julialang.org/t/precompile/15320/2 "2018-09-22T00:14:22Z")

</div>

```julia
packages = ["CSV", "JSON"]
Pkg.add(packages)
Pkg.API.precompile()

```

The `API` should not be necessary but it is right now because of a forgotten import.

---

<div class="post-metadata">

**Author:** ![tk3369](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tk3369/32/2824_2.png) [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Post date:** [September 22, 2018, 4:48pm UTC](https://discourse.julialang.org/t/precompile/15320/3 "2018-09-22T16:48:45Z")

</div>

Is this forgotten import being fixed in 1.0.1? It doesn’t bother me to do it via `Pkg.API` but I want to know when I should clean up the code. Thanks
