# PackageCompiler.jl "Warning: it is not recommended to create an app/library without a preexisting manifest"

**URL:** <https://discourse.julialang.org/t/packagecompiler-jl-warning-it-is-not-recommended-to-create-an-app-library-without-a-preexisting-manifest/81942>\
**Category:** General Usage\
**Tags:** package-compiler\
**Created:** [May 30, 2022, 11:56pm UTC](https://discourse.julialang.org/t/packagecompiler-jl-warning-it-is-not-recommended-to-create-an-app-library-without-a-preexisting-manifest/81942 "2022-05-30T23:56:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lilith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lilith/32/27492_2.png) [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Post date:** [May 30, 2022, 11:56pm UTC](https://discourse.julialang.org/t/packagecompiler-jl-warning-it-is-not-recommended-to-create-an-app-library-without-a-preexisting-manifest/81942/1 "2022-05-30T23:56:25Z")

</div>

What does this warning mean?

```julia
PackageCompiler.create_app("MyPackage", "MyPackageApp", precompile_execution_file="MyPackage/precompile.jl", force=true)
┌ Warning: it is not recommended to create an app/library without a preexisting manifest
└ @ PackageCompiler ~/.julia/packages/PackageCompiler/X7R0D/src/PackageCompiler.jl:66
┌ Warning: it is not recommended to create an app/library without a preexisting manifest
└ @ PackageCompiler ~/.julia/packages/PackageCompiler/X7R0D/src/PackageCompiler.jl:66
⠋ [01m:02s] PackageCompiler: compiling base system image (incremental=false)

```

I searched the documentation and found that [one example triggers this warning](https://docs.juliahub.com/PackageCompiler/MMV8C/1.7.6/libs.html), but it isn’t explained there what it means.  
(I do have a file `MyPackage/Manifest.toml`)

---

<div class="post-metadata">

**Author:** ![trilobit](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@trilobit](https://discourse.julialang.org/u/trilobit)\
**Post date:** [May 31, 2022, 7:10am UTC](https://discourse.julialang.org/t/packagecompiler-jl-warning-it-is-not-recommended-to-create-an-app-library-without-a-preexisting-manifest/81942/2 "2022-05-31T07:10:09Z")

</div>

It means, that the “manifest.toml” of the project is not valid.  
I had this warning, when i tried to create a sysimage without any package.  
So my personal default is:

```julia
using Pkg
cd(Base.source_dir())
Pkg.activate(".")
Pkg.update()
"StatsPlots" ∉ keys(Pkg.project().dependencies) && Pkg.add("StatsPlots")

```

The installation of “StatsPlots” (or another package) creates a valid “manifest.toml”  
for the PackageCompiler and the compiler can generate a sysimage without warning.

---

<div class="post-metadata">

**Author:** ![Lilith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lilith/32/27492_2.png) [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Post date:** [May 31, 2022, 1:17pm UTC](https://discourse.julialang.org/t/packagecompiler-jl-warning-it-is-not-recommended-to-create-an-app-library-without-a-preexisting-manifest/81942/3 "2022-05-31T13:17:12Z")

</div>

Thanks! I already have a valid manifest.toml:

```julia
# This file is machine-generated - editing it directly is not advised

julia_version = "1.7.3"
manifest_format = "2.0"

[deps]

```

but PackageCompiler [defines valid as nonempty](https://github.com/JuliaLang/PackageCompiler.jl/blob/a8a4459e7bd8c5dc2194aa62e93592e416edbdfa/src/PackageCompiler.jl#L65), and so your solution (adding a package) removes the warning. I now believe that it is safe to ignore the warning in my case because my code depends on no packages, so it is okay to have an empty manifest.

---

<div class="post-metadata">

**Author:** ![Lilith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lilith/32/27492_2.png) [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Post date:** [May 31, 2022, 1:19pm UTC](https://discourse.julialang.org/t/packagecompiler-jl-warning-it-is-not-recommended-to-create-an-app-library-without-a-preexisting-manifest/81942/4 "2022-05-31T13:19:45Z")

</div>

While your solution works, @trilobit, it shouldn’t be necessary. I filed an [issue](https://github.com/JuliaLang/PackageCompiler.jl/issues/692) with PackageCompilers.jl.
