Skip to content

Commit

Permalink
Upstream v1.11.84-rc.0: Get rid of matrix-react-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
SpiritCroc committed Oct 30, 2024
1 parent 9f65d55 commit aa69433
Show file tree
Hide file tree
Showing 45 changed files with 69 additions and 364 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "matrix-js-sdk"]
path = matrix-js-sdk
url = https://github.com/SchildiChat/matrix-js-sdk.git
[submodule "matrix-react-sdk"]
path = matrix-react-sdk
url = https://github.com/SchildiChat/matrix-react-sdk.git
[submodule "element-web"]
path = element-web
url = https://github.com/SchildiChat/element-web.git
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ linux-container-release: container-debian-based-release container-rpm-release
container-local-pkgbuild: container-build-debian
$(CONTAINER_ENGINE) run --rm -ti -v $(PWD):/project --security-opt seccomp=unconfined --security-opt label=disable $(CONTAINER_IMAGE_DEBIAN):latest make local-pkgbuild

bom.lock: element-desktop/yarn.lock element-web/yarn.lock matrix-js-sdk/yarn.lock matrix-react-sdk/yarn.lock
bom.lock: element-desktop/yarn.lock element-web/yarn.lock matrix-js-sdk/yarn.lock
./build-bom.sh
bom: bom.lock

Expand All @@ -211,17 +211,16 @@ fix_yarn_cache:

clean:
$(YARN) --cwd matrix-js-sdk clean
$(YARN) --cwd matrix-react-sdk clean
$(YARN) --cwd element-web clean
$(YARN) --cwd element-desktop clean
rm -f element-desktop/webapp || true
rm -rf element-web/dist
rm -rf local-pkgbuild
rm -f bom.lock
rm -f matrix-react-sdk/res/css/sc-cpd-overrides.css
rm -f element-web/res/css/sc-cpd-overrides.css

undo_setup:
rm -rf element-desktop/node_modules element-web/node_modules matrix-react-sdk/node_modules matrix-js-sdk/node_modules i18n-helper/node_modules element-desktop/.hak
rm -rf element-desktop/node_modules element-web/node_modules matrix-js-sdk/node_modules i18n-helper/node_modules element-desktop/.hak

fixup: undo_setup fix_yarn_cache
make setup
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,14 @@ See [here](RELEASE.md).

## Building SchildiChat Web/Desktop

This particular repo is a wrapper project for element-desktop, element-web, matrix-react-sdk and matrix-js-sdk. It's the recommended starting point to build SchildiChat for Web **and** Desktop.
This particular repo is a wrapper project for element-desktop, element-web, and matrix-js-sdk. It's the recommended starting point to build SchildiChat for Web **and** Desktop.

The `master` branch contains the latest release.
Development happens in the `sc` branch, which might be **broken at any time**!

