diff --git a/Dockerfile.try b/Dockerfile.try index 8f720ceb..95922f09 100644 --- a/Dockerfile.try +++ b/Dockerfile.try @@ -40,7 +40,7 @@ USER postgres ENV USER postgres # Install Rust -RUN wget -qO- https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain=1.69.0 +RUN wget -qO- https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain=1.70.0 ENV PATH="/var/lib/postgresql/.cargo/bin:${PATH}" # Copy in plrust source diff --git a/doc/src/install-plrust-on-debian-ubuntu.md b/doc/src/install-plrust-on-debian-ubuntu.md index c70ee5aa..363a16b1 100644 --- a/doc/src/install-plrust-on-debian-ubuntu.md +++ b/doc/src/install-plrust-on-debian-ubuntu.md @@ -28,7 +28,7 @@ Where: Example: ``` -plrust-trusted-1.2.3_1.69.0-debian-pg15-amd64.deb +plrust-trusted-1.2.3_1.70.0-debian-pg15-amd64.deb ``` ## Preparing the environment diff --git a/plrust/build b/plrust/build index 6acccd22..347d57cc 100755 --- a/plrust/build +++ b/plrust/build @@ -42,7 +42,7 @@ fi git pull git submodule update --init --recursive else - git clone https://github.com/tcdi/postgrestd.git --branch "rust-1.69.0" --recurse-submodules + git clone https://github.com/tcdi/postgrestd.git --branch "rust-1.70.0" --recurse-submodules cd ./postgrestd fi rm --force rust-toolchain.toml diff --git a/plrustc/build.sh b/plrustc/build.sh index 4c6bbf19..dabc6aa8 100755 --- a/plrustc/build.sh +++ b/plrustc/build.sh @@ -25,8 +25,8 @@ fi export RUSTC_BOOTSTRAP=1 version=$($RUSTC --version | cut -d ' ' -f 2) -if [ "$version" != "1.69.0" ]; then - echo "rustc ('$RUSTC') is not version 1.69.0" >&2 +if [ "$version" != "1.70.0" ]; then + echo "rustc ('$RUSTC') is not version 1.70.0" >&2 exit 1 fi diff --git a/plrustc/plrustc/src/main.rs b/plrustc/plrustc/src/main.rs index 4b5d060e..42228213 100644 --- a/plrustc/plrustc/src/main.rs +++ b/plrustc/plrustc/src/main.rs @@ -281,6 +281,13 @@ impl FileLoader for ErrorHidingFileLoader { replacement_error() }) } + + fn read_binary_file(&self, path: &Path) -> std::io::Result> { + std::fs::read(path).map_err(|_| { + // TODO: Should there be a way to preserve errors for debugging? + replacement_error() + }) + } } struct PlrustcFileLoader { @@ -315,6 +322,14 @@ impl FileLoader for PlrustcFileLoader { Err(replacement_error()) } } + + fn read_binary_file(&self, path: &Path) -> std::io::Result> { + if path.exists() && !path.is_dir() && self.is_inside_allowed_dir(path) { + ErrorHidingFileLoader.read_binary_file(path) + } else { + Err(replacement_error()) + } + } } /// Get the sysroot, looking from most specific to this invocation to the diff --git a/plrustc/plrustc/uitests/ice_hook.stderr b/plrustc/plrustc/uitests/ice_hook.stderr index 75da94d8..9e301268 100644 --- a/plrustc/plrustc/uitests/ice_hook.stderr +++ b/plrustc/plrustc/uitests/ice_hook.stderr @@ -9,3 +9,4 @@ note: Please file a bug report at note: plrustc version: +thread panicked while panicking. aborting. diff --git a/plrustc/rust-toolchain.toml b/plrustc/rust-toolchain.toml index 59557564..443740e9 100644 --- a/plrustc/rust-toolchain.toml +++ b/plrustc/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "1.69.0" +channel = "1.70.0" components = [ "rustfmt", "rust-src", "rustc-dev", "cargo", "llvm-tools" ] targets = [ ] profile = "minimal" diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 6bb732f6..0722528e 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "1.69.0" -components = [ "rustfmt", "rust-src", "rustc-dev" ] +channel = "1.70.0" +components = [ "rustfmt", "rust-src", "rustc-dev", "llvm-tools" ] targets = [ ] profile = "minimal"