build: add meson build support to dev container#1141
build: add meson build support to dev container#1141gaoxueyu merged 1 commit intoIvorySQL:masterfrom
Conversation
📝 WalkthroughWalkthroughAdds tooling and packages to the development container (meson/ninja built from source, setuptools, curl/unzip, LLVM/system libs, tini/sudo) and documents an alternative Meson-based build workflow in the README; no public API changes. Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.devcontainer/DockerfileREADME.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: pg_regression (ubuntu-latest)
- GitHub Check: build (ubuntu-latest)
- GitHub Check: oracle_regression (ubuntu-latest)
- GitHub Check: meson_build (ubuntu-latest)
- GitHub Check: contrib_regression
- GitHub Check: oracle_pg_regression (ubuntu-latest)
🔇 Additional comments (3)
README.md (1)
65-82: Well-documented Meson build workflow.The alternative Meson build instructions are clear, well-structured, and include a helpful note about the clean source tree requirement. The commands follow standard meson/ninja conventions and align well with the PR objectives.
.devcontainer/Dockerfile (2)
13-14: LGTM!The curl and unzip packages are necessary dependencies for downloading and extracting the meson/ninja archives. The comment clearly documents their purpose.
22-22: LGTM!The python3-setuptools package is correctly added as a dependency for the meson installation process.
| # Install meson and ninja from source (matching workflow versions) | ||
| RUN curl -L "https://github.com/mesonbuild/meson/releases/download/1.0.1/meson-1.0.1.tar.gz" -o /tmp/meson-1.0.1.tar.gz \ | ||
| && curl -L "https://github.com/ninja-build/ninja/releases/download/v1.10.1/ninja-linux.zip" -o /tmp/ninja-linux.zip \ | ||
| && unzip -o /tmp/ninja-linux.zip -d /tmp \ | ||
| && cp /tmp/ninja /usr/bin/ \ | ||
| && tar xzf /tmp/meson-1.0.1.tar.gz -C /tmp \ | ||
| && cd /tmp/meson-1.0.1 && python3 setup.py install \ | ||
| && rm -rf /tmp/meson-1.0.1* /tmp/ninja* |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, locate and read the Dockerfile
fd "Dockerfile" .devcontainerRepository: IvorySQL/IvorySQL
Length of output: 85
🏁 Script executed:
# Read the specific lines mentioned in the review
cat -n .devcontainer/Dockerfile | sed -n '35,50p'Repository: IvorySQL/IvorySQL
Length of output: 857
🌐 Web query:
meson build system python3 setup.py install deprecated
💡 Result:
Short answer: Yes — invoking python setup.py install (or other setup.py CLI commands) is deprecated. Use PEP 517/518 based tooling instead (e.g. declare a build backend in pyproject.toml and install with pip or use a modern backend such as meson-python when you build native extensions).
What to do:
- Replace python setup.py install with python -m pip install . (or python -m pip install --editable . for editable installs). [1]
- If your project builds compiled code, consider using Meson via the meson-python backend and declare it in pyproject.toml so pip/PEP 517 can build it. NumPy’s migration guide explicitly recommends Meson / meson-python for compiled projects. [2]
- pip/setuptools are moving away from special-casing setup.py; enable/use PEP 517 mode (pip’s default will be PEP 517) to avoid deprecation warnings. [3]
Sources:
[1] Python Packaging Guide — “Is setup.py deprecated?” (recommendations to use pip/build).
[2] NumPy migration guide — recommends Meson and meson-python for projects with compiled code.
[3] pip / pypa discussions about deprecating legacy setup.py build/install behavior.
🌐 Web query:
latest stable versions meson ninja build tools 2025
💡 Result:
- Meson: 1.10.0 — released December 8, 2025. [1]
- Ninja: 1.13.2 — released November 20, 2025. [2]
Sources:
[1] Meson release notes — Release notes for 1.10.0.
[2] ninja-build GitHub releases — v1.13.2.
🏁 Script executed:
# Search for CI workflow files and version references
find . -type f \( -name "*.yml" -o -name "*.yaml" \) | grep -E "(workflow|ci|github)" | head -20Repository: IvorySQL/IvorySQL
Length of output: 466
🏁 Script executed:
# Search for meson and ninja version references in workflow files
rg "meson.*1\.0\.1|ninja.*1\.10\.1" --type yamlRepository: IvorySQL/IvorySQL
Length of output: 43
🏁 Script executed:
# Search more broadly for version specifications
rg "meson|ninja" --type yaml -A 2 -B 2 | grep -E "(version|release|download)" | head -30Repository: IvorySQL/IvorySQL
Length of output: 195
🏁 Script executed:
# Read the meson_build.yml workflow
cat -n .github/workflows/meson_build.yml | head -80Repository: IvorySQL/IvorySQL
Length of output: 1773
🏁 Script executed:
# Check if meson/ninja versions are specified in any workflow
rg "meson|ninja" .github/workflows/ -A 3 | head -60Repository: IvorySQL/IvorySQL
Length of output: 1473
🏁 Script executed:
# Check if there's a pyproject.toml or setup.py in meson directory
find . -maxdepth 3 -name "pyproject.toml" -o -name "setup.py" | head -20Repository: IvorySQL/IvorySQL
Length of output: 43
Update meson installation to use pip and address deprecated setup.py, plus coordinate version updates with CI workflow.
The installation block has several areas for improvement, and notably the versions are intentionally pinned to match .github/workflows/meson_build.yml:
-
Deprecated setup.py install (Line 45): The
python3 setup.py installcommand is deprecated. Usepip3 install /tmp/meson-1.0.1/instead. -
Missing checksum verification: The downloads are not verified with checksums. Consider adding SHA256 verification for security.
-
Old pinned versions: Meson 1.0.1 and Ninja 1.10.1 are pinned to match the CI workflow, but both are dated (2023 and 2020 respectively). If updating to newer versions (current: Meson 1.10.0, Ninja 1.13.2), you must also update
.github/workflows/meson_build.ymllines 27-28 to keep them synchronized.
🤖 Prompt for AI Agents
.devcontainer/Dockerfile lines 39-46: the meson install uses deprecated python3
setup.py install and lacks checksum verification and coordinated CI version
updates; replace the setup.py install with pip3 install /tmp/meson-1.0.1/ (or
pip3 install meson==<version> if you update the pinned version), add SHA256
checksum verification for both the meson tarball and ninja zip after download
and before extraction, and if you bump meson/ninja versions update the matching
pins in .github/workflows/meson_build.yml (lines ~27-28) so the Dockerfile and
CI stay synchronized.
There was a problem hiding this comment.
Yes, intentionally pin the same version as CI pipeline.
There was a problem hiding this comment.
@rophy, understood — keeping the versions synchronized with the CI pipeline is a good practice for consistency.
However, there are still two concerns independent of the version choice:
-
Deprecated installation method (Line 45): The
python3 setup.py installcommand is deprecated. Even with Meson 1.0.1, you should usepip3 install /tmp/meson-1.0.1/instead to avoid deprecation warnings and follow modern Python packaging standards. -
Missing checksum verification: For security, consider adding SHA256 verification after downloading the tarballs:
RUN curl -L "https://github.com/mesonbuild/meson/releases/download/1.0.1/meson-1.0.1.tar.gz" -o /tmp/meson-1.0.1.tar.gz \ && echo "<SHA256_HASH> /tmp/meson-1.0.1.tar.gz" | sha256sum -c - \ && curl -L "https://github.com/ninja-build/ninja/releases/download/v1.10.1/ninja-linux.zip" -o /tmp/ninja-linux.zip \ && echo "<SHA256_HASH> /tmp/ninja-linux.zip" | sha256sum -c - \ && unzip -o /tmp/ninja-linux.zip -d /tmp \ && cp /tmp/ninja /usr/bin/ \ && tar xzf /tmp/meson-1.0.1.tar.gz -C /tmp \ && cd /tmp/meson-1.0.1 && pip3 install . \ && rm -rf /tmp/meson-1.0.1* /tmp/ninja*
Would you like to address these improvements while keeping the version pinning?
There was a problem hiding this comment.
nah, I'm fine with strictly copying what CI piepline does.
There was a problem hiding this comment.
@rophy, understood — I respect your decision to keep the dev container setup aligned with the CI pipeline exactly as-is. Feel free to reach out if you need anything else!
- Install meson 1.0.1 and ninja 1.10.1 from source - Add python3-setuptools, curl, unzip as dependencies - Document meson build in README.md
f380cdd to
8713046
Compare
|
@OreoYang I'm not familar with meson build, the README is mainly to educate someone like me. Kindly help to advise.
|
Yes, currently the CI only performs meson build and does support meson test. In other words, currently there is no CI in place to ensure that the newly added features can run correctly in images built with meson, and manual review is required. take PR #998 for example |
Follows https://github.com/IvorySQL/IvorySQL/blob/master/.github/workflows/meson_build.yml as much as possible.
Summary by CodeRabbit
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.