JuliaLang / PackageCompiler.jl

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

detect some error in julia code to fail early #819

Open xgdgsc opened 1 year ago

xgdgsc commented 1 year ago
  1. The output of versioninfo()
    Julia Version 1.9.0
    Commit 8e630552924 (2023-05-07 11:25 UTC)
    Platform Info:
    OS: Linux (x86_64-linux-gnu)
    CPU: 96 × Intel(R) Xeon(R) Gold 6248R CPU @ 3.00GHz
    WORD_SIZE: 64
    LIBM: libopenlibm
    LLVM: libLLVM-14.0.6 (ORCJIT, cascadelake)
    Threads: 42 on 96 virtual cores
    Environment:
    LD_LIBRARY_PATH = /opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib:/opt/rh/devtoolset-9/root/usr/lib64/dyninst:/opt/rh/devtoolset-9/root/usr/lib/dyninst:/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib
    JULIA_NUM_THREADS = 42
    JULIA_PKG_SERVER = https://mirrors.ustc.edu.cn/julia
    JULIA_EDITOR = code
  2. How you installed Julia juliaup
  3. A minimal working example (MWE), also known as a minimum reproducible example
    Base.@ccallable function increment32(count::Cint)::Cint
    count = increment(count)
    Var1 = someUndefinedVar2+1
    println("Incremented count: $count (Cint)")
    return count
    end

    Say modify the example as above. It would fail with UndefVarError after a lengthy system image compilation. Is it possible to detect those basic errors first and fail before image compilation?