Skip to content

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

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