Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
web_client_location documentation fix #2131
Conversation
matrixbot
commented
Apr 17, 2017
|
Can one of the admins verify this patch? |
matrixbot
commented
Apr 17, 2017
|
Can one of the admins verify this patch? |
matrixbot
commented
Apr 17, 2017
|
Can one of the admins verify this patch? |
| "\n" | ||
| "You can also disable hosting of the webclient via the\n" | ||
| "configuration option `web_client`\n" | ||
| - % {"dep": DEPENDENCY_LINKS["matrix-angular-sdk"]} |
APwhitehat
Apr 17, 2017
Contributor
String substitution could be failing because there is no key "matrix-angular-sdk" in DEPENDENCY_LINKS, see https://github.com/matrix-org/synapse/blob/master/synapse/python_dependencies.py#L76
Also it seems to be put into CONDITIONAL_REQUIREMENTS as "web_client".
I'm sort of new here so I could be wrong.
matthewjwolff
Apr 17, 2017
Contributor
Yeah that is exactly why the string substitution fails. But I don't understand what the purpose of DEPENDENCY_LINKS is here. It seems to be an empty array whether matrix-angular-sdk is installed or not. Do things get added into that array in the course of server initialization? Maybe the thing that adds DEPENDENCY_LINKS["matrix-angular-sdk"] should occur earlier in server initialization?
APwhitehat
Apr 18, 2017
Contributor
The purpose of DEPENDENCY_LINKS seems to be maintaining a list of all external dependencies which needs to be installed via url.
DEPENDENCY_LINKS is not initialized anywhere else afaik.
Also it seems to be static data like REQUIREMENTS & CONDITIONAL_REQUIREMENTS.
For your case you should probably link the "matrix-angular-sdk" from CONDITIONAL_REQUIREMENTS["web_client"]
|
I liked APwhitehat's suggestion |
APwhitehat
reviewed
Apr 18, 2017
I'll recommend you not to mix two different kinds of changes in a single PR.It may cause confusion.
Perhaps indentation fixes in another PR?
|
I don't know how all those indentation changes got put in.... I definitely didn't mean to touch every file in the project... Anyways I amended my previous commit to only the changes I originally intended to make. Sorry about that. |
matthewjwolff
changed the title from
web_server_root documentation fix
to
web_client_location documentation fix
Apr 18, 2017
|
Looks good! Did you manage to get it to host a riot instance in the end? |
|
I did. And it was literally as easy as |
|
I was going to investigate changing my riot instance so that the default homeserver is my domain instead of whatever Riot has as the default. I think the default is vector.im or matrix.org or something.... |
|
Cool! Thanks for this :) |
matthewjwolff commentedApr 17, 2017
•
edited
The config option web_client_location is very sparsely documented. In my case, I wanted to see if I could get the matrix homeserver to host the riot.im electron app sources. To remedy the lack in documentation, I
Made the generated
homeserver.yamlinclude information about this field. (synapse/config/server.py)Changed the Readme portion for Arch Linux users. The AngularJS sdk is not distributed with the synapse package, so running synapse with the default
homeserver.yamlwill fail on Arch if matrix-synpase is installed from the repo. This is documented on the Arch wiki but not here.Removed the string substitution from the error message in
synapse/app/homeserver.py. The error message implies that it will only be printed if matrix-angular-sdk is not installed. But if matrix-angular-sdk is not installed, the program will crash when trying to perform the string substitution and not print the error message, defeating its purpose. If there's a better way to prevent this error, please enlighten me.I saw that yall welcome additions to
AUTHORS.rst. I feel like this fix isn't big enough for it to be appropriate to put my name next to the real developers. But hey if yall are fine with it I'd be happy to put my name there.Signed-off-by: Matthew Wolff matthewjwolff@gmail.com