JuliaLang / PackageCompiler.jl

Compile your Julia Package
https://julialang.github.io/PackageCompiler.jl/dev/
MIT License
1.43k stars 193 forks source link

Cannot find `precompile.jl` when using PackageCompiler on local package #190

Closed kharazity closed 4 years ago

kharazity commented 5 years ago

Whenever I try and run PackageCompiler on a package I either grab from Github, or from a local source, I get the error: ERROR: Cannot find file: "/Users/localadmin/.julia/dev/PackageCompiler/sysimg/precompile.jl". Which is strange because it always seems to come after I get the summary telling me telling me the Sysimage has been built. What's also strange about this is that if I precompile a package from the package repl, and THEN try and package_compile my personal package, the error goes away. I think that this is an error with the way the system is currently handling "non-standard" julia packages. Although I have a temporary fix for now, I think a more permanent solution would be beneficial for developers.

SimonDanisch commented 5 years ago

What do I need to execute to reproduce?

kharazity commented 5 years ago

Great question. I would begin with a fresh version of package compiler, namely one that doesn't know about any other packages. Then, if you have a package you're developing that can't "niavely" be added in the repl (you have to give a path, or link to github url), you should see the error.

So simply: get a fresh install of PackageCompiler from Julia Package Library (One that doesn't know about other packages you've tried to compile) add package you're developing, or any package that isn't part of standard Julia Package Library compile_package("Package_From_Above", "maybe a specific test file", force = false, reuse = false)

SimonDanisch commented 5 years ago

compile_package("Package_From_Above", "maybe a specific test file", force = false, reuse = false)

That's not how you invoke compile_package - it only accepts package names...

kharazity commented 5 years ago

Ok, I was under the impression that if you gave a specific .jl file in the second argument, the compile_package would use that file as the "test suite" instead of looking in runtests.jl. I thought it took KW args of "force" and "reuse".

SimonDanisch commented 5 years ago

It was never the second argument, but in previous versions you could pass a tuple of package name + snoopfile. force continues working ;) See how it's planned to bring back custom snoop files: https://github.com/JuliaLang/PackageCompiler.jl/pull/187 It'd be a 1 line PR to implement that solution, which is cleaner than the tuple solution

SimonDanisch commented 5 years ago

https://github.com/JuliaLang/PackageCompiler.jl/pull/187#issuecomment-462729624

kharazity commented 5 years ago

Ok got it. That might be the issue. I've been using PackageCompiler for a few months now, you guys are constantly making changes (It's still a beta release so it's expected). It's likely that I missed that one. I'll try with the new syntax and see if the error persists.

SimonDanisch commented 5 years ago

Sorry, I'm especially bad with deprecations + news files ;)

kharazity commented 5 years ago

Yeah, well, I'm now just getting the serialization error when I use the proper syntax. https://github.com/JuliaLang/PackageCompiler.jl/issues/184