Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Pkg.precompile work with glue packages #3265

Merged
merged 3 commits into from
Nov 25, 2022

Conversation

IanButterworth
Copy link
Member

@IanButterworth IanButterworth commented Nov 25, 2022

Builds on #3264

(While I was here I added some comments to Pkg.precompile too, in a separate commit)

shell> rm -rf ~/.julia/compiled/v1.10

julia> import Pkg
[ Info: Precompiling Pkg [44cfe95a-1eb2-52ea-b672-e2afdf69b79f]

(Pkg) pkg> activate /Users/ian/Documents/GitHub/GluePkgExamples.jl/HasDepWithGluePkgs.jl
  Activating project at `~/Documents/GitHub/GluePkgExamples.jl/HasDepWithGluePkgs.jl`

(HasDepWithGluePkgs) pkg> precompile
Precompiling environment...
  6 dependencies successfully precompiled in 3 seconds

julia> using HasDepWithGluePkgs

julia> HasDepWithGluePkgs.do_something()
[ Info: First do something with the basic array support in B
┌ Info: HasGluePkgs.jl: A custom logging method for AbstractArray
│   x =
│    2-element Vector{Float64}:
│     0.22960852293312484
└     0.5867772603987441
[ Info: Now do something with extended OffsetArray support in B
┌ Info: HasGluePkgs.jl: A custom logging method for AbstractArray
│   x =
│    2-element OffsetArray(::Vector{Float64}, 0:1) with eltype Float64 with indices 0:1:
│     0.09267832976119839
└     0.38042557254693776

Tested on KristofferC/ExtensionExamples.jl#1

Todo

  • Add tests

@KristofferC
Copy link
Member

Add tests

This should get tested by the existing Glue package tests (since the glue packages will get precompiled there in the Pkg.develop)

@KristofferC
Copy link
Member

image

@KristofferC KristofferC merged commit 8ae5d35 into JuliaLang:kc/glue Nov 25, 2022
@KristofferC
Copy link
Member

I think that there will be quite a lot of collisions with glue package names, so maybe it is worth to write it in the progress output as Parent -> GluePackage or something so you can keep track from which parent package the glue package comes from?

@IanButterworth IanButterworth deleted the ib/glue_precompile branch November 25, 2022 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants