Skip to content

Commit

Permalink
Merge pull request #476 from ianshmean/ib/artifact_app
Browse files Browse the repository at this point in the history
Fix empty sysimage test on 1.5.3. Fix app test on nightly
  • Loading branch information
KristofferC authored Dec 27, 2020
2 parents 562d5d4 + fec20d4 commit e408e64
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 70 deletions.
70 changes: 0 additions & 70 deletions examples/MyApp/Manifest.toml

This file was deleted.

6 changes: 6 additions & 0 deletions src/PackageCompiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String)

# Use that to create sys.ji
new_sysimage_content = rewrite_sysimg_jl_only_needed_stdlibs(stdlibs)
new_sysimage_content *= "\nempty!(Base.atexit_hooks)\n"
new_sysimage_source_path = joinpath(tmp, "sysimage_packagecompiler_$(uuid1()).jl")
write(new_sysimage_source_path, new_sysimage_content)
try
Expand Down Expand Up @@ -622,6 +623,11 @@ function create_app(package_dir::String,
precompile_execution_file = abspath.(precompile_execution_file)
package_dir = abspath(package_dir)
ctx = create_pkg_context(package_dir)
if VERSION >= v"1.6.0-DEV.1673"
Pkg.instantiate(ctx, allow_autoprecomp = false)
else
Pkg.instantiate(ctx)
end
if isempty(ctx.env.manifest)
@warn "it is not recommended to create an app without a preexisting manifest"
end
Expand Down
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ end
# Get rid of some local state
rm(joinpath(new_depot, "packages"); recursive=true)
rm(joinpath(new_depot, "compiled"); recursive=true)
rm(joinpath(new_depot, "artifacts"); recursive=true)
app_name = name !== nothing ? name : "MyApp"
app_path = abspath(app_compiled_dir, "bin", app_name * (Sys.iswindows() ? ".exe" : ""))
app_output = read(`$app_path`, String)
Expand Down

0 comments on commit e408e64

Please sign in to comment.