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

Browserify-aes #1428

Closed
jopit opened this issue Mar 2, 2018 · 11 comments
Closed

Browserify-aes #1428

jopit opened this issue Mar 2, 2018 · 11 comments
Labels
question user / developer questions

Comments

@jopit
Copy link
Contributor

jopit commented Mar 2, 2018

The browserify-aes package that gets pulled in by Theia is listed as being licensed under the MIT license, but this issue indicates that package may in violation of other licenses.

Does Theia actually use browserify-aes? Could the dependency on it be removed?

@svenefftinge
Copy link
Contributor

It comes through webpack, which is required by the application-package:

> yarn why browserify-aes
yarn why v1.3.2
[1/4] 🤔  Why do we have the module "browserify-aes"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
info Reasons this module exists
   - "workspace-aggregator-3a78d219-b5dd-42a0-88b7-0bb6370469db#@theia/application-package#webpack#node-libs-browser#crypto-browserify#browserify-cipher" depends on it
   - "workspace-aggregator-3a78d219-b5dd-42a0-88b7-0bb6370469db#@theia/application-package#webpack#node-libs-browser#crypto-browserify#browserify-sign#parse-asn1" depends on it
info Disk size without dependencies: "96kB"
info Disk size with unique dependencies: "300kB"
info Disk size with transitive dependencies: "464kB"
info Number of shared dependencies: 8
✨  Done in 0.92s.

@jopit
Copy link
Contributor Author

jopit commented Mar 2, 2018

Does Theia actually need (make use of) the function in browserify-aes itself, or is just pulled in because it's part of a package containing other function that Theia needs?

@svenefftinge
Copy link
Contributor

svenefftinge commented Mar 2, 2018

It is pulled in through the extension-manager extension, which uses application-package, which uses webpack, which has a dependency node-libs-browser->crypto-browserify->browserify-cipher.
I know that webpack is used at runtime, to update a theia app ((un)installing extensions). I don't know if webpack actually really requires the dependencies above in our use case.

@svenefftinge
Copy link
Contributor

For now, you could remove the extension-manager extension from your theia app, to get rid of the dependency.

@jopit
Copy link
Contributor Author

jopit commented Mar 2, 2018

Our package.json doesn't include the extension-manager extension, but application-package still gets built into our theia app.

{
    "private": true,
    "dependencies": {
        "@theia/typescript": "^0.3.7",
        "@theia/navigator": "^0.3.7",
        "@theia/terminal": "^0.3.7",
        "@theia/outline-view": "^0.3.7",
        "@theia/preferences": "^0.3.7",
        "@theia/git": "^0.3.7",
        "@theia/file-search": "^0.3.7",
        "@theia/markers": "^0.3.7",
	"@theia/java": "^0.3.7"
    },
    "devDependencies": {
        "@theia/cli": "^0.3.7"
    }
}

Is there some other extension that's also pulling it in? The docker hub theiaide/theia image also contains application-package although it's package.json doesn't include extension-manager

@epatpol
Copy link
Contributor

epatpol commented Mar 2, 2018

@svenefftinge I believe the @theia/cli dev-package pulls it even though extension-manager isn't there.

@jopit
Copy link
Contributor Author

jopit commented Mar 2, 2018

Forgive my node/yarn ignorance, but is it OK to remove devDependencies, will yarn still build our theia app?

@svenefftinge
Copy link
Contributor

svenefftinge commented Mar 2, 2018

You can remove the devDependencies after you've successfully built the application.
Note that you need to start Theia through node src-gen/backend/main.js then.

@jopit
Copy link
Contributor Author

jopit commented Mar 2, 2018

Awesome, thanks

@svenefftinge svenefftinge changed the title Browerify-aes Browserify-aes Mar 3, 2018
@kittaakos kittaakos added the question user / developer questions label Mar 7, 2018
@kittaakos
Copy link
Contributor

@jopit, is there anything else left we have to discuss here? If no, I would like to close this issue. Thanks!

@jopit
Copy link
Contributor Author

jopit commented Mar 7, 2018

We are good for now, so closing this.

@jopit jopit closed this as completed Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question user / developer questions
Projects
None yet
Development

No branches or pull requests

4 participants