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

Track packages compiled into sysimage #688

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ktdq
Copy link

@ktdq ktdq commented Jun 26, 2022

No description provided.

@ktdq ktdq changed the title Track packages compiled into sysimage, fix #685 Track packages compiled into sysimage Jun 26, 2022
Copy link
Owner

@timholy timholy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a PackageCompiler user, but this seems great! Many thanks for contributing this.

I left one comment, but otherwise:

  • this could use a test. You could test the error condition I proposed in my comment, and for a working case you could manually create a Base.pkgorigins entry. I know that writing these tests is a little annoying but it's the only way to keep Revise working across Julia versions (it breaks with literally every new Julia point release since Revise and its supporting infrastructure reach deep into Julia's guts).
  • this seems NEWS-worthy to me

@@ -94,7 +95,14 @@ function _track(id, modname; modified_files=revision_queue)
track_subdir_from_git!(pkgdata, compilerdir; modified_files=modified_files)
# insertion into pkgdatas is done by track_subdir_from_git!
else
error("no Revise.track recipe for module ", modname)
pkgdata = watch_package(id)
modtime = mtime(Base.pkgorigins[id].cachepath)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if you do this?

julia> module EmptyModule end
Main.EmptyModule

julia> Revise.track(EmptyModule)
ERROR: no Revise.track recipe for module EmptyModule
Stacktrace:
 [1] error(::String, ::Symbol)
   @ Base ./error.jl:44
 [2] _track(id::Base.PkgId, modname::Symbol; modified_files::Set{Tuple{Revise.PkgData, String}})
   @ Revise ~/.julia/packages/Revise/VskYC/src/recipes.jl:97
 [3] #track#44
   @ ~/.julia/packages/Revise/VskYC/src/recipes.jl:12 [inlined]
 [4] track(mod::Module)
   @ Revise ~/.julia/packages/Revise/VskYC/src/recipes.jl:9
 [5] top-level scope
   @ REPL[2]:1

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