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

More Problems API Feedback #28999

Closed
Arthurm1 opened this issue Apr 29, 2024 · 3 comments
Closed

More Problems API Feedback #28999

Arthurm1 opened this issue Apr 29, 2024 · 3 comments
Labels
a:feature A new functionality closed:duplicate Duplicated or superseeded by another issue in:problems problems api

Comments

@Arthurm1
Copy link

Expected Behavior

Some feedback on the Problems API which would make it easier to use from an IDE perspective...

  1. For Java errors/warnings, the ProblemAggregationEvent#getProblemAggregation#.getProblemContext#get(XX)#getLocations used to contain a TaskPathLocation (I think it was in Gradle 8.6?). It no longer does (Gradle 8.8)
    Could this be put back in?
    It allows me to work out exactly what Project/SourceSet the problem relates to. E.g. if I can see the TaskPath is something like :foo:compileTestJava then I know it's project Foo sourceSet test.
    My only other way of working this out is to extract the FileLocation#getPath and then iterate through all projects/sourcesets' source directories and see if they are parent paths of the FileLocation which is very slow when there's a large number of projects and/or large number of warnings/errors.

  2. Could the AggregatingProblemConsumer#thresholdForIntermediateSummary be set from some Gradle/Project/System property? Currently it's set to 10_000. If I can set it to 1 (so it's effectively turned off) then I wouldn't have to handle ProblemAggregationEvent at all, only SingleProblemEvent.
    The advantage to me is that I get problems as the projects are compiled, rather than at the end. The IDE has a nicer feel when you're compiling and you see errors/warnings appear as you go rather than getting no feedback until after compilation is finished.
    It also means that I don't have to worry about any changes to the ProblemAggregation API.
    Also - SingleProblemEvents are sent before the FinishEvent is sent which makes it easier to know when to create summary information about problems (e.g. total warning/error count per project/sourceset) whereas ProblemAggregationEvents are sent after the taskpath they are reporting on has already sent a FinishEvent
    Why does the Problem Aggregation exist? For performance reasons?

Current Behavior (optional)

No response

Context

Trying to give the best IDE experience to the user when reporting info from the Problems API.

@Arthurm1 Arthurm1 added a:feature A new functionality to-triage labels Apr 29, 2024
@ov7a
Copy link
Member

ov7a commented Apr 30, 2024

This issue needs a decision from the team responsible for that area. They have been informed. Response time may vary.

@ov7a ov7a added in:problems problems api 👋 team-triage Issues that need to be triaged by a specific team and removed to-triage labels Apr 30, 2024
@donat
Copy link
Member

donat commented May 9, 2024

@Arthurm1 Thank you for the feedback, we really appreciate it!

Regarding, TaskPathLocation, we had to remove this feature because it introduced a major performance regression in Gradle. It should be possible to get the same information on Tooling API client side from the progress events. Nonetheless I'll create an issue to capture that information in a more convenient way.

The problem aggregation is very similar story. It was introduced to deal with large quantities of problems reported. The intention is also to provide a smooth experience: provide a few problems to the client while the build is running, and send the rest at the end. How many compiler warnings is too little or too much is something we can reconsider. I'm interested in your feedback here.

Also, seems like you are vested in this topic but I cannot seem to find you on the Gradle Community slack channel. I encourage you to join. You can get an invite here. With that, we'd have a directly line of communication.

@donat
Copy link
Member

donat commented May 9, 2024

Follow-up issues created; I'm closing this one.

@donat donat closed this as not planned Won't fix, can't repro, duplicate, stale May 9, 2024
@donat donat removed to-triage 👋 team-triage Issues that need to be triaged by a specific team labels May 9, 2024
@ljacomet ljacomet added closed:duplicate Duplicated or superseeded by another issue and removed to-triage labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature A new functionality closed:duplicate Duplicated or superseeded by another issue in:problems problems api
Projects
None yet
Development

No branches or pull requests

4 participants