eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
20.11k stars 2.5k forks source link

Building the example fails when the JDT LS cannot be accessed #340

Closed kittaakos closed 7 years ago

kittaakos commented 7 years ago

When the http://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz link is not available, the Java extension build fails, hence the whole build process fails.

yarn run build
yarn run v0.27.5
$ concurrently -n download,compile,lint -c red,blue,green "gulp download_java_server" "yarn run compile" "yarn run lint"
[download] [11:34:27]
[download] Using gulpfile ~/git/theia/packages/java/gulpfile.js
[download] [11:34:27] Starting 'download_java_server'...
[download] [11:34:27] Finished 'download_java_server' after 7.8 ms
[lint] yarn run lint exited with code 0
[compile] yarn run compile exited with code 0
[download] buffer.js:262
[download]   throw new TypeError(kFromErrorMsg);
[download]   ^
[download]
[download] TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
[download]     at fromObject (buffer.js:262:9)
[download]     at Function.Buffer.from (buffer.js:101:10)
[download]     at new Buffer (buffer.js:80:17)
[download]     at Request.downloadHandler [as _callback] (/Users/akos.kitta/git/theia/node_modules/gulp-download/index.js:37:57)
[download]     at self.callback (/Users/akos.kitta/git/theia/node_modules/request/request.js:188:22)
[download]     at emitOne (events.js:96:13)
[download]     at Request.emit (events.js:188:7)
[download]     at Request.onRequestError (/Users/akos.kitta/git/theia/node_modules/request/request.js:884:8)
[download]     at emitOne (events.js:96:13)
[download]     at ClientRequest.emit (events.js:188:7)
[download] gulp download_java_server exited with code 1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
kittaakos commented 7 years ago

Eventually, the http://download.eclipse.org seems to be down.

marcdumais-work commented 7 years ago

I saw this error intermittently today (locally and on travis). It seems to work now.

kittaakos commented 7 years ago

Yes, it works now. I can confirm that. We will figure out something not to depend on eclipse.org when building the application.

akosyakov commented 7 years ago

I am going to push the downloaded archive for now. We will need to redownload it locally to upgrade.

epatpol commented 7 years ago

As we now have it downloaded locally in the git repo, can we consider this issue "fixed"?

hexa00 commented 7 years ago

@epatpol The real solution would be to fail more gracefully but I don't see that happening until we get an extension system that enables runtime extensions.

And the examples are examples only...

So I'm closing this one for now. Reopen if it's still a problem.