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

fix '@theia' implicit dependencies #5791

Merged
merged 1 commit into from
Jul 25, 2019
Merged

fix '@theia' implicit dependencies #5791

merged 1 commit into from
Jul 25, 2019

Conversation

vince-fugnitto
Copy link
Member

@vince-fugnitto vince-fugnitto commented Jul 24, 2019

What it does

Fixes #5790

  • fixed the @theia/ no-implicit-dependencies warnings from extensions
    which used dependencies directly without declaring them in their package.json
  • fixed issue in @theia/plugin-ext regarding incorrect import paths

How to test

  1. build an application that uses @theia/plugin-ext or @theia/plugin-ext-vscode excluding @theia/mini-browser as a dependency. (ensure that @theia/mini-browser is not being pulled by another dependency as well.

Review checklist

  • as an author, I have thoroughly tested my changes and carefully reviewed following the review guidelines

Reminder for reviewers

Signed-off-by: Vincent Fugnitto [email protected]

@vince-fugnitto vince-fugnitto added quality issues related to code and application quality plug-in system issues related to the plug-in system labels Jul 24, 2019
@vince-fugnitto vince-fugnitto self-assigned this Jul 24, 2019
Copy link
Contributor

@marcdumais-work marcdumais-work left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Vince

@vince-fugnitto
Copy link
Member Author

@marcdumais-work what's unfortunate is that mini-browser is only being pulled for a css class name.

https://github.com/theia-ide/theia/blob/22ef59c5415ec45bacac6bd5ddab5ef675d35cf7/packages/plugin-ext/src/main/browser/webview/webview.ts#L58

@marcdumais-work
Copy link
Contributor

unfortunate is that mini-browser is only being pulled for a css class name.

True. Removing the dependency would also be a valid fix, but I'll let @benoitf and @evidolob decide what they think is best in this case.

Fixes #5790

- fixed the `@theia/` `no-implicit-dependencies` warnings from extensions
which used dependencies directly without declaring them in their package.json
- fixed issue in `@theia/plugin-ext` regarding incorrect import paths

Signed-off-by: Vincent Fugnitto <[email protected]>
@vince-fugnitto vince-fugnitto changed the title Add '@theia/mini-browser as an explicitly to @theia/plugin-ext` fix '@theia' implicit dependencies Jul 24, 2019
@akosyakov
Copy link
Member

We will need to move class somewhere else then, let's add it for now. It cannot work otherwise.

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

reviewed the code

@@ -18,9 +18,8 @@ import URI from 'vscode-uri/lib/umd';
import * as theia from '@theia/plugin';
import * as Converter from '../type-converters';
import * as model from '../../api/model';
import { DocumentsExtImpl } from '@theia/plugin-ext/src/plugin/documents';
Copy link
Member

Choose a reason for hiding this comment

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

that's a good catch, how did you find it?

Copy link
Member Author

@vince-fugnitto vince-fugnitto Jul 25, 2019

Choose a reason for hiding this comment

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

tslint was complaining that @theia/plugin-ext was implicitly depending on itself so I
checked as to how / why 🙈

Copy link
Member

Choose a reason for hiding this comment

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

Was it a warning as well, it would be good to have it as error.

Copy link
Member Author

Choose a reason for hiding this comment

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

It was a warning, I guess we need a custom rule to find out if an extension is trying to import istelf this way.

@vince-fugnitto
Copy link
Member Author

@benoitf are you fine with me merging?

@akosyakov
Copy link
Member

@vince-fugnitto @marcdumais-work We don't have code ownership. Everybody should be able to change, review and discuss whatever comes. We've added @evidolob @benoitf because they wanted to be notified about changes in the plugin system. It does not mean that you need an approve. One approve from anybody who verified design and tested changes is fine to merge. You also don't need approve from me on PRs to core. I will comment if i see something suspicious.

Let's remove code owners file if it is confusing. I see already several PRs where it happens and no response. We could have a rule instead that any nontrivial PR should sit at least 2 days after being approved. So everybody for sure had time to have a look. Also if it breaks we revert it within 2 days.

Should we discuss it on next dev meeting?

@vince-fugnitto
Copy link
Member Author

We've added @evidolob @benoitf because they wanted to be notified about changes in the plugin system.

Sounds good, inititally I thought it meant that were required to review changes from the plugin system (based on past PRs) but if its meant to only notify them of changes then I'll keep that in mind for the future :)

You also don't need approve from me on PRs to core.

Yes I understand. Generally I feel more comfortable adding you to reviews that are significant or may require more in depth design decisions since you have valuable insight. I'd rather wait for a PR to be complete and implemented well before I merge.

Let's remove code owners file if it is confusing. I see already several PRs where it happens and no response. We could have a rule instead that any nontrivial PR should sit at least 2 days after being approved. So everybody for sure had time to have a look. Also if it breaks we revert it within 2 days.

I think it's fine, I know they wanted to be notified of changes to the plugin system but with the newer ways of working I understand that no one has code ownership anymore.

Should we discuss it on next dev meeting?

If you'd like to bring it up I'd be fine with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plug-in system issues related to the plug-in system quality issues related to code and application quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[plugin-ext] 'mini-browser' pulled implicitly
3 participants