From 3e7d77ac287cccec6449c6a5ac7fe73b32b5e22f Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 10 Dec 2020 22:15:13 -0500 Subject: [PATCH 1/4] rm artifacts too --- test/runtests.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/test/runtests.jl b/test/runtests.jl index 2ddaaf8f..b205d86b 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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) From bc3e368b37fafdffa1ca68d8cdcb91fe26a9c9eb Mon Sep 17 00:00:00 2001 From: Ian Date: Fri, 11 Dec 2020 18:34:27 -0500 Subject: [PATCH 2/4] clear atexit hooks during sysimage build --- src/PackageCompiler.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PackageCompiler.jl b/src/PackageCompiler.jl index 15a2e8bf..ccdf2dd6 100644 --- a/src/PackageCompiler.jl +++ b/src/PackageCompiler.jl @@ -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 From 357ed47d818d3b142c169b693c98c428171efc69 Mon Sep 17 00:00:00 2001 From: Ian Date: Sat, 12 Dec 2020 01:08:02 -0500 Subject: [PATCH 3/4] delete app manifest --- examples/MyApp/Manifest.toml | 70 ------------------------------------ 1 file changed, 70 deletions(-) delete mode 100644 examples/MyApp/Manifest.toml diff --git a/examples/MyApp/Manifest.toml b/examples/MyApp/Manifest.toml deleted file mode 100644 index d590ae1d..00000000 --- a/examples/MyApp/Manifest.toml +++ /dev/null @@ -1,70 +0,0 @@ -# This file is machine-generated - editing it directly is not advised - -[[Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" - -[[Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" - -[[Example]] -git-tree-sha1 = "46e44e869b4d90b96bd8ed1fdcf32244fddfb6cc" -uuid = "7876af07-990d-54b4-ab0e-23690620f79a" -version = "0.5.3" - -[[HelloWorldC_jll]] -deps = ["Libdl", "Pkg"] -git-tree-sha1 = "8912dbb81d8c8bd7117426a9072068d58c38d1f4" -repo-rev = "master" -repo-url = "https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl" -uuid = "dca1746e-5efc-54fc-8249-22745bc95a49" -version = "1.0.6+1" - -[[InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" - -[[LibGit2]] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" - -[[Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" - -[[Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" - -[[Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" - -[[Pkg]] -deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" - -[[Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - -[[Random]] -deps = ["Serialization"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[[SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" - -[[Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" - -[[Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" - -[[UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" - -[[Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" From fec20d410220310a80edeea66e25936de3a624d9 Mon Sep 17 00:00:00 2001 From: Ian Date: Sat, 12 Dec 2020 01:08:14 -0500 Subject: [PATCH 4/4] instantiate during create_app --- src/PackageCompiler.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/PackageCompiler.jl b/src/PackageCompiler.jl index ccdf2dd6..03f4386f 100644 --- a/src/PackageCompiler.jl +++ b/src/PackageCompiler.jl @@ -625,6 +625,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