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

Empty child reporter management #2192

Closed
geofjamg opened this issue Jul 3, 2022 · 1 comment
Closed

Empty child reporter management #2192

geofjamg opened this issue Jul 3, 2022 · 1 comment
Labels

Comments

@geofjamg
Copy link
Member

geofjamg commented Jul 3, 2022

  • Do you want to request a feature or report a bug?
    Feature

  • What is the current behavior?
    A major issue I had using reporter API is that I often end up with empty child reporter, because some reports that could go inside this reporter are optional (and depending of running case).
    One easy but bad answer to that is to state that this is up to reporter API user to handle this case and anticipate future empty reporter. This would be wrong because it is just impossible in most of the cases to know when creating the container (the reporter) how many reports will go inside.
    All these empty reporters decrease final readability.

  • What is the motivation / use case for changing the behavior?
    I can see 2 possible solutions (probably there is more):

  1. provide in the Reporter a cleanEmptyChildren method to clean everything at the end
reporter.cleanEmptyChildren()
  1. just handle empty reporters in the serialization with an option like:
reporter.write(true)
  • Please tell us about your environment:

    • PowSyBl Version: ...
    • OS Version: ...
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, spectrum, etc)

(if a question doesn't apply, you can delete it)

@flo-dup
Copy link
Contributor

flo-dup commented Mar 11, 2024

There's no difference between Reporter and Report anymore: there's only ReportNodes which may or may not contain children

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants