diff --git a/deps/checksums/Pkg-6dd0e7c9e99d578aa5477e2c78c91a161ce4c357.tar.gz/md5 b/deps/checksums/Pkg-6dd0e7c9e99d578aa5477e2c78c91a161ce4c357.tar.gz/md5 new file mode 100644 index 0000000000000..0bd59e0f13bab --- /dev/null +++ b/deps/checksums/Pkg-6dd0e7c9e99d578aa5477e2c78c91a161ce4c357.tar.gz/md5 @@ -0,0 +1 @@ +fcf25a83bfb9c68eb34ecf50612ef2e5 diff --git a/deps/checksums/Pkg-6dd0e7c9e99d578aa5477e2c78c91a161ce4c357.tar.gz/sha512 b/deps/checksums/Pkg-6dd0e7c9e99d578aa5477e2c78c91a161ce4c357.tar.gz/sha512 new file mode 100644 index 0000000000000..03fc867f28070 --- /dev/null +++ b/deps/checksums/Pkg-6dd0e7c9e99d578aa5477e2c78c91a161ce4c357.tar.gz/sha512 @@ -0,0 +1 @@ +25fa3274513292c5e28502a8d9ffbf193ba44e32550e10dfcb880b7544780270ad155ef64d4346f9d10b8068fb8feb271c16a76aa93a99ede7f16ad5caafca38 diff --git a/deps/checksums/Pkg-f3b81f1aac77acf08f5d847ead29ad0a228dec67.tar.gz/md5 b/deps/checksums/Pkg-f3b81f1aac77acf08f5d847ead29ad0a228dec67.tar.gz/md5 deleted file mode 100644 index 93e66678953cc..0000000000000 --- a/deps/checksums/Pkg-f3b81f1aac77acf08f5d847ead29ad0a228dec67.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -97bb9e102d5a173aad9b17d16d244b7b diff --git a/deps/checksums/Pkg-f3b81f1aac77acf08f5d847ead29ad0a228dec67.tar.gz/sha512 b/deps/checksums/Pkg-f3b81f1aac77acf08f5d847ead29ad0a228dec67.tar.gz/sha512 deleted file mode 100644 index 82bdcc9857777..0000000000000 --- a/deps/checksums/Pkg-f3b81f1aac77acf08f5d847ead29ad0a228dec67.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -2942a381f56ef739addb369de078739861a46a6e98481d5b7e7b0858a6de18e42e630e2ed4f9a3bfad4245a082f44de928d6e449f61f84a72fb521154b402a3b diff --git a/pkgimage.mk b/pkgimage.mk index 776a97e65a950..9a46a8d581bf8 100644 --- a/pkgimage.mk +++ b/pkgimage.mk @@ -28,11 +28,11 @@ all-release: $(addprefix cache-release-, $(STDLIBS)) all-debug: $(addprefix cache-debug-, $(STDLIBS)) define stdlib_builder -ifneq ($(filter $(1),$(INDEPENDENT_STDLIBS)),) +ifneq ($(filter $(1),$(INDEPENDENT_STDLIBS) $(PKG_EXTS)),) # Define target-specific export for `JULIA_CPU_TARGET` $$(BUILDDIR)/stdlib/$1.release.image: export JULIA_CPU_TARGET=$(JULIA_CPU_TARGET) $$(BUILDDIR)/stdlib/$1.debug.image: export JULIA_CPU_TARGET=$(JULIA_CPU_TARGET) - +ifneq ($(filter $(1),$(INDEPENDENT_STDLIBS)),) $$(BUILDDIR)/stdlib/$1.release.image: $$($1_SRCS) $$(addsuffix .release.image,$$(addprefix $$(BUILDDIR)/stdlib/,$2)) $(build_private_libdir)/sys.$(SHLIB_EXT) @$$(call PRINT_JULIA, $$(call spawn,$$(JULIA_EXECUTABLE)) --startup-file=no --check-bounds=yes -e 'Base.compilecache(Base.identify_package("$1"))') @$$(call PRINT_JULIA, $$(call spawn,$$(JULIA_EXECUTABLE)) --startup-file=no -e 'Base.compilecache(Base.identify_package("$1"))') @@ -41,6 +41,19 @@ $$(BUILDDIR)/stdlib/$1.debug.image: $$($1_SRCS) $$(addsuffix .debug.image,$$(add @$$(call PRINT_JULIA, $$(call spawn,$$(JULIA_EXECUTABLE)) --startup-file=no --check-bounds=yes -e 'Base.compilecache(Base.identify_package("$1"))') @$$(call PRINT_JULIA, $$(call spawn,$$(JULIA_EXECUTABLE)) --startup-file=no -e 'Base.compilecache(Base.identify_package("$1"))') touch $$@ +endif +ifneq ($(filter $(1),$(PKG_EXTS)),) +# This is weird. It set up for multiple Pkg exts because that suits the structure here better +# but it hard codes the deps and `import REPL, Pkg` +$$(BUILDDIR)/stdlib/REPLExt.release.image: $$(REPLExt_SRCS) $$(BUILDDIR)/stdlib/Pkg.release.image $$(BUILDDIR)/stdlib/REPL.release.image + @$$(call PRINT_JULIA, $$(call spawn,$(JULIA_EXECUTABLE)) --startup-file=no --check-bounds=yes -e 'using REPL; using Pkg') + @$$(call PRINT_JULIA, $$(call spawn,$(JULIA_EXECUTABLE)) --startup-file=no -e 'using REPL; using Pkg') + touch $$@ +$$(BUILDDIR)/stdlib/REPLExt.debug.image: $$(REPLExt_SRCS) $(BUILDDIR)/stdlib/Pkg.debug.image $$(BUILDDIR)/stdlib/REPL.debug.image + @$$(call PRINT_JULIA, $$(call spawn,$(JULIA_EXECUTABLE)) --startup-file=no --check-bounds=yes -e 'using REPL; using Pkg') + @$$(call PRINT_JULIA, $$(call spawn,$(JULIA_EXECUTABLE)) --startup-file=no -e 'using REPL; using Pkg') + touch $$@ +endif else ifneq ($(filter $(1),$(STDLIBS_WITHIN_SYSIMG)),) $$(BUILDDIR)/stdlib/$1.release.image: @@ -130,6 +143,7 @@ $(eval $(call stdlib_builder,Pkg, Artifacts Dates Downloads FileWatching LibGit2 # 7-depth packages $(eval $(call stdlib_builder,LazyArtifacts,Artifacts Pkg)) +$(eval $(call stdlib_builder,REPLExt,Pkg REPL)) $(eval $(call stdlib_builder,SparseArrays,Libdl LinearAlgebra Random Serialization SuiteSparse_jll)) $(eval $(call stdlib_builder,Statistics,LinearAlgebra SparseArrays)) diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index fa41353d3e0a1..52524cb88083c 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,4 +1,4 @@ PKG_BRANCH = master -PKG_SHA1 = f3b81f1aac77acf08f5d847ead29ad0a228dec67 +PKG_SHA1 = 6dd0e7c9e99d578aa5477e2c78c91a161ce4c357 PKG_GIT_URL := https://github.com/JuliaLang/Pkg.jl.git PKG_TAR_URL = https://api.github.com/repos/JuliaLang/Pkg.jl/tarball/$1 diff --git a/stdlib/REPL/src/REPL.jl b/stdlib/REPL/src/REPL.jl index 39b09a55c6e30..f39aed51cebaf 100644 --- a/stdlib/REPL/src/REPL.jl +++ b/stdlib/REPL/src/REPL.jl @@ -1190,10 +1190,11 @@ function setup_interface( pkgid = Base.PkgId(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "Pkg") if Base.locate_package(pkgid) !== nothing # Only try load Pkg if we can find it Pkg = Base.require(pkgid) + REPLExt = Base.get_extension(Pkg, :REPLExt) # Pkg should have loaded its REPL mode by now, let's find it so we can transition to it. pkg_mode = nothing for mode in repl.interface.modes - if mode isa LineEdit.Prompt && mode.complete isa Pkg.REPLMode.PkgCompletionProvider + if mode isa LineEdit.Prompt && mode.complete isa REPLExt.PkgCompletionProvider pkg_mode = mode break end diff --git a/stdlib/stdlib.mk b/stdlib/stdlib.mk index 4b3b138b374f3..b23754f3a3cac 100644 --- a/stdlib/stdlib.mk +++ b/stdlib/stdlib.mk @@ -5,20 +5,28 @@ STDLIBS_WITHIN_SYSIMG := \ INDEPENDENT_STDLIBS := \ ArgTools Base64 CRC32c Dates DelimitedFiles Distributed Downloads Future \ InteractiveUtils JuliaSyntaxHighlighting LazyArtifacts LibGit2 LibCURL Logging \ - Markdown Mmap NetworkOptions Profile Printf Pkg REPL Serialization SharedArrays \ - SparseArrays Statistics StyledStrings SuiteSparse_jll Tar Test TOML Unicode UUIDs \ + Markdown Mmap NetworkOptions Profile Printf Pkg REPL Serialization SharedArrays \ + SparseArrays Statistics StyledStrings SuiteSparse_jll Tar Test TOML Unicode UUIDs \ dSFMT_jll GMP_jll libLLVM_jll LLD_jll LLVMLibUnwind_jll LibUnwind_jll LibUV_jll \ LibCURL_jll LibSSH2_jll LibGit2_jll nghttp2_jll MozillaCACerts_jll MbedTLS_jll \ MPFR_jll OpenLibm_jll PCRE2_jll p7zip_jll Zlib_jll +PKG_EXTS := \ + REPLExt -STDLIBS := $(STDLIBS_WITHIN_SYSIMG) $(INDEPENDENT_STDLIBS) +STDLIBS := $(STDLIBS_WITHIN_SYSIMG) $(INDEPENDENT_STDLIBS) $(PKG_EXTS) VERSDIR := v$(shell cut -d. -f1-2 < $(JULIAHOME)/VERSION) SYSIMG_STDLIB_SRCS = define STDLIB_srcs -$1_SRCS := $$(shell find $$(build_datarootdir)/julia/stdlib/$$(VERSDIR)/$1/src -name \*.jl) \ +ifneq ($(filter $(1),$(PKG_EXTS)),) + $1_SRCS := $$(shell find $$(build_datarootdir)/julia/stdlib/$$(VERSDIR)/Pkg/ext/$1 -name \*.jl) \ + $$(wildcard $$(build_prefix)/manifest/$$(VERSDIR)/Pkg) $$(build_datarootdir)/julia/stdlib/$$(VERSDIR)/Pkg/Project.toml +else + $1_SRCS := $$(shell find $$(build_datarootdir)/julia/stdlib/$$(VERSDIR)/$1/src -name \*.jl) \ $$(wildcard $$(build_prefix)/manifest/$$(VERSDIR)/$1) $$(build_datarootdir)/julia/stdlib/$$(VERSDIR)/$1/Project.toml +endif + ifneq ($(filter $(1),$(STDLIBS_WITHIN_SYSIMG)),) SYSIMG_STDLIB_SRCS += $$($1_SRCS) endif