-
Notifications
You must be signed in to change notification settings - Fork 83
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
Remove usage of the sequence number from target files #1540
Conversation
This pull request changes some projects for the first time in this development cycle.
An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patch
Further information are available in Common Build Issues - Missing version increments. |
Test Results 285 files ±0 285 suites ±0 46m 15s ⏱️ - 3m 49s Results for commit 176b613. ± Comparison against base commit cb0d691. This pull request removes 1 test.
♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed my small concern that we might just change the checkProfile method to return false when the sequencer numbers are not equal. But given the sequence number seems poorly managed and poorly behave since forever, I'm not sure keeping it has any real significant value. I also checked that the Target DSL generator won't be broken by the changes, and that looks fine too.
This seem to affect a small area in API tools :-( Therefore I decided to start first with a much smaller approach here: in the long run I still think we should get rid of the |
Yes, absolutely! For the reasons you listed in your initial message. In general I always found it odd that this was even 'necessary' and PDE should be smart enough to detect changes without such a counter that has to be persisted in the file. I can also have a look at this in detail, probably at the end of this week, but I like the overall direction very much. |
.../org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiModelFactory.java
Outdated
Show resolved
Hide resolved
dc88116
to
246e3ba
Compare
Currently there is an attribute 'sequenceNumber' that should change "whenever something in the target that affects the set of features and bundles that would be resolved" but effectively this never worked very well: - A sequence number is not mandatory - Target files are often edited by humans and it is easy to forget to increment those - Updating it was never public API so only with some operations it was possible to implicitly change that - it is only used to check if a P2 profile is up-to-date where the sequence number is a very bad indication as actually even things outside the target can influence it - even if the sequence number does not matches, P2TargetUtils performed some other checks if maybe the profile has not changed, so P2TargetUtils is already aware of changes without it To summarize if the sequence number did not changed the profile is considered clean (what might be wrong), if it changed we ignore it and check our self if it changed. To prevent us from strange errors and uncertainties, this now completely removes the 'sequenceNumber' and corresponding code leaving the responsibility to detect something changes completely to the implementation of the target location.
246e3ba
to
d8c58e8
Compare
With all the preliminary changes now we should be able to finally remove the sequence number all togehter! |
Currently there is an attribute
sequenceNumber
that should changebut effectively this never worked very well and is nowhere used in such a way:
To summarize if the sequence number did not changed the profile is considered clean (what might be wrong), if it changed we ignore it and check our self if it changed.
To prevent us from strange errors and uncertainties, this now completely removes the 'sequenceNumber' and corresponding code leaving the responsibility to detect something changes completely to the implementation of the target location.