-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[plug-in] fix circular dependency warnings in plugin system #5886
Conversation
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
I can confirm, the mentioned cyclic dependency warnings are gone, but I can still see warnings from the plug-ins. Is it known?
See the logs on Travis. |
@kittaakos No, maybe I miss that, thx, will take a look |
@vince-fugnitto Yes, that one. |
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.
Works for me
@kittaakos Now all cyclic dependency warnings in |
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.
works good for me
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.
checked and I see no circular dependency in plugin-ext
export type DebugActivationEvent = 'onDebugResolve' | 'onDebugInitialConfigurations' | 'onDebugAdapterProtocolTracker'; | ||
|
||
export const MainPluginService = Symbol('MainPluginService'); | ||
export interface MainPluginService { |
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.
Is there a way to avoid boilerplate interfaces and symbols or it is somehow required to break the cycle?
btw i like MainPluginService
, it would be good to rename HostedPluginSupport
to it and change a file name as well.
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.
For me no, at least I cannot think up a better solution.
For name, yes I plan to rename everything in plugin-ext
with this plan #3871 (comment)
I'm actually not sure what is so bad in cyclic dependencies between classes which should be used together. Is there a conceptual reasoning behind breaking such cycle? Maybe we just should get rid of cycle dependency check? And have better check where we say such module cannot use such module because of such conceptual reasons, like we do for project organization. Current check to me is an artificial constraint. Otherwise we introduce indirections with interfaces and symbols not clear for that cause? If there is not a real cause let's rather discuss getting rid of a check on next dev meeting? |
No, just desire to remove cyclic dependencies warnings.
+1 to discuss, we have a lot of cyclic dependencies warnings in In general I'm fine with first commit in this PR, but as for second, yes it just refactoring to resolve cyclic dependencies, and introducing new interface is not very good. So I can revert last commit. |
@evidolob added to next dev meeting agenda |
@evidolob first commit is good, it removes a dependency from common to node modules, we want it 👍 |
OK, I'm going to delete second commit from this PR |
b5f05ba
to
311c9c8
Compare
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.
i think it is good, index file of common module does not pull nodejs modules anymore
What it does
Fixes circular dependency warnings which appears during webpack build for files in
@theia/plugin-ext
extension. Also it removes reexport fromnode
folder incommon/index.ts
file.How to test
Just build and make sure that build output doesn't contain:
Review checklist
Reminder for reviewers