Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
13 changes: 12 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
# Build tools
build-essential git lcov bison flex pkg-config cppcheck \
# For meson/ninja installation
curl unzip \
# Core dependencies
libkrb5-dev libssl-dev libldap-dev libpam-dev \
libxml2-dev libxslt-dev libreadline-dev libedit-dev \
zlib1g-dev uuid-dev libossp-uuid-dev libuuid1 e2fsprogs \
# ICU support
libicu-dev \
# Language support
python3-dev tcl-dev libperl-dev gettext \
python3-dev python3-setuptools tcl-dev libperl-dev gettext \
# Perl test modules
libipc-run-perl libtime-hires-perl libtest-simple-perl \
# LLVM/Clang
Expand All @@ -34,6 +36,15 @@ RUN apt-get update && apt-get install -y \
sudo tini \
&& rm -rf /var/lib/apt/lists/*

# 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*
Comment on lines +39 to +46
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot Dec 25, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, locate and read the Dockerfile
fd "Dockerfile" .devcontainer

Repository: 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 -20

Repository: 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 yaml

Repository: 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 -30

Repository: IvorySQL/IvorySQL

Length of output: 195


🏁 Script executed:

# Read the meson_build.yml workflow
cat -n .github/workflows/meson_build.yml | head -80

Repository: 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 -60

Repository: 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 -20

Repository: 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:

  1. Deprecated setup.py install (Line 45): The python3 setup.py install command is deprecated. Use pip3 install /tmp/meson-1.0.1/ instead.

  2. Missing checksum verification: The downloads are not verified with checksums. Consider adding SHA256 verification for security.

  3. 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.yml lines 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, intentionally pin the same version as CI pipeline.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@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:

  1. Deprecated installation method (Line 45): The python3 setup.py install command is deprecated. Even with Meson 1.0.1, you should use pip3 install /tmp/meson-1.0.1/ instead to avoid deprecation warnings and follow modern Python packaging standards.

  2. 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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

nah, I'm fine with strictly copying what CI piepline does.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@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!


# Set up locale
RUN locale-gen en_US.UTF-8
ENV LANG=en_US.UTF-8 \
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,25 @@ pg_ctl -D data_ora start
make oracle-check
```

### Meson Build (Alternative)

```bash
# Enter the development container
docker compose exec dev bash

# Configure with meson
meson setup build -Dcassert=true -Dbuildtype=debug

# Build with ninja
ninja -C build

# Run from build directory
./build/src/backend/postgres --version
```

Note: Meson requires a clean source tree. If you previously ran `./configure`,
run `make distclean` first.

## Developer Formatting hooks and CI:
- A pre-commit formatting hook is provided at `.githooks/pre-commit`. Enable it with `git config core.hooksPath .githooks`, or run `make code-format` (equivalently `bash tools/enable-git-hooks.sh`).
- The hook depends only on in-tree tools `src/tools/pgindent` and `src/tools/pg_bsd_indent`. On commit it formats staged C/C++ files with pgindent and re-adds them to the staged area.
Expand Down