From 2b30624e8e59e1f7e908217585786d58f52fa29b Mon Sep 17 00:00:00 2001 From: Ian Date: Tue, 20 Dec 2022 22:19:29 -0500 Subject: [PATCH 1/3] format extensions with parent in time_imports report --- base/loading.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/base/loading.jl b/base/loading.jl index 61c1f13a3eef3..2ce769405022a 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -979,6 +979,12 @@ function _include_from_serialized(pkg::PkgId, path::String, depmods::Vector{Any} elapsed = round((time_ns() - t_before) / 1e6, digits = 1) comp_time, recomp_time = cumulative_compile_time_ns() .- t_comp_before print(lpad(elapsed, 9), " ms ") + for extid in EXT_DORMITORY + if extid.id == pkg + print(extid.parentid.name, " → ") + break + end + end print(pkg.name) if comp_time > 0 printstyled(" ", Ryu.writefixed(Float64(100 * comp_time / (elapsed * 1e6)), 2), "% compilation time", color = Base.info_color()) From 983360e0d42d11fdd451decfd2c8f71f3c90e9df Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 21 Dec 2022 09:44:11 -0500 Subject: [PATCH 2/3] update docstring --- stdlib/InteractiveUtils/src/macros.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stdlib/InteractiveUtils/src/macros.jl b/stdlib/InteractiveUtils/src/macros.jl index ec11d54a0c154..b6232cec1b56c 100644 --- a/stdlib/InteractiveUtils/src/macros.jl +++ b/stdlib/InteractiveUtils/src/macros.jl @@ -360,6 +360,8 @@ See also: [`code_native`](@ref), [`@code_llvm`](@ref), [`@code_typed`](@ref) and A macro to execute an expression and produce a report of any time spent importing packages and their dependencies. Any compilation time will be reported as a percentage, and how much of which was recompilation, if any. +On Julia 1.9+ package extensions will show as Parent → Extension. + !!! note During the load process a package sequentially imports all of its dependencies, not just its direct dependencies. From d789fcf1a2f6324eda960465e97d69286b07082d Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 21 Dec 2022 12:11:34 -0500 Subject: [PATCH 3/3] link to extensions in manual --- doc/src/manual/code-loading.md | 2 +- stdlib/InteractiveUtils/src/macros.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/manual/code-loading.md b/doc/src/manual/code-loading.md index bac069b274649..f6e74a02b4b30 100644 --- a/doc/src/manual/code-loading.md +++ b/doc/src/manual/code-loading.md @@ -349,7 +349,7 @@ The subscripted `rootsᵢ`, `graphᵢ` and `pathsᵢ` variables correspond to th Since the primary environment is typically the environment of a project you're working on, while environments later in the stack contain additional tools, this is the right trade-off: it's better to break your development tools but keep the project working. When such incompatibilities occur, you'll typically want to upgrade your dev tools to versions that are compatible with the main project. -### Package Extensions +### [Package Extensions](@id man-extensions) A package "extension" is a module that is automatically loaded when a specified set of other packages (its "extension dependencies") are loaded in the current Julia session. The extension dependencies of an extension are a subset of those packages listed under the `[weakdeps]` section of a Project file. Extensions are defined under the `[extensions]` section in the project file: diff --git a/stdlib/InteractiveUtils/src/macros.jl b/stdlib/InteractiveUtils/src/macros.jl index b6232cec1b56c..cc0fa019c604a 100644 --- a/stdlib/InteractiveUtils/src/macros.jl +++ b/stdlib/InteractiveUtils/src/macros.jl @@ -360,7 +360,7 @@ See also: [`code_native`](@ref), [`@code_llvm`](@ref), [`@code_typed`](@ref) and A macro to execute an expression and produce a report of any time spent importing packages and their dependencies. Any compilation time will be reported as a percentage, and how much of which was recompilation, if any. -On Julia 1.9+ package extensions will show as Parent → Extension. +On Julia 1.9+ [package extensions](@ref man-extensions) will show as Parent → Extension. !!! note During the load process a package sequentially imports all of its dependencies, not just its direct dependencies.