Skip to content
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

Fix broken source_path handling. Explicitly test for coverage files #3284

Merged
merged 12 commits into from
Dec 21, 2022

Conversation

IanButterworth
Copy link
Member

@IanButterworth IanButterworth commented Dec 20, 2022

It's not clear to me why this didn't fail in #3281 . Urgh.. it was picking up a function and string-ing the name 🤦‍♂️

julia> Pkg.Operations.source_path
source_path (generic function with 2 methods)

julia> string("@", Pkg.Operations.source_path)
"@source_path"

This fixes a rather nasty missing local var bug introduced by #3281 that broke coverage generation in Pkg.test, and reinstates and expands testing for coverage files where they should and shouldn't be generated

@IanButterworth IanButterworth changed the title Fix broken source_path handling Fix broken source_path handling. Explicitly test for coverage files Dec 20, 2022
@IanButterworth IanButterworth requested a review from a team as a code owner December 20, 2022 22:38
@DilumAluthge DilumAluthge removed the request for review from a team December 21, 2022 02:08
@@ -1,6 +1,7 @@
module OffsetArraysExt

using HasExtensions, OffsetArrays
import HasExtensions: foo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops :p

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did lol :)

Pkg.test(TEST_PKG.name; coverage=true)
pkgdir = Base.locate_package(Base.PkgId(TEST_PKG.uuid, TEST_PKG.name))
# No coverage files being generated?
@test_broken TEST_PKG.name * ".cov" in readdir(pkgdir)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What fixed this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage files now have a PID, so maybe just not looking for the correct files?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Makes sense.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also pkgdir here is the source file not the src dir

@KristofferC KristofferC merged commit a8ae3c5 into JuliaLang:master Dec 21, 2022
@IanButterworth IanButterworth deleted the ib/ext_coverage branch December 21, 2022 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants