Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update to latest WASI SDK 25 #1074

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Install wasi-sdk-20 (linux)"
- name: "Install wasi-sdk-25 (linux)"
run: |
set -x
curl -sS -L -O https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sdk-20.0-linux.tar.gz
tar xf wasi-sdk-20.0-linux.tar.gz
curl -sS -L -O https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-x86_64-linux.tar.gz
tar xf wasi-sdk-25.0-x86_64-linux.tar.gz
sudo mkdir -p /opt/wasi-sdk
sudo mv wasi-sdk-20.0/* /opt/wasi-sdk/
sudo mv wasi-sdk-25.0-x86_64-linux/* /opt/wasi-sdk/
ls /opt/wasi-sdk/
- run: |
/opt/wasi-sdk/bin/clang-format --version
Expand Down
4 changes: 2 additions & 2 deletions runtime/fastly/builtins/cache-core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ JS::Result<host_api::CacheLookupOptions> parseLookupOptions(JSContext *cx,
Headers::HeadersList *headers_list = Headers::get_list(cx, headers);
MOZ_ASSERT(headers_list);
auto res = host_api::write_headers(request_handle.headers_writable(), *headers_list);
if (auto *err = res.to_err()) {
if ([[maybe_unused]] auto *err = res.to_err()) {
return JS::Result<host_api::CacheLookupOptions>(JS::Error());
}
options.request_headers = host_api::HttpReq(request_handle);
Expand Down Expand Up @@ -364,7 +364,7 @@ JS::Result<host_api::CacheWriteOptions> parseInsertOptions(JSContext *cx,
Headers::HeadersList *headers_list = Headers::get_list(cx, headers);
MOZ_ASSERT(headers_list);
auto res = host_api::write_headers(request_handle.headers_writable(), *headers_list);
if (auto *err = res.to_err()) {
if ([[maybe_unused]] auto *err = res.to_err()) {
return JS::Result<host_api::CacheWriteOptions>(JS::Error());
}
options.request_headers = host_api::HttpReq(request_handle);
Expand Down
14 changes: 7 additions & 7 deletions runtime/fastly/builtins/cache-simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ bool get_or_set_then_handler(JSContext *cx, JS::HandleObject lookup_state, JS::H
options.surrogate_keys = key_result.inspect();

auto inserted_res = handle.transaction_insert_and_stream_back(options);
if (auto *err = inserted_res.to_err()) {
if ([[maybe_unused]] auto *err = inserted_res.to_err()) {
return false;
}

Expand All @@ -340,22 +340,22 @@ bool get_or_set_then_handler(JSContext *cx, JS::HandleObject lookup_state, JS::H
// source_body will only be valid when the body is a Host-backed ReadableStream
if (source_body.valid()) {
auto res = body.append(source_body);
if (auto *error = res.to_err()) {
if ([[maybe_unused]] auto *error = res.to_err()) {
return false;
}
} else {
auto write_res = body.write_all_back(reinterpret_cast<uint8_t *>(buf.get()), options.length);
if (auto *error = write_res.to_err()) {
if ([[maybe_unused]] auto *error = write_res.to_err()) {
return false;
}
auto close_res = body.close();
if (auto *error = close_res.to_err()) {
if ([[maybe_unused]] auto *error = close_res.to_err()) {
return false;
}
}

auto res = inserted_handle.get_body(host_api::CacheGetBodyOptions{});
if (auto *err = res.to_err()) {
if ([[maybe_unused]] auto *err = res.to_err()) {
return false;
}

Expand Down Expand Up @@ -442,15 +442,15 @@ bool SimpleCache::getOrSet(JSContext *cx, unsigned argc, JS::Value *vp) {
// cache under the provided `key`, and then we will resolve with a SimpleCacheEntry
// containing the value.
auto state_res = handle.get_state();
if (auto *err = state_res.to_err()) {
if ([[maybe_unused]] auto *err = state_res.to_err()) {
return false;
}

auto state = state_res.unwrap();
args.rval().setObject(*promise);
if (state.is_usable()) {
auto body_res = handle.get_body(host_api::CacheGetBodyOptions{});
if (auto *err = body_res.to_err()) {
if ([[maybe_unused]] auto *err = body_res.to_err()) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/fastly/host-api/host_api_fastly.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ struct TlsVersion {
uint8_t value = 0;

explicit TlsVersion(uint8_t raw);
explicit TlsVersion(){};
explicit TlsVersion() {};

uint8_t get_version() const;
double get_version_number() const;
Expand Down
Loading