-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behavior changes when flag --code-coverage=true is used in 1.0.3 #30872
Comments
Bounds check elision can change the results. |
Testing locally, that didn't matter. |
How did you test locally? Did you recompile the package with the different flag? |
First, whether you run Pkg.test("PlanarConvexHulls", coverage=true) or Pkg.test("PlanarConvexHulls", coverage=false) tests will be run in a new process with For more evidence, you can |
We also have a similar issue in our private repository at RelationalAI, but couldn't create a small snippet to reproduce the issue, yet. |
So to be clear, this has not really anything to do with Pkg but difference in behavior in running code depending on the |
@KristofferC Yeah, that's correct. At least in our case, just running Julia with An update on the issue on our side, it's solved after we've removed an explicit type declaration on a local variable, which is storing the value returned by
to
|
I just ran into this again in a different package (see referenced PR above). |
Apparently fixed already |
I found in tkoolen/PlanarConvexHulls.jl#1 that running tests with code coverage on resulted in a test failure that was not present when code coverage is off. This seems to have been fixed in 1.1.0.
I've tried to reduce the example a bit in the PR branch (to a single 94 line file: https://github.com/tkoolen/PlanarConvexHulls.jl/blob/821015de83c223accb9fd93fd98c4c5a4a65212f/test/runtests.jl), but it's a bit finicky. Removing or adding statements can cause tests to pass. Unfortunately, it still uses StaticArrays and LinearAlgebra, as my attempt to remove either one caused the example no longer reproduce the behavior. Similarly, adding an
@show
statement here: https://github.com/tkoolen/PlanarConvexHulls.jl/blob/821015de83c223accb9fd93fd98c4c5a4a65212f/test/runtests.jl#L36 resulted in different behavior.To reproduce,
add https://github.com/tkoolen/PlanarConvexHulls.jl.git#tk/debug-travis
, runand compare to
coverage=false
.The text was updated successfully, but these errors were encountered: