Skip to content
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

Unify nature checks and reuse existing constants from core.natures.PDE #941

Conversation

HannesWell
Copy link
Member

No description provided.

Copy link

github-actions bot commented Nov 27, 2023

Test Results

   291 files  ±0     291 suites  ±0   56m 35s ⏱️ + 1m 35s
 3 580 tests ±0   3 504 ✅ ±0   76 💤 ±0  0 ❌ ±0 
11 037 runs  ±0  10 806 ✅ ±0  231 💤 ±0  0 ❌ ±0 

Results for commit 0e589ca. ± Comparison against base commit 8bc60ea.

♻️ This comment has been updated with latest results.

@HannesWell HannesWell force-pushed the reuse_existing_manifest-builder_constant branch 2 times, most recently from 2a5a5f3 to 940a8a9 Compare November 28, 2023 00:09
@HannesWell HannesWell changed the title Reuse existing PDE.MANIFEST_BUILDER_ID constant in MinimalState Unify nature checks and reuse existing constants from core.natures.PDE Nov 28, 2023
@HannesWell HannesWell marked this pull request as draft November 28, 2023 00:18
@HannesWell
Copy link
Member Author

I have now taken this as an opportunity to replace all occurrences of PDE nature and builder literals by the corresponding constants in the PDE class and to leveraging the different PDE.hasXNature methods.

Additionally I moved the isBndProject(IProject) method from BndProject to the PDE class to align it with the other methods.

I also contemplate to rename the hasXNature() method to isXProject(), which I would consider a more speaking name.
But if these names are changed, we could alternativly consider to do the opposite and move the hasXNature respectivly isXProject methods as well as the constants to the corresponding XProject classes in the same package, just like it used to be for the BndProject class.

What's the opinion of the others? Keep one central class for all nature and builder ids and hasNature() or isProject() methods? Or should those constants and methods be added to the corresponding project class?
At the moment we have a split between BNDProject and Plugin/Feature/SiteProject and I would like to unify this.

@laeubi
Copy link
Contributor

laeubi commented Nov 28, 2023

I would appreciate if we could delay such cleanups/unification until the pending PRs are merged so they don't get delayed/distorted by rebase conflicts, for me central classes tend to be convoluted by more and more unrelated stuff over time so I think keeping it on the project classes seems good.

@laeubi
Copy link
Contributor

laeubi commented Feb 11, 2024

@HannesWell still relevant?

@HannesWell HannesWell force-pushed the reuse_existing_manifest-builder_constant branch from 940a8a9 to 534e1d5 Compare February 18, 2024 17:25
@HannesWell HannesWell force-pushed the reuse_existing_manifest-builder_constant branch 3 times, most recently from e8ea3a7 to 92378a0 Compare April 26, 2024 21:54
@HannesWell
Copy link
Member Author

HannesWell commented Apr 26, 2024

I also contemplate to rename the hasXNature() method to isXProject(), which I would consider a more speaking name.
But if these names are changed, we could alternativly consider to do the opposite and move the hasXNature respectivly isXProject methods as well as the constants to the corresponding XProject classes in the same package, just like it used to be for the BndProject class.

Implemented that now which makes the PDE class obsolete since all methods and constants have been moved to the corresponding <Type>Project classes. Furthermore I renamed BaseProject to PDEProject since fundamental constants and methods reside there now and I think the latter name more expressive.

Now I just have to find out, why the tests are failing...

@HannesWell HannesWell force-pushed the reuse_existing_manifest-builder_constant branch 2 times, most recently from eed8a92 to 5be7b7d Compare May 18, 2024 17:46
@HannesWell HannesWell force-pushed the reuse_existing_manifest-builder_constant branch 5 times, most recently from 67d5009 to 46d8e9e Compare July 13, 2024 16:49
@HannesWell HannesWell force-pushed the reuse_existing_manifest-builder_constant branch from 46d8e9e to e42e161 Compare July 13, 2024 16:49
@HannesWell HannesWell marked this pull request as ready for review July 13, 2024 16:50
@HannesWell
Copy link
Member Author

This should finally work.
@laeubi or @merks do you have any remarks on this one?

@HannesWell HannesWell force-pushed the reuse_existing_manifest-builder_constant branch 3 times, most recently from ad59edf to 5f5f621 Compare July 13, 2024 17:29
@HannesWell HannesWell force-pushed the reuse_existing_manifest-builder_constant branch from 5f5f621 to 3052714 Compare July 13, 2024 17:57
@HannesWell HannesWell force-pushed the reuse_existing_manifest-builder_constant branch from 3052714 to 0e589ca Compare July 14, 2024 07:24
@HannesWell
Copy link
Member Author

HannesWell commented Jul 14, 2024

These quality-gates are really pedantic, but in the end that's good. And now finally the build is green. 🎉
Submitting.
Thanks to everyone that participated.

@HannesWell HannesWell merged commit a37e0a1 into eclipse-pde:master Jul 14, 2024
17 checks passed
@HannesWell HannesWell deleted the reuse_existing_manifest-builder_constant branch July 14, 2024 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants