| Summary: | Removing baseline triggers a build | ||
|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Deepak Azad <deepakazad> |
| Component: | API Tools | Assignee: | Vikas Chandra <Vikas.Chandra> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | curtis.windatt.public, daniel_megert, jamesblackburn+eclipse, Michael_Rennie, Vikas.Chandra |
| Version: | 3.7 | Keywords: | noteworthy, performance |
| Target Milestone: | 4.13 M3 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/146515 https://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=9559ad9b0e4f27a88f9a108de69c741c1ddd88fb |
||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 498183, 549369 | ||
|
Description
Deepak Azad
> Is the full build really needed ? A build is needed, as our builder adds / removes our markers, but it does not need to be a full build > Can't we simply remove the markers associated with baseline problems ? In your example we would want to see the markers created, not removed -> you removed the default baseline so we need to report that on API tools enabled projects I think the fix for properly handling missing baseline markers for bug 344110 would cover this issue as well. (In reply to comment #1) > > Can't we simply remove the markers associated with baseline problems ? > > In your example we would want to see the markers created, not removed -> you > removed the default baseline so we need to report that on API tools enabled > projects To give more detail, I enabled debug options for o.e.pde.api.tools and saw these debug messages when I deselected the baseline ---------------------------------------------------------------------------- ApiAnalysis builder - Starting build of org.eclipse.jdt.ui @ Thu Apr 28 21:18:56 IST 2011 Build state file C:\Workspaces\runtime\builder\.metadata\.plugins\org.eclipse.core.resources\.projects\org.eclipse.jdt.ui\org.eclipse.pde.api.tools\state.dat does not exist cleaning unsupported tag problems cleaning api use problems creating marker for: API problem: severity: ERROR category: API_BASELINE element kind: RESOURCE kind: API_BASELINE_MISSING flags: NO_FLAGS message id: 1 message:An API baseline has not been set for the current workspace. Created the marker: 8430 - [sourceId=API Tools, apiMarkerID=1, problemid=1460666369, charEnd=-1, severity=2, lineNumber=-1, charStart=-1, message=An API baseline has not been set for the current workspace.] creating marker for: API problem: ui/org/eclipse/jdt/internal/ui/compare/JavaStructureDiffViewer.java severity: WARNING category: USAGE element kind: REFERENCE_TYPE kind: ILLEGAL_EXTEND flags: NO_FLAGS message id: 9 message:JavaStructureDiffViewer illegally extends StructureDiffViewer Created the marker: 8431 - [sourceId=API Tools, problemid=571473929, apiMarkerID=3, messagearguments=StructureDiffViewer#JavaStructureDiffViewer, org.eclipse.jdt.internal.core.JavaModelManager.handleId==org.eclipse.jdt.ui/ui<org.eclipse.jdt.internal.ui.compare{JavaStructureDiffViewer.java[JavaStructureDiffViewer, charEnd=2317, severity=1, lineNumber=56, charStart=2294, problemTypeName=org.eclipse.jdt.internal.ui.compare.JavaStructureDiffViewer, message=JavaStructureDiffViewer illegally extends StructureDiffViewer] creating marker for: API problem: ui/org/eclipse/jdt/internal/ui/javaeditor/JavaSourceViewer.java severity: WARNING category: USAGE element kind: REFERENCE_TYPE kind: ILLEGAL_EXTEND flags: NO_FLAGS message id: 9 message:JavaSourceViewer illegally extends ProjectionViewer Created the marker: 8432 - [sourceId=API Tools, problemid=571473929, apiMarkerID=3, messagearguments=ProjectionViewer#JavaSourceViewer, org.eclipse.jdt.internal.core.JavaModelManager.handleId==org.eclipse.jdt.ui/ui<org.eclipse.jdt.internal.ui.javaeditor{JavaSourceViewer.java[JavaSourceViewer, charEnd=2809, severity=1, lineNumber=69, charStart=2793, problemTypeName=org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer, message=JavaSourceViewer illegally extends ProjectionViewer] creating marker for: API problem: ui/org/eclipse/jdt/internal/ui/util/ViewerPane.java severity: WARNING category: USAGE element kind: REFERENCE_TYPE kind: ILLEGAL_EXTEND flags: NO_FLAGS message id: 9 message:ViewerPane illegally extends ViewForm Created the marker: 8433 - [sourceId=API Tools, problemid=571473929, apiMarkerID=3, messagearguments=ViewForm#ViewerPane, org.eclipse.jdt.internal.core.JavaModelManager.handleId==org.eclipse.jdt.ui/ui<org.eclipse.jdt.internal.ui.util{ViewerPane.java[ViewerPane, charEnd=1072, severity=1, lineNumber=27, charStart=1062, problemTypeName=org.eclipse.jdt.internal.ui.util.ViewerPane, message=ViewerPane illegally extends ViewForm] Saving build state for project: org.eclipse.jdt.ui Saved in 0 ms Finished build of org.eclipse.jdt.ui @ Thu Apr 28 21:19:10 IST 2011 Thu Apr 28 21:19:10 IST 2011 - [Worker-3] Builder finished: ApiAnalysisBuilder(org.eclipse.jdt.ui; []) time: 13969ms Thu Apr 28 21:19:10 IST 2011 - [Worker-3] Checking if need to build. Starting delta computation between: ElementTree(2) and ElementTree(13) Thu Apr 28 21:19:10 IST 2011 - [Worker-3] End delta computation. (0ms). Thu Apr 28 21:19:10 IST 2011 - [Worker-3] ExternalToolBuilder(org.eclipse.jdt.ui; []) needs building because of changes in: org.eclipse.jdt.ui Thu Apr 28 21:19:10 IST 2011 - [Worker-3] Invoking (INCREMENTAL_BUILD) on builder: ExternalToolBuilder(org.eclipse.jdt.ui; []) Thu Apr 28 21:19:10 IST 2011 - [Worker-3] Computing delta for project: org.eclipse.jdt.ui Thu Apr 28 21:19:10 IST 2011 - [Worker-3] Finished computing delta, time: 0ms Thu Apr 28 21:19:10 IST 2011 - [Worker-3] /org.eclipse.jdt.ui[*]: {DESCRIPTION} Thu Apr 28 21:19:10 IST 2011 - [Worker-3] Builder finished: ExternalToolBuilder(org.eclipse.jdt.ui; []) time: 31ms Thu Apr 28 21:19:10 IST 2011 - [Worker-3] Top-level build-end time: 14843 Thu Apr 28 21:19:10 IST 2011 - [Worker-3] Auto-Build requested, needsBuild: false state: 4 delay: 100 Thu Apr 28 21:23:56 IST 2011 - [Worker-4] Auto-Build requested, needsBuild: false state: 0 delay: 100 Thu Apr 28 21:23:56 IST 2011 - [Worker-4] Auto-Build requested, needsBuild: false state: 4 delay: 100 ------------------------------------------------------------------------------ - Ok, the first marker has to be created, but the rest do not have to be created again. What I am trying to say is, since the exact user action is known the builder can be made smart to act accordingly. I disagree ;-) I would expect that the API Tools marker have cetain IDs. Removing a baseline should 1. remove those markers 2. add a marker for missing baseline if the preference/property is not 'Ignore' > Ok, the first marker has to be created, but the rest do not have to be > created again. Why would you not want to see the API tools warning for illegal usage? A baseline is only required for binary compatible problem reporting, our builder can continue to show you illegal use, bad problem filters, illegal javadoc tags, etc. > I would expect that the API Tools marker have cetain IDs. They do, but as I mentioned on the other bug, in the current state our builder handles all of our marker changes, so we would have to look at separating that out or other ways to update markers when we don't want to run a build. (In reply to comment #4) > > Ok, the first marker has to be created, but the rest do not have to be > > created again. > > Why would you not want to see the API tools warning for illegal usage? Sure, I want to see them, but these markers are already there they do not have to be created *again* :) > They do, but as I mentioned on the other bug, in the current state our builder
> handles all of our marker changes, so we would have to look at separating that
> out or other ways to update markers when we don't want to run a build.
Yes, that code would have to be moved or copied, but I don't think this is much work.
A similar fix is required for the API use scan preference page as well. Steps: 1. add a use scan location -> Apply -> prompted for build [OK] 2. remove the use scan -> Apply -> prompted for build [BAD], we only need to remove the markers New Gerrit change created: https://git.eclipse.org/r/146515 Gerrit change https://git.eclipse.org/r/146515 was merged to [master]. Commit: http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=9559ad9b0e4f27a88f9a108de69c741c1ddd88fb Can either bug submitter or bug assignee ( if different) please verify this defect? verified on Version: 2019-09 (4.13) Build id: I20190819-2355 |