Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/packages/Packages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function sync_nbpkg_core(
new_packages = String.(external_package_names(new_topology)) # search all cells for imports and usings

removed = setdiff(old_packages, new_packages)
added = setdiff(new_packages, old_packages)
added = setdiff(new_packages, old_packages, PkgCompat.sysimage_module_names()) # Avoid adding the modules of the sysimage
can_skip = isempty(removed) && isempty(added) && notebook.nbpkg_ctx_instantiated

iolistener = let
Expand Down
8 changes: 8 additions & 0 deletions src/packages/PkgCompat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,14 @@ function project(ctx::PkgContext)
end
end

function sysimage_module_names()
@static if isdefined(Base, Symbol("_sysimage_modules"))
getproperty.(Base._sysimage_modules, :name)
else
String[]
end
end

# 🐸 "Public API", but using PkgContext
"Find a package in the manifest. Return `nothing` if not found."
_get_manifest_entry(ctx::PkgContext, package_name::AbstractString) =
Expand Down