Skip to content

Incorrect assumption that Base.JLOptions().use_compiled_modules can be converted to a Bool #129

Open

Description

@jakobjpeters
julia> test(
           "Template";
           coverage = true,
           julia_args = `--color yes --compiled-modules existing`,
           logfilename = "test_report.xml"
       )

ERROR: LoadError: InexactError: Bool(2)
Stacktrace:
  [1] Bool
    @ ./bool.jl:190 [inlined]
  [2] gen_command(runner_code::String, julia_args::Cmd, coverage::Bool)
    @ TestReports ~/.julia/packages/TestReports/zj3uX/src/runner.jl:183
  [3] test!(pkg::String, errs::Vector{AbstractString}, nopkgs::Vector{AbstractString}, notests::Vector{AbstractString}, logfilename::String; coverage::Bool, julia_args::Cmd, test_args::Cmd)
    @ TestReports ~/.julia/packages/TestReports/zj3uX/src/runner.jl:281
  [4] test!
    @ ~/.julia/packages/TestReports/zj3uX/src/runner.jl:252 [inlined]
  [5] test(pkgs::Vector{String}; logfilename::Vector{String}, logfilepath::String, kwargs::@Kwargs{coverage::Bool, julia_args::Cmd})
    @ TestReports ~/.julia/packages/TestReports/zj3uX/src/runner.jl:333
  [6] test
    @ ~/.julia/packages/TestReports/zj3uX/src/runner.jl:317 [inlined]
  [7] #test#15
    @ ~/.julia/packages/TestReports/zj3uX/src/runner.jl:316 [inlined]
  [8] top-level scope
    @ /builds/optimization/Template.jl/scripts/test.jl:25
  [9] include(mod::Module, _path::String)
    @ Base ./Base.jl:306
 [10] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:317
 [11] _start()
    @ Base ./client.jl:550

Activity

  1. jakobjpeters commented on Oct 9, 2025

    @jakobjpeters
    Author
    $ julia --eval "@show Base.JLOptions().use_compiled_modules" --compiled-modules no
    (Base.JLOptions()).use_compiled_modules = 0
    
    $ julia --eval "@show Base.JLOptions().use_compiled_modules" --compiled-modules yes
    (Base.JLOptions()).use_compiled_modules = 1
    
    $ julia --eval "@show Base.JLOptions().use_compiled_modules" --compiled-modules existing
    (Base.JLOptions()).use_compiled_modules = 2
    
    $ julia --eval "@show Base.JLOptions().use_compiled_modules" --compiled-modules strict
    (Base.JLOptions()).use_compiled_modules = 3
  2. oxinabox commented on Oct 10, 2025

    @oxinabox
    Member

    should be an easy fix, do you want to make a PR?

  3. jakobjpeters commented on Oct 23, 2025

    @jakobjpeters
    Author

    I'll try to get to it in the near future!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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