Skip to content

Commit f4778d7

Browse files
committed
Fix deprecated windows build
Signed-off-by: Andrew Stein <steinlink@gmail.com>
1 parent 9882278 commit f4778d7

8 files changed

Lines changed: 38 additions & 16 deletions

File tree

.github/actions/install-deps/action.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,17 @@ runs:
6464
with:
6565
cmake-version: "3.29.6"
6666

67+
- name: Setup MSVC environment (Windows)
68+
if: ${{ runner.os == 'Windows' }}
69+
uses: ilammy/msvc-dev-cmd@v1
70+
with:
71+
arch: ${{ inputs.arch == 'aarch64' && 'amd64_arm64' || 'x64' }}
72+
73+
- name: Force Ninja generator (Windows)
74+
if: ${{ runner.os == 'Windows' }}
75+
shell: bash
76+
run: echo "CMAKE_GENERATOR=Ninja" >> "$GITHUB_ENV"
77+
6778
- name: Install pnpm
6879
uses: pnpm/action-setup@v3
6980
with:

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/viewer-charts/test/ts/xy_symbols.spec.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@
1010
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
1111
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
1212

13-
import {
14-
PageView as PspViewer,
15-
compareNodes,
16-
expect,
17-
test,
18-
} from "@perspective-dev/test";
19-
import { SymbolPair } from "@perspective-dev/test/src/js/models/column_settings";
13+
import { PageView as PspViewer, expect, test } from "@perspective-dev/test";
2014
import { Page } from "@playwright/test";
2115

2216
const symbols = [

rust/perspective-client/src/rust/config/aggregates.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ impl From<Aggregate> for view_config::AggList {
5252
fn from(value: Aggregate) -> Self {
5353
view_config::AggList {
5454
aggregations: match value {
55-
Aggregate::SingleAggregate(x) => vec![format!("{}", x)],
55+
Aggregate::SingleAggregate(x) => vec![x],
5656
Aggregate::MultiAggregate(x, y) => {
57-
vec![format!("{}", x), format!("{}", y.join(","))]
57+
vec![x, y.join(",")]
5858
},
5959
},
6060
}

rust/perspective-python/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protobuf-src = ["perspective-client/protobuf-src"]
5151
crate-type = ["cdylib"]
5252

5353
[build-dependencies]
54-
cmake = "0.1.50"
54+
cmake = "0.1.58"
5555
num_cpus = "^1.16.0"
5656
pyo3-build-config = "0.25.1"
5757
python-config-rs = "0.1.2"

rust/perspective-server/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ python = []
3939
disable-cpp = []
4040

4141
[build-dependencies]
42-
cmake = "0.1.50"
42+
cmake = "0.1.58"
4343
num_cpus = "^1.15.0"
4444
shlex = "1.3.0"
4545
protobuf-src = { version = "2.1.1" }

rust/perspective-server/cpp/perspective/CMakeLists.txt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,19 @@ if(PSP_PYTHON_BUILD AND MACOS)
207207
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup")
208208
endif()
209209

210+
if(EMSCRIPTEN)
211+
# Emscripten 6.0.0's libc no longer exposes pthread symbols without
212+
# `-pthread`, so CMake's `FindThreads` probe (`CMAKE_HAVE_LIBC_PTHREAD`)
213+
# fails and dependencies that `find_package(Threads REQUIRED)` (protobuf)
214+
# refuse to configure. We deliberately do NOT enable pthreads for the WASM
215+
# build (no SharedArrayBuffer, no `-pthread`). Pre-seeding this *cache* entry
216+
# (global, so it reaches protobuf's add_subdirectory) makes `FindThreads`
217+
# skip the probe and report success via its `CMAKE_HAVE_LIBC_PTHREAD` branch,
218+
# which sets `CMAKE_THREAD_LIBS_INIT ""` — i.e. `Threads::Threads` links
219+
# nothing and the build stays single-threaded, as it did before the bump.
220+
set(CMAKE_HAVE_LIBC_PTHREAD TRUE CACHE BOOL "psp: satisfy FindThreads on WASM without enabling pthreads" FORCE)
221+
endif()
222+
210223
# ######################
211224
set(psp_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src/include")
212225

@@ -357,7 +370,10 @@ endif()
357370
set(RAPIDJSON_BUILD_TESTS OFF CACHE BOOL "Disable rapidjson tests")
358371

359372
if(PSP_PYODIDE)
360-
set(RELOCATABLE_FLAGS " -sRELOCATABLE=1 -sSIDE_MODULE=2 -fwasm-exceptions -sSUPPORT_LONGJMP=wasm \ ")
373+
# NB: `-sRELOCATABLE=1` was removed in emscripten 6.0.0 ("No longer
374+
# supported") and is redundant here — `-sSIDE_MODULE=2` already emits a
375+
# relocatable side module.
376+
set(RELOCATABLE_FLAGS " -sSIDE_MODULE=2 -fwasm-exceptions -sSUPPORT_LONGJMP=wasm \ ")
361377
string(APPEND CMAKE_EXE_LINKER_FLAGS "${RELOCATABLE_FLAGS} -sWASM_BIGINT=1 ")
362378
string(APPEND CMAKE_C_FLAGS "${RELOCATABLE_FLAGS}")
363379
string(APPEND CMAKE_CXX_FLAGS "${RELOCATABLE_FLAGS}")

rust/perspective-viewer/src/themes/phosphor.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ perspective-string-column-style[theme="Phosphor"] {
154154
--psp-expression--function--color: var(--theme-green-bright);
155155
--psp-expression--psp-error--color: var(--theme-red);
156156
--psp-calendar--filter: invert(1) hue-rotate(70deg);
157+
--psp-input--filter: invert(1) hue-rotate(70deg);
157158
--psp-warning--color: var(--theme-bg0);
158159
--psp-warning--background: var(--theme-amber);
159160
--psp-icon--select-arrow--mask-image: var(

0 commit comments

Comments
 (0)