-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
crystal tool unreachable
support for specs
#15061
Comments
Could you elaborate what stands in the was of doing that? What kind of are you thinking about? |
Running the unreachable tool on a dummy file that manually invokes the spec runner seems to work (although it's showing some results that I don't think should be there). But the spec runner is internal API so it took me a while to figure out that you could even do this — it's not ideal for library maintainers. |
I been running it against the same file I needed for kcov. Which is basically: require "../../src/components/clock/spec/**" Kinda annoying, but works out of the box w/o any hacks/required changes to the compiler or anything. 🤷 |
The tool is calling |
That is irrelevant here. I'm sure this same approach would work for any shard. This is basically what |
Oh I see, when trying to run this from the command line it wasn't reaching anything so I assumed it was because the spec runner wasn't actually running. 😅 Having a file to require all specs for coverage isn't really an issue, but it would be nice if |
It should if you run it directly. If you run it through |
I'm running |
What happens if you run Note the |
Yea the |
The
unreachable
tool is great for applications because there's an entrypoint. This doesn't really work for normal shards, most wont have an entrypoint and you can't really target specs for coverage (without some hacks at least). I think there should be some support by the tool or bycrystal spec
for unreachable code coverage.The text was updated successfully, but these errors were encountered: