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

Update master from upstream #5

Merged
merged 29 commits into from
Oct 3, 2018
Merged

Conversation

Ashaman-
Copy link

@Ashaman- Ashaman- commented Oct 3, 2018

No description provided.

tuxayo and others added 29 commits September 10, 2018 10:48
Currently translated at 97.2% (36 of 37 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/eo/
Currently translated at 100.0% (37 of 37 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/ro/
A step towards a real solution for #7305

This approach makes use of `npm link` to remove the use of symlinks in the build process. The build process has also been altered to invoke the build process of each underlying SDK (react, js). This means that one can now `npm link` and `npm start` and have a working environment. 

At the same time, parallelshell was dropped due to lack of maintenance from the maintainer.
If we don't block on SDK builds, then the riot-web build fails due to half-built dependencies. This needs to be done at two levels: the js-sdk because it is used by both the react-sdk and riot-web, and at the react-sdk because riot-web needs it. This means our build process is synchronous for js -> react -> riot, at least for the initial build. 

This does increase the startup time, particularly because the file watch timer is at 5 seconds. The timer is used to detect a storm of file changes in the underlying SDKs and give the build process some room to compile larger files if needed. 

The file watcher is accompanied by a "canary signal file" to prevent the build-blocking script from unblocking too early. Both the js and react SDKs build when `npm install` is run, so we ensure that we only listen for the `npm start` build for each SDK.

This is all done at the riot level instead of at the individual SDK levels (where we could use a canary file to signal up the stack) because:
* babel (used by the js-sdk) doesn't really provide an "end up build" signal
* webpack is a bit of a nightmare to get it to behave at times
* this blocking approach is really only applicable to riot-web, although may be useful to some other projects.

Hopefully that all makes sense.
With the react-sdk and js-sdk having their `npm start`s split out (as per matrix-org/matrix-react-sdk#2175 and matrix-org/matrix-js-sdk#742) we can trigger an initial build ourselves and start the watcher afterwards. This canary approach has a very slight speed increase over serially running all the commands as the watcher can be started as early as possible.

This all can be improved and potentially eliminated with a bit more planning, however: #7386
Reduce the number of terminals required to build riot-web to 1
Currently translated at 81.0% (30 of 37 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/ar/
Currently translated at 97.2% (36 of 37 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/ca/
Currently translated at 100.0% (37 of 37 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/it/
This reverts commit 81dfe50.
@Ashaman- Ashaman- merged commit c006bd1 into neocrypto-io:master Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants