Skip to content

Commit c855801

Browse files
authored
add trouble shooting
1 parent be291cc commit c855801

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,19 @@ PackageCompiler.compie_package(("Matcha", "relative/path/for_snooping.jl"))
2727
# if you used force and want your old system image back (force will overwrite the default system image Julia uses) you can run:
2828
PackageCompiler.revert()
2929
```
30+
31+
32+
## Trouble shooting:
33+
34+
- You might need to tweak your runtest, since SnoopCompile can have problems with some statements. Please open issues about concrete problems! This is also why there is a way to point to a file different from runtests.jl, for the case it becomes impossible to combine testing and snoop compiling (just pass `("package", "snoopfile.jl")`)!
35+
36+
- non const globals are problematic, or globals defined in functions - removing those got me to 95% of making the package save for static compilation
37+
38+
- type unstable code had some inference issues (around 2 occurrence, where I’m still not sure what was happening) - both cases happened with dictionaries… Only way to find those was investigating the segfaults with `gdb`, but then it was relatively easy to just juggle around the code, since the stacktraces accurately pointed to the problem. The non const globals might be related since they introduce type instabilities.
39+
40+
- some generated functions needed reordering of the functions they call ( actually, even for normal compilation, all functions that get called in a generated function should be defined before it)
41+
42+
- I uncovered one out of bounds issue, that somehow was not coming up without static-compilation
43+
- I used julia-debug to uncover most bugs, but actually, the last errors I was trying to uncover where due to using julia-debug!
44+
45+
- you’re pretty much on your own and need to use gdb to find the issues and I still don’t know what the underlying julia issues are and when they will get fixed :wink: See: https://github.com/JuliaLang/julia/issues/2453330. Hopefully we look at a better story with Julia 1.0!

0 commit comments

Comments
 (0)