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

Bug 580015: add support for multiple bin parsers #75

Merged
merged 11 commits into from
Nov 18, 2022

Conversation

betamaxbandit
Copy link
Contributor

Added ability to return a list of binary parser IDs, rather than a single ID. This supports build configurations that have multiple binaries with for example cross toolchains.

Change-Id: I1b7e47bf6a86bbd9f1c6b9646d008bac9479417d

Added ability to return a list of binary parser IDs, rather than a
single ID. This supports build configurations that have multiple
binaries with for example cross toolchains.

Change-Id: I1b7e47bf6a86bbd9f1c6b9646d008bac9479417d
Copy link
Member

@jonahgraham jonahgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is migrated from https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/194075 - so the comments from it are migrated to it.

Update since tags to 8.0.
Remove api filter.
Fix other since tags after removing of api filter.
Remove interface defaults.
Add default implementations where necessary.
Update tests - TBC.
@betamaxbandit
Copy link
Contributor Author

Hi @jonahgraham ,
Can you review my changes to the actual code please? Note I'm still working on the tests (TestICBuildConfiguration), but ran out of time today.

Copy link
Member

@jonahgraham jonahgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't look at tests, other than the location of them. Let me know if you need a suggestion of where they should go. It may also be appropriate to leave them there if there isn't anywhere better already.

@jonahgraham
Copy link
Member

@betamaxbandit Will you have time to look at this this week? It would be ideal to get this done in time for M3 which is 14 Nov.

@betamaxbandit
Copy link
Contributor Author

@betamaxbandit Will you have time to look at this this week? It would be ideal to get this done in time for M3 which is 14 Nov.

Hi Jonah,

Yes, I'll try. Thanks for the reminder.

@github-actions
Copy link

github-actions bot commented Nov 14, 2022

Test Results

     593 files       593 suites   16m 11s ⏱️
10 126 tests 10 104 ✔️ 22 💤 0
10 142 runs  10 120 ✔️ 22 💤 0

Results for commit 99a2295.

♻️ This comment has been updated with latest results.

@jonahgraham
Copy link
Member

There is a compilation failure now BTW:

Error:  Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:2.7.5:compile (default-compile) on project org.eclipse.cdt.docker.launcher: Compilation failure: Compilation failure: 
Error:  /home/runner/work/cdt/cdt/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChain.java:[70] 
Error:  	public class ContainerGCCToolChain extends PlatformObject implements IToolChain, IToolChain2 {
Error:  	             ^^^^^^^^^^^^^^^^^^^^^
Error:  The type ContainerGCCToolChain must implement the inherited abstract method IToolChain.getBinaryParserIds()
Error: [ERROR] 1 problem (1 error)
Error:  -> [Help 1]

@betamaxbandit
Copy link
Contributor Author

Hi @jonahgraham ,
I didn't mean to do that. Still getting used to the github i/f. I was trying to rebase on main, but not sure I did it correctly.

Removed ICBuildConfiguration.getBinaryParserId() and
IToolChain.getBinaryParserId(). Replaced with methods that return a list
of IDs.

Updated API changes doc.

Rearranged tests so that the test for IToolChain is in a new gcc test
plugin.
Added remaining project metadata for new gcc test plugin.
@betamaxbandit betamaxbandit marked this pull request as draft November 15, 2022 12:29
Fixed build props of new test plugin.

Fixed test, cleanup project afterwards.
@jonahgraham
Copy link
Member

Don't worry about the code cleanliness checks fails - there is a proposal to automate this in #166

@betamaxbandit betamaxbandit marked this pull request as ready for review November 15, 2022 14:14
@betamaxbandit
Copy link
Contributor Author

betamaxbandit commented Nov 15, 2022

Don't worry about the code cleanliness checks fails - there is a proposal to automate this in #166

Hi Jonah, ok, I won't.
I fixed the remaining problem which was the junit tests were failing. All tests pass now :-)
BTW thanks for bringing the "draft"/WIP status thing to my attention. That's useful when you're trying to finesse something.
Ready for review now.

Copy link
Member

@jonahgraham jonahgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine, just needs a N&N entry about the improved API.

In https://github.com/eclipse-cdt/cdt/blob/main/NewAndNoteworthy/CDT-11.0.md below Binary Parser code uses AutoCloseable section

## Core Build tool chains can now return multiple binary parsers

The `ICBuildConfiguration` and `IToolChain` interfaces now have a method, `getBinaryParserIds` that allows a build configuration or tool chain to return multiple binary parsers.

See https://github.com/eclipse-cdt/cdt/pull/75

NewAndNoteworthy/CHANGELOG-API.md Outdated Show resolved Hide resolved
@jonahgraham
Copy link
Member

Please mark this as ready for review when you are happy with it.

@betamaxbandit
Copy link
Contributor Author

Please mark this as ready for review when you are happy with it.

Ready for review.

Copy link
Member

@jonahgraham jonahgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - needs the code cleanliness sorted out. I would like to use this PR to test #166 if I can get that done.

@betamaxbandit
Copy link
Contributor Author

LGTM - needs the code cleanliness sorted out. I would like to use this PR to test #166 if I can get that done.

Oh ok. I don't really understand the actual cleanliness error. It says the following files are missing, but those file don't exist for me locally - only org.eclipse.jdt.core.prefs. Am I expected to generate them?

build/org.eclipse.cdt.build.gcc.core.tests/.settings/org.eclipse.core.resources.prefs
build/org.eclipse.cdt.build.gcc.core.tests/.settings/org.eclipse.jdt.launching.prefs
build/org.eclipse.cdt.build.gcc.core.tests/.settings/org.eclipse.jdt.ui.prefs
build/org.eclipse.cdt.build.gcc.core.tests/.settings/org.eclipse.pde.api.tools.prefs
build/org.eclipse.cdt.build.gcc.core.tests/.settings/org.eclipse.pde.prefs

Do you want me to do anything for #166 ?

@jonahgraham
Copy link
Member

Do you want me to do anything for #166 ?

No.

If I can get #166 to work it will magically and automatically fix this PR. If not I will fix it up manually and merge it in a few days (ahead of RC1 on Monday)

@jonahgraham jonahgraham merged commit c4761cf into eclipse-cdt:main Nov 18, 2022
jonahgraham pushed a commit that referenced this pull request Nov 18, 2022
Removed ICBuildConfiguration.getBinaryParserId() and
IToolChain.getBinaryParserId(). Replaced with methods that return a list
of IDs.

Updated API changes doc.

Rearranged tests so that the test for IToolChain is in a new gcc test
plugin.
jonahgraham pushed a commit that referenced this pull request Nov 18, 2022
Added remaining project metadata for new gcc test plugin.
jonahgraham pushed a commit that referenced this pull request Nov 18, 2022
Fixed build props of new test plugin.

Fixed test, cleanup project afterwards.
jonahgraham pushed a commit that referenced this pull request Nov 18, 2022
Update API and News documentation.
@jonahgraham
Copy link
Member

I discussed with @betamaxbandit and we agreed to decouple this from #166. So I manually fixed up the code cleanliness issue and pushed it.

PS I accidentally "rebased and merged" instead of "squashed and merged" so I ended up with a dumb commit message c4761cf - sorry about that.

@betamaxbandit
Copy link
Contributor Author

Thanks for merging @jonahgraham

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.

2 participants