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

Support coverage of package extension ? #52

Closed
BambOoxX opened this issue Mar 24, 2024 · 4 comments
Closed

Support coverage of package extension ? #52

BambOoxX opened this issue Mar 24, 2024 · 4 comments

Comments

@BambOoxX
Copy link
Contributor

Hi, I just tried to use LocalCoverage on a package with an extension, but it seems no coverage is generated for these files, even though the tests started by generate_coverage call methods from the extension. Is this currently supported ?

@tpapp
Copy link
Collaborator

tpapp commented Mar 24, 2024

We just call

Pkg.test(pkg; coverage = true, ...)

I am not aware of a way to generate coverage for dependencies, but if you know one, PRs are welcome.

I would recommend asking about this on Discourse, then if there is a viable way we can incorporate it.

@BambOoxX
Copy link
Contributor Author

@tpapp So actually it works, but is not the default. Since package extensions live under Mypackage > ext and not Mypackage > src the default used in

folder_list = ["src"],
ignores the coverage for any extension.

There are three solutions there.

  1. Ignore pre 1.9 packages and change this default to ["src","ext"] to encompass any extension
  2. Make a switch based on isdefined(Base,:get_extension) that would add "ext" to the list of folders on 1.9+ julia.
  3. Do nothing but inform the user in README that it is the way to activate this.

What is your opinion ?

@BambOoxX
Copy link
Contributor Author

BambOoxX commented Apr 8, 2024

Ha, another comment, related to the addition of the "ext" subfolder by default. The current implementation errors if "ext" is provided in the list of subdirs, but does not exist. So there may be something to modify there as well in case you want to change the defaults to account for the extensions' directory.

@BambOoxX
Copy link
Contributor Author

BambOoxX commented May 4, 2024

I'll close this for now, but that may be useful to others

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

No branches or pull requests

2 participants