Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344163 - Removing baseline triggers a build
Summary: Removing baseline triggers a build
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.13 M3   Edit
Assignee: Vikas Chandra CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy, performance
Depends on:
Blocks: 498183 549369
  Show dependency tree
 
Reported: 2011-04-28 12:32 EDT by Deepak Azad CLA
Modified: 2019-08-21 04:51 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Deepak Azad CLA 2011-04-28 12:32:56 EDT
- 1 project in the workspace o.e.jdt.ui
- one API baseline defined and selected
- Now deselect the baseline (the baseline is still defined but not selected anymore) and click ok
=> A dialog pops up asking for a full build. Is the full build really needed ? Can't we simply remove the markers associated with baseline problems ?

See also bug 344110.
Comment 1 Michael Rennie CLA 2011-04-28 12:45:50 EDT
> 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.
Comment 2 Deepak Azad CLA 2011-04-28 12:58:04 EDT
(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.
Comment 3 Dani Megert CLA 2011-04-28 13:03:47 EDT
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'
Comment 4 Michael Rennie CLA 2011-04-28 14:16:49 EDT
> 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.
Comment 5 Deepak Azad CLA 2011-04-28 20:39:46 EDT
(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* :)
Comment 6 Dani Megert CLA 2011-04-29 01:55:43 EDT
> 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.
Comment 7 Michael Rennie CLA 2011-05-04 15:12:35 EDT
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
Comment 8 Eclipse Genie CLA 2019-07-23 11:55:16 EDT
New Gerrit change created: https://git.eclipse.org/r/146515
Comment 10 Vikas Chandra CLA 2019-08-20 06:15:03 EDT
Can either bug submitter or bug assignee ( if different) please verify this defect?
Comment 11 Vikas Chandra CLA 2019-08-21 04:51:34 EDT
verified on
Version: 2019-09 (4.13)
Build id: I20190819-2355