julia-runtest icon indicating copy to clipboard operation
julia-runtest copied to clipboard

add `optimize` as an input

Open longemen3000 opened this issue 10 months ago • 7 comments

solves #139

longemen3000 avatar Feb 04 '25 21:02 longemen3000

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (9ed3aa0) to head (ee6f03f).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #140   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines            2         2           
=========================================
  Hits             2         2           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 04 '25 21:02 codecov[bot]

Hmmm. Could the user use the existing mechanism for passing arbitrary test args?

DilumAluthge avatar Feb 04 '25 22:02 DilumAluthge

Hmmm. Could the user use the existing mechanism for passing arbitrary test args?

test_args are passed after -- so no?

giordano avatar Feb 04 '25 22:02 giordano

Ideally, a julia-args input could be added, but it clashes with the existing julia input.

longemen3000 avatar Feb 04 '25 22:02 longemen3000

A julia-args input makes sense to me. Why can't we add that?

DilumAluthge avatar Feb 04 '25 23:02 DilumAluthge

What would be the behaviour when passing julia-args? I can think of two options:

  • overwrite existing arguments
  • append julia-args to the existing arguments

longemen3000 avatar Feb 05 '25 00:02 longemen3000

Ah, I see. I was thinking "append". Maybe we could explicitly name it additional-julia-args to make that more clear?

DilumAluthge avatar Feb 05 '25 12:02 DilumAluthge

Bump. I'm very interested in having this functionality for test suits I run that are dominated by compilation times. It'd be nice to have julia-args but even just the functionality already in this PR would be great.

Ah, I see. I was thinking "append". Maybe we could explicitly name it additional-julia-args to make that more clear?

We could call it that, but then it wouldn't match the keyword argument to Pkg.test which isn't ideal.

From the Pkg.test docstring:

The tests are executed in a new process with check-bounds=yes and by default startup-file=no. If using the startup file (~/.julia/config/startup.jl) is desired, start julia with --startup-file=yes. Inlining of functions during testing can be disabled (for better coverage accuracy) by starting julia with --inline=no. The tests can be run as if different command line arguments were passed to julia by passing the arguments instead to the julia_args keyword argument, e.g.

 Pkg.test("foo"; julia_args=["--inline"])

MasonProtter avatar Mar 26 '25 23:03 MasonProtter

Also very interested in this functionality.

tomchor avatar Mar 27 '25 23:03 tomchor

IIUC, with Pkg.test, julia_args overwrites other values: https://github.com/JuliaLang/Pkg.jl/blob/b323a38299903e613540455c044aedfab382f94f/src/Operations.jl#L2023. Pkg.test does not have inline::Bool for instances, but you are calling it from a julia session with some value so that sets the default that could be overwritten. So maybe our inline option is similar.

I agree with Mason that we should use the same name, julia_args.

For this PR it seems consistent with how the existing options work, so I don't think we should block it on adding julia_args. We already have options redundant with julia_args, namely inline checkbounds, depwarn, and so forth.

ericphanson avatar Mar 28 '25 11:03 ericphanson

I'm also interested in this functionality. Would it be possible to merge this in and address the julia-args question separately?

juliasloan25 avatar Nov 10 '25 18:11 juliasloan25