Bug 405494 - [patch] Add support to know when a baseline has changed on-disk
Summary: [patch] Add support to know when a baseline has changed on-disk
Status: NEW
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Vikas Chandra CLA
QA Contact:
URL:
Whiteboard: stalebug 4.14
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-11 13:13 EDT by Michael Rennie CLA
Modified: 2023-07-26 07:18 EDT (History)
3 users (show)

See Also:


Attachments
Example fix (6.24 KB, patch)
2013-04-11 17:53 EDT, Curtis Windatt CLA
no flags Details | Diff
Example fix wrt current code base (5.88 KB, patch)
2019-07-30 02:12 EDT, Vikas Chandra CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2013-04-11 13:13:26 EDT
If you have a baseline version of Eclipse set up and you update that version - same location on-disk, but the bundles are updated - the baseline does not seem to refresh.

An example of this was Curtis updated his version of 4.2.2 to he also used as a baseline and there were invalid since tags reported on some of the platform UI bundles. Only after much fiddling and refreshing did he manage to get the baseline (in API tools) updated correctly and the errors went away.

It would be good if we could either just always make sure the baseline stays in the correct sync-state or warn the user that the baseline is out of sync. Personally I would rather just always try to keep it in sync (no warnings) and only warn if something fatal has happened and the baseline is no longer usable.
Comment 1 Curtis Windatt CLA 2013-04-11 13:17:42 EDT
This is the similar to what occurs with PDE Target Definitions.  If the content changes we cannot recognize it until the the target platform is reset.  We added a synchronize button to the preference page that resolves the current definition and compares it to the current platform.  If there is a different a dialog pops up to notify the user and and pressing ok/apply on the preference page will force a target platform reset.
Comment 2 Curtis Windatt CLA 2013-04-11 17:53:49 EDT
Created attachment 229649 [details]
Example fix

This patch adds a job that runs when the preference page is opened.  If the number of components at the default baseline location have changed, it sets the page to dirty and adds a warning message.  This is reasonably unintrusive, though a user quickly skipping through preference pages might get asked to do a workspace rebuild without knowing why.  In the target platform the user must hit a button to start the process, which could easily be implemented here.

Checking that no component name/versions have changes will require a lot more effort as doing so requires manifest loading (though we do this for the labels in the edit dialog).

Doing this in the background during startup seems wasteful as well because the baseline isn't going to change very often.
Comment 3 Dani Megert CLA 2013-04-12 02:37:54 EDT
(In reply to comment #2)

Couldn't you check the baseline the first time the API builder needs them? You could then simply report this as error, like the missing base line error.
Comment 4 Curtis Windatt CLA 2013-04-12 16:29:01 EDT
It appears comparing the component count is not sufficient.  Without loading the manifests we don't know that some of the bundles are source bundles (which are ignored), leading to different counts.

1) The baseline cache persisted between sessions remembers the locations of all the components, so checking that all those locations still exist would be reasonably fast.  The problem there is that performing an update on an application may not garbage collect the old bundles.

2) Checking that the list matches what is returned when loading the baseline location would be slower (as the target resolution code loads manifest files).

3) The slowest option is to reload the baseline entirely, but would obviously catch any problems.

(In reply to comment #3)
> (In reply to comment #2)
> 
> Couldn't you check the baseline the first time the API builder needs them?
> You could then simply report this as error, like the missing base line error.

Yes, we could check it at this time, but of course comes with a performance cost.  While the time heavily depends on I/O speed, for an SDK, option (1) takes < 2s, (2) takes < 5s, (3) takes 5-10s.
Comment 5 Eclipse Genie CLA 2019-03-23 18:03:31 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 6 Dani Megert CLA 2019-03-25 07:19:01 EDT
Vikas, please check whether this is still relevant.
Comment 7 Vikas Chandra CLA 2019-05-14 23:43:39 EDT
I will have a look at this for 4.13.
Comment 8 Vikas Chandra CLA 2019-07-30 02:12:36 EDT
Created attachment 279430 [details]
Example fix wrt current code base
Comment 9 Vikas Chandra CLA 2019-08-14 00:57:25 EDT
(In reply to Vikas Chandra from comment #8)
> Created attachment 279430 [details]
> Example fix wrt current code base

There are few open issues ( comment#4)

- Checking the versions could be 1 way ( fast and effective)
- Also it must be once only when API Analysis builder is initialized( comment#3)
Comment 10 Vikas Chandra CLA 2019-08-14 00:57:50 EDT
(In reply to Vikas Chandra from comment #9)
> (In reply to Vikas Chandra from comment #8)
> > Created attachment 279430 [details]
> > Example fix wrt current code base
> 
> There are few open issues ( comment#4)
> 
> - Checking the versions could be 1 way ( fast and effective)
> - Also it must be once only when API Analysis builder is initialized(
> comment#3)

Moving to 4.14
Comment 11 Eclipse Genie CLA 2021-08-04 03:48:32 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 12 Eclipse Genie CLA 2023-07-26 07:18:15 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.