JuliaPy / JuliaPy/PyCall.jl

precompile issue

Abierto
#568 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Julia
Estrellas
1.5k
Forks
186
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

When I run
``` _
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: https://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.6.2 (2017-12-13 18:08 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-pc-linux-gnu

julia> using RobotOS

julia> Base.compilecache("RobotOS")
```
I Get
```
INFO: Recompiling stale cache file /home/mavs/.julia/lib/v0.6/RobotOS.ji for module RobotOS.
WARNING: Module PyCall with uuid 1033896533165 is missing from the cache.
This may mean module PyCall does not support precompilation but is imported by a module that does.
ERROR: LoadError: Declaring __precompile__(false) is not allowed in files that are being precompiled.
Stacktrace:
[1] _require(::Symbol) at ./loading.jl:455
[2] require(::Symbol) at ./loading.jl:405
[3] include_from_node1(::String) at ./loading.jl:576
[4] include(::String) at ./sysimg.jl:14
[5] anonymous at ./:2
while loading /home/mavs/.julia/v0.6/RobotOS/src/RobotOS.jl, in expression starting on line 5
ERROR: Failed to precompile RobotOS to /home/mavs/.julia/lib/v0.6/RobotOS.ji.
Stacktrace:
[1] compilecache(::String) at ./loading.jl:710
```

But if I remove the cache, the error goes away:
```
mavs@febbo-HP-ZBook-17-G2:~$ rm -rf /home/mavs/.julia/.cache
mavs@febbo-HP-ZBook-17-G2:~$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: https://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.6.2 (2017-12-13 18:08 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-pc-linux-gnu

julia> Base.compilecache("RobotOS")
INFO: Precompiling module RobotOS.
"/home/mavs/.julia/lib/v0.6/RobotOS.ji"
```

Any thoughts? I would like to avoid having to remove the cache all of the time. It is troublesome for users.

Thanks!

P.S. I have been dealing with this issue for some time. Here are some related issues
https://github.com/jdlangs/RobotOS.jl/issues/45
https://github.com/JuliaMPC/MAVs/issues/28

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Comienza reproduciendo Base.compilecache("RobotOS") con la caché existente; después, inspecciona RobotOS/src/RobotOS.jl en la línea 5 indicada y el comportamiento de precompilación de PyCall. Compáralo con la ejecución correcta después de eliminar /home/mavs/.julia/.cache. Se considera terminado cuando RobotOS se precompila sin requerir que los usuarios eliminen la caché.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
build-system
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.