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

"--plugin kaocha.plugin/profiling" does not run when "--watch" is used #332

Closed
realgenekim opened this issue Nov 18, 2022 · 4 comments · Fixed by #393
Closed

"--plugin kaocha.plugin/profiling" does not run when "--watch" is used #332

realgenekim opened this issue Nov 18, 2022 · 4 comments · Fixed by #393
Labels
ergonomics Making Kaocha delightful to work with and people more efficient improvement Incremental improvement of an existing feature

Comments

@realgenekim
Copy link

I'm not sure if this is a documentation issue or a functionality issue:

Currently, --plugin kaocha.plugin/profiling does not work when using --watch — I was expecting this to work, hoping that I could find all the tests that need to be flagged with meta of :integration. Instead, profiling information never appeared. To make it run, I had to remove --watch from command line.

Clojurians Slack discussion with @plexus here: https://clojurians.slack.com/archives/CCY2V0U6A/p1668771964181979

PS: thank you @plexus and everyone else who has made kaocha so amazing — I use it in all my projects that I care about. For me, the --watch with notifier functionality on macOS makes for a nearly sublime development experience, in combination of the REPL.

@alysbrooks
Copy link
Member

Hi Gene! Thanks for the kind words!

I think we probably want these to work together. Looking at the code, we don't appear to be running the post-summary hook that the profiling plugin uses to print the summary.

@plexus
Copy link
Member

plexus commented Nov 21, 2022

It seems I chose fairly early on to run it from the specific entry point (kaocha.runner), rather than in the shared logic in kaocha.api

commit 8935d79609970e5b58089cd1f971832e9c6b4f2c
Author: Arne Brasseur <arne@arnebrasseur.net>
Date:   Mon Jul 16 10:53:43 2018 +0200

    Run post-summary from kaocha.runner, not from kaocha.api
    
    Post-summary is mostly intended for side effects, outputing extra stuff at the
    end of the run (like profiling results). It makes more sense not to run it when
    using the API, this also prevents noise in EDN outputs like --print-result.

I think this makes sense, letting specific entry points opt-in to this behavior. I think it would make sense to let kaocha.repl also handle post-summary. I'll make an issue for that.

@plexus plexus added improvement Incremental improvement of an existing feature ergonomics Making Kaocha delightful to work with and people more efficient labels Nov 21, 2022
@plexus
Copy link
Member

plexus commented Jan 25, 2023

Moving this to "Out of Scope" on the project board since we are already tracking #335

@alysbrooks
Copy link
Member

alysbrooks commented May 6, 2023

Profiling now runs from --watch, released in:

[lambdaisland/kaocha "1.83.1316"]
{lambdaisland/kaocha {:mvn/version "1.83.1316"}}```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ergonomics Making Kaocha delightful to work with and people more efficient improvement Incremental improvement of an existing feature
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants