613613# # generic project & manifest API ##
614614
615615const project_names = (" JuliaProject.toml" , " Project.toml" )
616- const manifest_names = (" JuliaManifest.toml" , " Manifest.toml" )
616+ const manifest_names = (
617+ " JuliaManifest-v$(VERSION . major) .$(VERSION . minor) .toml" ,
618+ " Manifest-v$(VERSION . major) .$(VERSION . minor) .toml" ,
619+ " JuliaManifest.toml" ,
620+ " Manifest.toml" ,
621+ )
617622const preferences_names = (" JuliaLocalPreferences.toml" , " LocalPreferences.toml" )
618623
619624function locate_project_file (env:: String )
@@ -1215,6 +1220,7 @@ function run_module_init(mod::Module, i::Int=1)
12151220end
12161221
12171222function run_package_callbacks (modkey:: PkgId )
1223+ (modkey == precompilation_target) && return nothing
12181224 run_extension_callbacks (modkey)
12191225 assert_havelock (require_lock)
12201226 unlock (require_lock)
@@ -1338,7 +1344,7 @@ function _insert_extension_triggers(parent::PkgId, extensions::Dict{String, Any}
13381344 # TODO : Better error message if this lookup fails?
13391345 uuid_trigger = UUID (totaldeps[trigger]:: String )
13401346 trigger_id = PkgId (uuid_trigger, trigger)
1341- if ! haskey (Base. loaded_modules, trigger_id) || haskey (package_locks, trigger_id)
1347+ if ! haskey (Base. loaded_modules, trigger_id) || haskey (package_locks, trigger_id) || (trigger_id == precompilation_target)
13421348 trigger1 = get! (Vector{ExtensionId}, EXT_DORMITORY, trigger_id)
13431349 push! (trigger1, gid)
13441350 else
@@ -1350,6 +1356,7 @@ end
13501356
13511357loading_extension:: Bool = false
13521358precompiling_extension:: Bool = false
1359+ precompilation_target:: Union{Nothing,PkgId} = nothing
13531360function run_extension_callbacks (extid:: ExtensionId )
13541361 assert_havelock (require_lock)
13551362 succeeded = try
@@ -2342,6 +2349,7 @@ function create_expr_cache(pkg::PkgId, input::String, output::String, output_o::
23422349 write (io. in, """
23432350 empty!(Base.EXT_DORMITORY) # If we have a custom sysimage with `EXT_DORMITORY` prepopulated
23442351 Base.precompiling_extension = $(loading_extension)
2352+ Base.precompilation_target = $(pkg_str (pkg))
23452353 Base.include_package_for_output($(pkg_str (pkg)) , $(repr (abspath (input))) , $(repr (depot_path)) , $(repr (dl_load_path)) ,
23462354 $(repr (load_path)) , $deps , $(repr (source_path (nothing ))) )
23472355 """ )
0 commit comments