From c67c41f4674407719cb59a01da98536f96fa1977 Mon Sep 17 00:00:00 2001 From: H-Shay Date: Tue, 31 Jan 2023 18:36:56 +0000 Subject: deploy: eafdb12dd8db985fbe1ac27ca75d28af8d4e4c5d --- latest/development/cas.html | 2 +- latest/development/contributing_guide.html | 4 +- latest/development/database_schema.html | 2 +- latest/development/demo.html | 2 +- latest/development/dependencies.html | 20 +- latest/development/experimental_features.html | 2 +- latest/development/git.html | 2 +- .../development/internal_documentation/index.html | 6 +- latest/development/releases.html | 2 +- latest/development/reviews.html | 2 +- latest/development/room-dag-concepts.html | 2 +- latest/development/saml.html | 2 +- .../synapse_architecture/cancellation.html | 2 +- .../synapse_architecture/faster_joins.html | 530 +++++++++++++++++++++ 14 files changed, 554 insertions(+), 26 deletions(-) create mode 100644 latest/development/synapse_architecture/faster_joins.html (limited to 'latest/development') diff --git a/latest/development/cas.html b/latest/development/cas.html index d1afe72f5a..5d74ccf710 100644 --- a/latest/development/cas.html +++ b/latest/development/cas.html @@ -76,7 +76,7 @@ diff --git a/latest/development/contributing_guide.html b/latest/development/contributing_guide.html index e04f8d1488..db99c37188 100644 --- a/latest/development/contributing_guide.html +++ b/latest/development/contributing_guide.html @@ -76,7 +76,7 @@ @@ -190,7 +190,7 @@ pipx install poetry

but see poetry's installation instructions for other installation methods.

-

Synapse requires Poetry version 1.2.0 or later.

+

Developing Synapse requires Poetry version 1.3.2 or later.

Next, open a terminal and install dependencies as follows:

cd path/where/you/have/cloned/the/repository
 poetry install --extras all
diff --git a/latest/development/database_schema.html b/latest/development/database_schema.html
index 5d830745e0..22ffe3bf76 100644
--- a/latest/development/database_schema.html
+++ b/latest/development/database_schema.html
@@ -76,7 +76,7 @@
 
         
diff --git a/latest/development/demo.html b/latest/development/demo.html
index 131c66d4ae..fa8ed6e29e 100644
--- a/latest/development/demo.html
+++ b/latest/development/demo.html
@@ -76,7 +76,7 @@
 
         
diff --git a/latest/development/dependencies.html b/latest/development/dependencies.html
index a0823a71c6..6a3e9f40c7 100644
--- a/latest/development/dependencies.html
+++ b/latest/development/dependencies.html
@@ -76,7 +76,7 @@
 
         
@@ -148,6 +148,10 @@
 
                         

Managing dependencies with Poetry

This is a quick cheat sheet for developers on how to use poetry.

+

Installing

+

See the contributing guide.

+

Developers should use Poetry 1.3.2 or higher. If you encounter problems related +to poetry, please double-check your poetry version.

Background

Synapse uses a variety of third-party Python packages to function as a homeserver. Some of these are direct dependencies, listed in pyproject.toml under the @@ -240,7 +244,7 @@ e.g. mypy instead of poetry run mypy; pythonpoetry shell beforehand.

How do I...

...reset my venv to the locked environment?

-
poetry install --extras all --remove-untracked
+
poetry install --all-extras --sync
 

...delete everything and start over from scratch?

# Stop the current virtualenv if active
@@ -286,11 +290,7 @@ useful.

  • manually update pyproject.toml; then poetry lock --no-update; or else
  • poetry add packagename. See poetry add --help; note the --dev, ---extras and --optional flags in particular. -
      -
    • NB: this specifies the new package with a version given by a "caret bound". This won't get forced to its lowest version in the old deps CI job: see this TODO.
    • -
    -
  • +--extras and --optional flags in particular.

Include the updated pyproject.toml and poetry.lock files in your commit.

...remove a dependency?

@@ -298,7 +298,7 @@ useful.

poetry remove packagename
 

ought to do the trick. Alternatively, manually update pyproject.toml and -poetry lock --no-update. Include the updated pyproject.toml and poetry.lock` +poetry lock --no-update. Include the updated pyproject.toml and poetry.lock files in your commit.

...update the version range for an existing dependency?

Best done by manually editing pyproject.toml, then poetry lock --no-update. @@ -326,8 +326,6 @@ poetry lock --no-update

poetry export --extras all
 

Be wary of bugs in poetry export and pip install -r requirements.txt.

-

Note: poetry export will be made a plugin in Poetry 1.2. Additional config may -be required.

...build a test wheel?

I usually use

poetry run pip install build && poetry run python -m build
@@ -337,7 +335,7 @@ doesn't require poetry. (It's what we use in CI too). However, you could try
 poetry build too.

Troubleshooting

Check the version of poetry with poetry --version.

-

The minimum version of poetry supported by Synapse is 1.2.

+

The minimum version of poetry supported by Synapse is 1.3.2.

It can also be useful to check the version of poetry-core in use. If you've installed poetry with pipx, try pipx runpip poetry list | grep poetry-core.

Clear caches: poetry cache clear --all pypi.

diff --git a/latest/development/experimental_features.html b/latest/development/experimental_features.html index 4293989190..b9527375f6 100644 --- a/latest/development/experimental_features.html +++ b/latest/development/experimental_features.html @@ -76,7 +76,7 @@ diff --git a/latest/development/git.html b/latest/development/git.html index 1a2a3ed0ed..6337ef8586 100644 --- a/latest/development/git.html +++ b/latest/development/git.html @@ -76,7 +76,7 @@ diff --git a/latest/development/internal_documentation/index.html b/latest/development/internal_documentation/index.html index 14b78ce1ce..2132e89463 100644 --- a/latest/development/internal_documentation/index.html +++ b/latest/development/internal_documentation/index.html @@ -76,7 +76,7 @@ @@ -160,7 +160,7 @@ under the Usage section of the documentation.