Skip to content

Upcoming compatibility issue with PackageCompiler due to missing 'stdlibs_in_sysimage' #71

@CrispyCow

Description

@CrispyCow

Hello,
Apologies if I've got anything wrong in this, I am still not very familiar with Julia packages and with open source projects in general.

I am raising this issue to flag an upcoming compatibility problem you might have with PackageCompiler.jl when they make their next release.

I have been working with the latest PackageCompiler code pulled straight from the main branch of there repo and have found it causes errors in JuliaC. It can reproduced simply by checking out the latest PackageCompiler code with ] add https://github.com/JuliaLang/PackageCompiler.jl and running the JuliaC test suite. Heres the error from that:

Programmatic API (trim): Error During Test at C:\Users\chris\Repos\JuliaC.jl\test\programatic.jl:14
  Got exception outside of a @test
  UndefVarError: `stdlibs_in_sysimage` not defined in `PackageCompiler`
  Suggestion: check for spelling errors or missing imports.
  Stacktrace:
    [1] getproperty
      @ .\Base_compiler.jl:47 [inlined]
    [2] bundle_products(recipe::BundleRecipe)
      @ JuliaC C:\Users\chris\Repos\JuliaC.jl\src\bundling.jl:19

I have traced this error to this commit in PackageCompiler that removed stdlibs_in_sysimage and seemingly replaced it with default_sysimage_stdlibs.

The fix could be as simple as renaming stdlibs_in_sysimage too default_sysimage_stdlibs, although that breaks older versions of PackageCompiler. I have a fix in my fork that seems to work for with both versions by using an isdefined() but I am unsure if that is the best method as a permanent solution.

As a stopgap you might want to consider adding something to the compat to limit JuliaC to using the current version of PackageCompiler (2.2.3) or older if you get a release out before they do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions