Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin the version of meson #859

Merged
merged 2 commits into from
Jul 4, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion worker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ PIP_DIR = $(MEDIASOUP_OUT_DIR)/pip
INSTALL_DIR ?= $(MEDIASOUP_OUT_DIR)/$(MEDIASOUP_BUILDTYPE)
BUILD_DIR ?= $(MEDIASOUP_OUT_DIR)/$(MEDIASOUP_BUILDTYPE)/build
MESON ?= $(PIP_DIR)/bin/meson
MESON_VERSION ?= 0.63.0
# `MESON_ARGS` can be used to provide extra configuration parameters to Meson, such as adding defines or changing
# optimization options. For instance, use `MESON_ARGS="-Dms_log_trace=true -Dms_log_file_line=true" npm i` to compile worker with
# tracing and enabled.
Expand Down Expand Up @@ -74,7 +75,7 @@ ifeq ($(wildcard $(PIP_DIR)),)
echo "Installation failed, likely because PIP is unavailable, if you are on Debian/Ubuntu or derivative please install the python3-pip package"
# Install `meson` and `ninja` using `pip` into custom location, so we don't
# depend on system-wide installation.
$(PYTHON) -m pip install --upgrade --target=$(PIP_DIR) $(PIP_BUILD_BINARIES) meson ninja
$(PYTHON) -m pip install --upgrade --target=$(PIP_DIR) $(PIP_BUILD_BINARIES) meson==$(MESON_VERSION) ninja

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Locking to an exact version means that pip cannot cleverly figure out which ones are compatible with your current system. A far, far, far better idea:

pip install "meson>=0.58,<=0.62.*"

This pins an allowable minimum/maximum range, which supports reasonably new Meson on systems with modern Python, while also handling archaic systems such as Ubuntu 18.04.

That being said, I'm probably duty-bound to say I'm not a fan of pinning versions... you'll need to babysit this to make sure it gets upgraded regularly, and I don't think tools such as dependabot or renovatebot (https://mend.io) can detect version pins as arbitrary lines in a Makefile.

endif

setup: meson-ninja
Expand Down