Problem/Motivation
See #2818653: Allow object-based plugin definitions to be processed in DefaultPluginManager::findDefinitions() for similar. Object base definitions cannot use DerivativeDiscoveryDecorator and need to be able to.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | 2821189-deriver-21.patch | 16.04 KB | tim.plunkett |
| #20 | 2821189-deriver-20.patch | 15.97 KB | tim.plunkett |
| #20 | 2821189-deriver-20-interdiff.txt | 6.71 KB | tim.plunkett |
| #18 | 2821189-deriver-18-interdiff.txt | 3.39 KB | tim.plunkett |
| #18 | 2821189-deriver-18.patch | 10.05 KB | tim.plunkett |
Comments
Comment #2
tim.plunkettComment #3
eclipsegc commentedAfter a bit of thinking and discussion this seems great. My only reservation at this point is that we need test coverage for the setDeriver method.
Eclipse
Comment #4
tim.plunkettWe should resolve the approach in #2818653: Allow object-based plugin definitions to be processed in DefaultPluginManager::findDefinitions() before doing this, since they both expand PluginDefinitionInterface and should do it the same way.
Here's an updated patch with the new approach.
Comment #6
tim.plunkettThat went in, here's a new patch.
Ideally we'd finish expanding PDI all in one version.
wrt #3, I don't think the getter and setter need explicit test coverage, there is no logic in those.
Comment #7
tstoecklerRe #6: I personally don't necessarily agree with that standard, but we do generally test getters and setters. You can test both of them neatly in one test method. Don't feel strongly about this, though.
My main reservation about this, is why this is not a dedicated interface. Not all plugin definitions are necessarily derivable, so it seems sensible to keep the current separation of providing a separate
DerivablePluginDefinitionInterface.Comment #9
tim.plunkettOkay, I agree, and double checked with @EclipseGc who also prefers a separate interface. I think #4 was just a mistake on my part.
Interdiff against #2
Comment #11
tim.plunkettMissed a spot
Comment #12
jibranIt was marked internal so moving it is not a problem. We have a new test which is always great.
Comment #14
tstoecklerThanks for the quick follow-up, RTBC++!
Comment #15
xjmNote that issues like this should be targeted against 8.4.x, but can be considered for backport once they are committed to that branch. See the updated alpha release policy. Thanks!
Comment #16
tim.plunkettReroll after #2821191: Allow object-based plugin definitions to be processed in PluginDependencyTrait, no changes.
Comment #17
effulgentsia commentedAlthough this is just a code move, it's a move from an @internal to not, so I think this is the time to ask if we should change
DerivablePluginDefinitionInterfaceto not extendPluginDefinitionInterface. Note thatDependentPluginDefinitionInterfacein HEAD does not extendPluginDefinitionInterface.That
throw, along with the one a couple lines down so not in the diff, can now run for an object-based$base_definition, so we need to s/$base_definition['id']/$base_definition->id()/ as well. Which is maybe a reason to keepDerivablePluginDefinitionInterfaceas extendingPluginDefinitionInterface? Though if we decide to do that, then perhaps we need a followup to makeDependentPluginDefinitionInterfacealso extend that interface? I don't think it makes sense for those two to follow different patterns.'deriver'property public, in which case, wouldn't HEAD work due to that it's already casting to an array?Comment #18
tim.plunkett#17
1) Core has both of these patterns and it is very confusing. For example:
interface PluginWithFormsInterface extends PluginInspectionInterface {vs
interface PluginFormInterface {Because of the second point of your review, I think it's necessary and correct to have it extend PluginDefinitionInterface.
I will open a follow-up for DependentPluginDefinitionInterface
2) Nice catch! Fixed and added test coverage
3) I don't recall which project it was in particular, but as object-based plugin definitions catch on, this will absolutely become a problem.
Comment #20
tim.plunkettBefore, we only used the ID during the exception, so our test fixtures omitted it. But an ID is a required part of a plugin definition, so the tests were just cheating.
Comment #21
tim.plunkettRerolled since #2822752: Allow object-based plugin definitions to be created by non-annotated discovery went in.
Comment #22
effulgentsia commentedThe interdiffs since the last RTBC patch are all straightforward, so I feel ok with RTBC'ing this and remaining eligible to commit this.
Comment #23
effulgentsia commentedAdding review credit for #7.
Comment #26
effulgentsia commentedI'm ok with #18.1 and thanks for the fixes and tests for #18.2. Therefore, pushed to 8.4.x.
I'm not super convinced by #18.3, but as this is the last of the outstanding object-based definition issues, and the others all made their way into 8.3, I decided to cherry pick this one to 8.3 as well. In #2822752-22: Allow object-based plugin definitions to be created by non-annotated discovery, I proposed creating a single CR to cover all the object-based definition discovery improvements, so this being part of that is nice.