<pre><code><b>schildichat-desktop</b> <i>&lt;-- this repo</i> (recommended starting point to build SchildiChat for Web <b>and</b> Desktop)
|-- <a href="https://github.com/SchildiChat/element-desktop">element-desktop</a> (electron wrapper)
|-- <a href="https://github.com/SchildiChat/element-web">element-web</a> ("skin" for matrix-react-sdk)
|-- <a href="https://github.com/SchildiChat/matrix-react-sdk">matrix-react-sdk</a> (most of the development happens here)
|-- <a href="https://github.com/SchildiChat/element-web">element-web</a> (most of the development happens here)
`-- <a href="https://github.com/SchildiChat/matrix-js-sdk">matrix-js-sdk</a> (Matrix client js sdk)
</code></pre>

Expand Down
6 changes: 2 additions & 4 deletions apply_patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ pushd "$mydir" > /dev/null
source ./merge_helpers.sh

# Apply our patches
print_section "Apply patches to matrix-js-sdk"
apply_patches matrix-js-sdk
print_section "Apply patches to matrix-react-sdk"
apply_patches matrix-react-sdk
#print_section "Apply patches to matrix-js-sdk"
#apply_patches matrix-js-sdk
print_section "Apply patches to element-web"
apply_patches element-web
print_section "Apply patches to element-desktop"
Expand Down
2 changes: 0 additions & 2 deletions build-bom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ cat element-web/yarn.lock >> bom.lock
echo "" >> bom.lock
cat matrix-js-sdk/yarn.lock >> bom.lock
echo "" >> bom.lock
cat matrix-react-sdk/yarn.lock >> bom.lock
echo "" >> bom.lock

# matrix-seshat
cat << EOF >> bom.lock
Expand Down
2 changes: 1 addition & 1 deletion compound-web
2 changes: 1 addition & 1 deletion element-desktop
2 changes: 1 addition & 1 deletion element-web
Submodule element-web updated 3258 files
9 changes: 5 additions & 4 deletions generate_patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ persist_patches() {
echo "Creating new patch dir $patch_dir..."
mkdir "$patch_dir"
fi
echo "Creating new patches"
git format-patch -k upstream/master.. -o "$patch_dir"
# Assume we forked from a tag starting with 'v' (our own tags start with sc_)
local fork_point=`git describe --tags --match 'v*'| sed 's|-[^-]*-[^-]*$||'`
echo "Creating new patches from $fork_point"
git format-patch -k "$fork_point".. -o "$patch_dir"
echo "Clearing automated commits from patches"
find "$patch_dir" -name "*-Automatic-package.json-adjustment.patch" -exec rm {} \;
find "$patch_dir" -name "*-Automatic-icon-update.patch" -exec rm {} \;
Expand All @@ -37,7 +39,6 @@ persist_patches() {

persist_patches element-desktop
persist_patches element-web
persist_patches matrix-react-sdk
persist_patches matrix-js-sdk
#persist_patches matrix-js-sdk

popd > /dev/null
2 changes: 1 addition & 1 deletion matrix-js-sdk
Submodule matrix-js-sdk updated 77 files
+4 −6 .eslintrc.cjs
+1 −1 .github/workflows/backport.yml
+1 −1 .github/workflows/docs-pr-netlify.yaml
+1 −2 .github/workflows/downstream-end-to-end-tests.yml
+1 −3 .github/workflows/notify-downstream.yaml
+4 −4 .github/workflows/pull_request.yaml
+1 −1 .github/workflows/release-drafter-workflow.yml
+4 −5 .github/workflows/release-gitflow.yml
+3 −3 .github/workflows/release-make.yml
+1 −1 .github/workflows/release-npm.yml
+3 −3 .github/workflows/release.yml
+2 −2 .github/workflows/sonarcloud.yml
+5 −5 .github/workflows/static_analysis.yml
+9 −9 .github/workflows/tests.yml
+1 −1 .github/workflows/triage-incoming.yml
+8 −7 package.json
+2 −2 spec/integ/crypto/crypto.spec.ts
+152 −0 spec/integ/crypto/to-device-messages.spec.ts
+1 −0 spec/integ/crypto/verification.spec.ts
+2 −2 spec/integ/rendezvous/MSC4108SignInWithQR.spec.ts
+1 −1 spec/olm-loader.ts
+2 −2 spec/test-utils/AccountDataAccumulator.ts
+1 −1 spec/test-utils/test-utils.ts
+1 −1 spec/unit/ToDeviceMessageQueue.spec.ts
+113 −1 spec/unit/crypto.spec.ts
+4 −6 spec/unit/crypto/cross-signing.spec.ts
+1 −1 spec/unit/crypto/verification/sas.spec.ts
+11 −11 spec/unit/matrix-client.spec.ts
+935 −990 spec/unit/matrixrtc/MatrixRTCSession.spec.ts
+0 −171 spec/unit/rendezvous/ecdhv2.spec.ts
+0 −712 spec/unit/rendezvous/rendezvous.spec.ts
+0 −453 spec/unit/rendezvous/simpleHttpTransport.spec.ts
+2 −2 spec/unit/rust-crypto/OutgoingRequestProcessor.spec.ts
+1 −1 spec/unit/rust-crypto/PerSessionKeyBackupDownloader.spec.ts
+2 −1 spec/unit/rust-crypto/backup.spec.ts
+119 −1 spec/unit/rust-crypto/rust-crypto.spec.ts
+1 −1 spec/unit/rust-crypto/secret-storage.spec.ts
+1 −1 spec/unit/scheduler.spec.ts
+1 −1 spec/unit/webrtc/call.spec.ts
+1 −1 spec/unit/webrtc/callFeed.spec.ts
+0 −12 src/@types/media.ts
+3 −5 src/@types/requests.ts
+1 −1 src/browser-index.ts
+42 −34 src/client.ts
+93 −0 src/crypto-api/CryptoEvent.ts
+32 −0 src/crypto-api/CryptoEventHandlerMap.ts
+21 −1 src/crypto-api/index.ts
+2 −2 src/crypto/CrossSigning.ts
+2 −2 src/crypto/OlmDevice.ts
+3 −3 src/crypto/algorithms/megolm.ts
+107 −131 src/crypto/index.ts
+1 −1 src/crypto/store/indexeddb-crypto-store-backend.ts
+1 −1 src/http-api/fetch.ts
+1 −1 src/interactive-auth.ts
+11 −7 src/matrix.ts
+96 −39 src/matrixrtc/MatrixRTCSession.ts
+2 −2 src/matrixrtc/index.ts
+1 −1 src/models/invites-ignorer.ts
+2 −2 src/models/room-receipts.ts
+2 −2 src/models/room.ts
+2 −2 src/models/typed-event-emitter.ts
+0 −276 src/rendezvous/MSC3906Rendezvous.ts
+1 −14 src/rendezvous/RendezvousFailureReason.ts
+0 −261 src/rendezvous/channels/MSC3903ECDHv2RendezvousChannel.ts
+0 −4 src/rendezvous/channels/index.ts
+3 −7 src/rendezvous/index.ts
+0 −196 src/rendezvous/transports/MSC3886SimpleHttpRendezvousTransport.ts
+0 −4 src/rendezvous/transports/index.ts
+2 −2 src/rust-crypto/PerSessionKeyBackupDownloader.ts
+4 −4 src/rust-crypto/backup.ts
+57 −55 src/rust-crypto/rust-crypto.ts
+8 −8 src/store/indexeddb.ts
+2 −2 src/store/memory.ts
+2 −2 src/webrtc/groupCall.ts
+1 −1 src/webrtc/stats/callStatsReportSummary.ts
+1 −1 src/webrtc/stats/trackStatsBuilder.ts
+923 −934 yarn.lock
1 change: 0 additions & 1 deletion matrix-react-sdk
Submodule matrix-react-sdk deleted from 0c042d
17 changes: 2 additions & 15 deletions merge_helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ add_upstream() {
if echo "$sc_remote" | grep -q matrix-js-sdk; then
# matrix.org repo
local upstream_remote="$(echo "$sc_remote" | sed 's|SchildiChat|matrix-org|')"
elif echo "$sc_remote" | grep -q "element\\|matrix-react-sdk\\|compound-web"; then
elif echo "$sc_remote" | grep -q "element\\|compound-web"; then
# vector-im repo
local upstream_remote="$(echo "$sc_remote" | sed 's|SchildiChat|element-hq|')"
else
Expand All @@ -34,7 +34,7 @@ add_upstream() {
}

forall_repos() {
for repo in "matrix-js-sdk" "matrix-react-sdk" "element-web" "element-desktop" "compound-web"; do
for repo in "matrix-js-sdk" "element-web" "element-desktop" "compound-web"; do
pushd "$SCHILDI_ROOT/$repo" > /dev/null
"$@"
popd > /dev/null
Expand Down Expand Up @@ -99,13 +99,8 @@ automatic_i18n_reversion() {
get_current_upstream_tag

local current_mxjssdk_tag
local current_mxreactsdk_tag
get_current_mxsdk_tags

pushd "$SCHILDI_ROOT/matrix-react-sdk" > /dev/null
revert_i18n_changes "$i18n_path" "$current_mxreactsdk_tag" "$skip_commit"
popd > /dev/null

pushd "$SCHILDI_ROOT/element-web" > /dev/null
revert_i18n_changes "$i18n_path" "$current_upstream_tag" "$skip_commit"
popd > /dev/null
Expand All @@ -116,13 +111,6 @@ automatic_i18n_reversion() {
}

automatic_i18n_adjustment() {
# matrix-react-sdk
pushd "$SCHILDI_ROOT/matrix-react-sdk" > /dev/null
$yarn i18n
node "$i18n_helper_path" "$SCHILDI_ROOT/matrix-react-sdk/$i18n_path" "$i18n_overlay_path/matrix-react-sdk"
apply_i18n_changes "$i18n_path"
popd > /dev/null

# element-web
pushd "$SCHILDI_ROOT/element-web" > /dev/null
$yarn i18n
Expand Down Expand Up @@ -248,7 +236,6 @@ get_current_upstream_tag() {
}

get_current_mxsdk_tags() {
current_mxreactsdk_tag="v$(cat "$SCHILDI_ROOT/element-web/package.json" | jq '.dependencies["matrix-react-sdk"]' -r)"
current_mxjssdk_tag="v$(cat "$SCHILDI_ROOT/element-web/package.json" | jq '.dependencies["matrix-js-sdk"]' -r)"
}

Expand Down
6 changes: 1 addition & 5 deletions merge_upstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,14 @@ pushd "matrix-js-sdk" > /dev/null
git checkout "$current_mxjssdk_tag" -B "$sc_branch_name"
popd > /dev/null

pushd "matrix-react-sdk" > /dev/null
git checkout "$current_mxreactsdk_tag" -B "$sc_branch_name"
popd > /dev/null

# Refresh environment
make clean
make setup
forall_repos commit_if_dirty "Automatic setup commit"

./apply_patches.sh

compound_web_version=`cat matrix-react-sdk/package.json|grep compound-web|sed 's|.*: \"\(.*\)",|\1|;s|\^||'`
compound_web_version=`cat element-web/package.json|grep compound-web|sed 's|.*: \"\(.*\)",|\1|;s|\^||'`
echo "TODO: merge compound web at $compound_web_version"

popd > /dev/null
18 changes: 0 additions & 18 deletions nix/overlay.nix

This file was deleted.

109 changes: 0 additions & 109 deletions nix/schildichat-desktop.nix

This file was deleted.

75 changes: 0 additions & 75 deletions nix/schildichat-web.nix

This file was deleted.

Loading

0 comments on commit aa69433

Please sign in to comment.