You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is by design, and I realise the API is incubating, but if you have a java file with a single warning at compile time then a ProgressListener with type OperationType.PROBLEMS will receive a single ProgressEvent with descriptor of type ProblemDescriptor containing the warning info. That's all as expected.
If there is more than 1 java warning in the file then the ProgressListener will receive the same single ProgressEvent with type ProblemDescriptor but then will receive no more ProblemDescriptor types but instead will receive a single event with a ProblemAggregationDescriptor descriptor. This will contain all the warnings but will also include the already reported warning.
Is the aggregated descriptor supposed to contain the warning that's already been reported on? If so, can I always assume that the first in the list of aggregated problems will have already been reported and I can ignore it? If not, then can it be not be added to the aggregated problems?
Expected Behavior
For the aggregation to not contain any problems already passed on to the listener.
Context (optional)
I'm trying to report on compiler warnings/errors and I don't really want to have to record all the events I receive and make sure they're not duplicates. If I can always ignore the first aggregated problem then that's fine.
Steps to Reproduce
Create a basic java project with a single java class and ensure there are multiple warnings in the code.
Run the :classes task with a ProgressListener of type OperationType.PROBLEMS. I use the Tooling API for this.
Note the ProgressEvents with descriptors of type ProblemAggregationDescriptor and ProblemDescriptor.
Current Behavior
Not sure if this is by design, and I realise the API is incubating, but if you have a java file with a single warning at compile time then a
ProgressListener
with typeOperationType.PROBLEMS
will receive a singleProgressEvent
with descriptor of typeProblemDescriptor
containing the warning info. That's all as expected.If there is more than 1 java warning in the file then the
ProgressListener
will receive the same singleProgressEvent
with typeProblemDescriptor
but then will receive no moreProblemDescriptor
types but instead will receive a single event with aProblemAggregationDescriptor
descriptor. This will contain all the warnings but will also include the already reported warning.Is the aggregated descriptor supposed to contain the warning that's already been reported on? If so, can I always assume that the first in the list of aggregated problems will have already been reported and I can ignore it? If not, then can it be not be added to the aggregated problems?
Expected Behavior
For the aggregation to not contain any problems already passed on to the listener.
Context (optional)
I'm trying to report on compiler warnings/errors and I don't really want to have to record all the events I receive and make sure they're not duplicates. If I can always ignore the first aggregated problem then that's fine.
Steps to Reproduce
Create a basic java project with a single java class and ensure there are multiple warnings in the code.
Run the
:classes
task with aProgressListener
of typeOperationType.PROBLEMS
. I use the Tooling API for this.Note the
ProgressEvents
with descriptors of typeProblemAggregationDescriptor
andProblemDescriptor
.The code appears to be here
Gradle version
8.7-rc-1
Build scan URL (optional)
No response
Your Environment (optional)
No response
The text was updated successfully, but these errors were encountered: