From e7205fcb9d094fdcd9f32a2d85eb6f14457116a3 Mon Sep 17 00:00:00 2001 From: MadLittleMods Date: Fri, 26 May 2023 17:28:53 +0000 Subject: deploy: 179f0f851e456c8dda3c7092bcb72bd2ec5e65cc --- develop/development/contributing_guide.html | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'develop/development/contributing_guide.html') diff --git a/develop/development/contributing_guide.html b/develop/development/contributing_guide.html index 290b37bcee..fc237fb4a7 100644 --- a/develop/development/contributing_guide.html +++ b/develop/development/contributing_guide.html @@ -163,12 +163,12 @@ recommended for development. More information about WSL can be found at https://docs.microsoft.com/en-us/windows/wsl/install. Running Synapse natively on Windows is not officially supported.

The code of Synapse is written in Python 3. To do pretty much anything, you'll need a recent version of Python 3. Your Python also needs support for virtual environments. This is usually built-in, but some Linux distributions like Debian and Ubuntu split it out into its own package. Running sudo apt install python3-venv should be enough.

+

A recent version of the Rust compiler is needed to build the native modules. The +easiest way of installing the latest version is to use rustup.

Synapse can connect to PostgreSQL via the psycopg2 Python library. Building this library from source requires access to PostgreSQL's C header files. On Debian or Ubuntu Linux, these can be installed with sudo apt install libpq-dev.

Synapse has an optional, improved user search with better Unicode support. For that you need the development package of libicu. On Debian or Ubuntu Linux, this can be installed with sudo apt install libicu-dev.

The source code of Synapse is hosted on GitHub. You will also need a recent version of git.

For some tests, you will need a recent version of Docker.

-

A recent version of the Rust compiler is needed to build the native modules. The -easiest way of installing the latest version is to use rustup.

3. Get the source.

The preferred and easiest way to contribute changes is to fork the relevant project on GitHub, and then create a pull request to ask us to pull your @@ -180,6 +180,9 @@ git checkout develop

If you need help getting started with git, this is beyond the scope of the document, but you can find many good git tutorials on the web.

4. Install the dependencies

+

Before installing the Python dependencies, make sure you have installed a recent version +of Rust (see the "What do I need?" section above). The easiest way of installing the +latest version is to use rustup.

Synapse uses the poetry project to manage its dependencies and development environment. Once you have installed Python 3 and added the source, you should install poetry. @@ -195,14 +198,28 @@ for other installation methods.

cd path/where/you/have/cloned/the/repository
 poetry install --extras all
 
-

This will install the runtime and developer dependencies for the project.

+

This will install the runtime and developer dependencies for the project. Be sure to check +that the poetry install step completed cleanly.

Running Synapse via poetry

To start a local instance of Synapse in the locked poetry environment, create a config file:

cp docs/sample_config.yaml homeserver.yaml
+cp docs/sample_log_config.yaml log_config.yaml
 
-

Now edit homeserver.yaml, and run Synapse with:

+

Now edit homeserver.yaml, things you might want to change include:

+ +

And then run Synapse with the following command:

poetry run python -m synapse.app.homeserver -c homeserver.yaml
 
+

If you get an error like the following:

+
importlib.metadata.PackageNotFoundError: matrix-synapse
+
+

this probably indicates that the poetry install step did not complete cleanly - go back and +resolve any issues and re-run until successful.

5. Get in touch.

Join our developer community on Matrix: #synapse-dev:matrix.org!

6. Pick an issue.

-- cgit 1.5.1