You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does anyone have a working example of developing pgrx based extensions within a docker devcontrainer in vscode?
With the following Docker file
RUN apt-get update && \
apt-get install -y \
git \
curl \
libclang-dev \
gcc \
build-essential \
libreadline-dev \
zlib1g-dev \
flex \
bison \
libxml2-dev \
libxslt-dev \
libssl-dev \
libxml2-utils \
xsltproc \
ccache \
pkg-config
# Create a non-root user `developer` and setup sudo
RUN useradd -m -d /home/developer -s /bin/bash developer && \
echo 'developer ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# Create /workspaces folder and give all permissions to the developer account
RUN mkdir /workspaces && chown -R developer:developer /workspaces
# Set the user to developer
USER developer
WORKDIR /home/developer
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# Ensure cargo binaries are in PATH
ENV PATH=/home/developer/.cargo/bin:$PATH
# Install pgrx
RUN cargo install cargo-pgrx
and then installing the "rust-analyser" extension, it fails with the following compilation error in the output
[shim for PG v16] /----------------------------------------
Error: failed to make pgrx-cshim for v16
Location:
/home/developer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pgrx-pg-sys-0.11.4/build.rs:889:20
I must be missing something simple but cannot track down what.
Thanks in advance,
Ross
The text was updated successfully, but these errors were encountered:
Sorry, I don't regularly use these tools ("these" including apt) except for r-a, so I'm guessing wildly. It looks like the makefile failed. That message is from around here:
returnErr(eyre!("failed to make pgrx-cshim for v{}", major_version));
I would strongly recommend running cargo pgrx init and caching the result in your container's... layers or whatever.
I also recommend updating to pgrx 0.12.0-beta.5 (or whatever I've reached by the time you read this message, hopefully 0.12 proper). I've altered MANY fine-grained build details, so I can't provide further support.
Hi,
Does anyone have a working example of developing pgrx based extensions within a docker devcontrainer in vscode?
With the following Docker file
and then installing the "rust-analyser" extension, it fails with the following compilation error in the output
I must be missing something simple but cannot track down what.
Thanks in advance,
Ross
The text was updated successfully, but these errors were encountered: