-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Awesome WebWorkers Support #725
Comments
@dignifiedquire @diasdavid I can take this on: Enable webworker tests for all js-ipfs* repos This is required to move forward with #127 |
This is awesome! Thank you @dryajov! Can we then make
|
Wanted to check in with where things are with this endeavor. So far, I've managed to switch the use of So far, the biggest issue I ran into is with I will be creating PRs for each project shortly (today/tomorrow), so that everypbody can keep an eye on the progress and contribute where they see fit. The rest of the issues are less trivial, and I will be going over them one by one and fixing as I go. I'll keep everyone posted on progress. Cheers! |
PR to address |
i bet you could polyfill it if (typeof window === 'undefined') self.window = self |
wouldn't that mess things up a bit inside a WW for other packages as well? As in incorrectly assuming that its running in a dom enabled env? Otherwise, thats a better approach. |
yeah thats a good point, its a bit hacky so beware |
The linked PRs should address the full webworker support, with this changes I'm able to run js-ipfs tests in webworkers. |
Looks like brorand shipped yesterday with the fixes :) |
woooot! So now, we just need to enable webworker tests in all the repos? Let's make all of this on time for #756 \o/ |
@diasdavid all you have to do for that is upgrade to aegir@10 which runs them by default |
@diasdavid for projects that we want to skip webworker tests you can pass the --dom parameter to aegir. |
@diasdavid I would also merge and release this PRs before bumping aegir on the rest of the projects, because they would fail without those changes, I've seen multihashing-async being the culprit in most cases... |
why |
there are two flags now, --webworker which will run webworker only tests and --dom which will run tests in a |
indeed :) let's do |
@diasdavid what project is that? This might be a project that needs WW disabled. As for them not failing, are you on the latest Aegir with those fixes applied? |
This is |
Ah, thats weird. I'll take a look at it, wonder if any changes have been introduced which could bring window in again? In any case will take a look ASAP. |
@dryajov still seeing this one, any developments? |
@diasdavid, we also need this ipfs/aegir#107 in aegir. For now, we can just disable window as a global without any specific message, if you have a chance to update aegirs eslint with the rule, it might be a good time. |
@diasdavid |
@dryajov: i'd advise against using the webrtcsupport package. Its legacy and contains 90% stuff that you don't need anymore in 2017. @diasdavid i would strongly advise against "making noise", in particular making the kind of noise that has happened on the worker topic in the past.. Trying to get someone else to do work that benefits you like this typically doesn't work out. If you want to be constructive you work together with the people who are able to do that work or do the work (including specifying how things should work) yourself. |
@fippo thanks for pointing this out. Indeed all we use it for is detection of the presence of webrtc support in the environment, perhaps don't need that in the browser anymore, but what about nodejs? |
@fippo I clearly didn't word that in the best way possible. Entirely agree with you, it is orders of magnitude more valuable to provide constructive help and willingness to be part of the process than a simple 'I want this too'. Currently, I'm underwater and unavailable to provide significant help to that development, however, I do hope in the best way possible, that by bringing other people that could also benefit from it, we can signal that there is value on making it happen. re: webrtcsupport - What is your favourite nowadays? |
@diasdavid at least you didn't tweet about it like certain other people. If you just want to check for support |
@diasdavid I'll do what @fippo is suggesting. |
@dignifiedquire found this recently https://github.com/Joris-van-der-Wel/karma-mocha-webworker |
@kumavis thats what we ended up using. To get the last mile of this, we need a pretty small change in how we detect WebRTC. Looking up that issue... ah... its right in this thread: |
As an outside observer, I have to ask: what does all this mean? Are you actually able to use WebRTC APIs in worker code as has been proposed as standard here? Or is this issue just to test that the code should theoretically work the same from a worker context, to be ready when worker WebRTC is standardized? |
Good question, glad you ask - this effort is to get IPFS to run in Web and Service workers. The specific outstanding issue right now is related to WebRTC detection functionality that breaks inside Workers because of explicit usage of |
@IamCarbonMan you are not able to, but |
WebWorker tests are now passing! :D woot! |
fully supported in v0.24.0 |
Thanks to the efforts from @dryajov and @tswindell we are close to having full support for running js-ipfs in webworkers. This issue tracks the last outstanding issues for this.
Aegir
PRs
Others
The text was updated successfully, but these errors were encountered: