ExchangeUnion / xud-docker

Streamlined setup of xud and all dependencies via docker 🐳
https://docs.exchangeunion.com
GNU Affero General Public License v3.0
5 stars 5 forks source link

BREAKING CHANGE: drop python #841

Closed reliveyy closed 3 years ago

reliveyy commented 3 years ago

This PR was created beause we cannot interrupt Python thread.join() on Windows (https://mail.python.org/pipermail/python-dev/2017-August/148800.html). This is a huge blocker to run original Python xud-docker launcher on major platforms.

The original idea of letting xud-launcher to run any branch of xud-docker is that we delegate the setup logic to the xud-docker Python launcher. And this requires to setup a separated Python runtime on Linux, macOS and Windows. And on Windows there is no Python preinstalled, so we need to download a ~8MB embeded python for the user.

Back to the "interrupt" issue on Windows, I cannot find an easy solution for this after few hours researching. So the best solution I can see is dropping Python in xud-docker launcher and replace it with Golang binary one.

Pros:

  1. Don't need to setup a Python runtime
  2. Better Windows support than Python
  3. Smaller than embeded python + other dependencies (~3MB zip)

Cons:

  1. Rewriting required
  2. Cannot easily run from source code (need to compile but thanks to Github actions artifacts, we could use this to run any branch without compiling source locally)