Skip to content

Pkg.dependencies crashes app executable #1053

@schlichtanders

Description

@schlichtanders

I'm unable to create a functioning app that uses Pkg.dependencies()

Recreating the error
Generate a package with Pkg as a dependency:

julia> using Pkg
julia> Pkg.generate("MyPackage")
pkg> activate MyPackage
pkg> add Pkg

Edit MyPackage/src/MyPackage.jl:

module MyPackage
export julia_main
using Pkg

function julia_main()::Cint
    @show Pkg.dependencies()
    return 0
end

end # module

Make an app:

pkg> activate --temp
julia> using PackageCompiler
julia> create_app("MyPackage", "Compiled", incremental=true)

The app compiles successfully, but running it returns the following error.

$ Compiled/bin/MyPackage 
expected package `Pkg [44cfe95a]` to exist in the manifest (use `resolve` to populate the manifest)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions