Skip to content

Commit

Permalink
Bump versions to 1.70.0 (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomcc authored Jun 5, 2023
1 parent c8a19ef commit 4f71dd5
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.try
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/src/install-plrust-on-debian-ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion plrust/build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions plrustc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 15 additions & 0 deletions plrustc/plrustc/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,13 @@ impl FileLoader for ErrorHidingFileLoader {
replacement_error()
})
}

fn read_binary_file(&self, path: &Path) -> std::io::Result<Vec<u8>> {
std::fs::read(path).map_err(|_| {
// TODO: Should there be a way to preserve errors for debugging?
replacement_error()
})
}
}

struct PlrustcFileLoader {
Expand Down Expand Up @@ -315,6 +322,14 @@ impl FileLoader for PlrustcFileLoader {
Err(replacement_error())
}
}

fn read_binary_file(&self, path: &Path) -> std::io::Result<Vec<u8>> {
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
Expand Down
1 change: 1 addition & 0 deletions plrustc/plrustc/uitests/ice_hook.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ note: Please file a bug report at <https://github.com/tcdi/plrust/issues/new>

note: plrustc version: <version here>

thread panicked while panicking. aborting.
2 changes: 1 addition & 1 deletion plrustc/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -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"
4 changes: 2 additions & 2 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 4f71dd5

Please sign in to comment.