Skip to content

Commit c0645d2

Browse files
authored
chore: clean up main branch and sync win32-x64 prebuilt artifacts (#93)
- cli(cef): remove legacy `.cef-cache` migration code from `ensure_cef_cache`; the migration was tagged legacy at package isolation (a6b05f1) and the project is pre-0.1.x, so existing `.cef-cache` users re-download to the new `.proton/cache/cef` or global `~/.proton/cache/cef` location. - ci(windows): add `$ErrorActionPreference = "Stop"` and `$PSNativeCommandUseErrorActionPreference = $true` to the "Test extensions on Windows" and "Build examples on Windows" steps. Without these, `moon.exe` returning a non-zero exit code was silently swallowed by PowerShell, leaving CI green while tests were actually failing (matching the pattern already used by the "Check framework modules on Windows" and "Run MoonBit CDP e2e on Windows" steps). - fs(test): the `fs permission resolution anchors relative paths to the trusted base` assertion built its expected root path with `base.join("workspace").normalize()`, missing the `.resolve()` call that `resolve_path_against_base` actually performs on the trusted base. On Windows this produced a drive-less `\trusted\app\workspace` expectation while the code correctly resolves to `D:\trusted\app\workspace`. Use `canonical_base` (which already applies `.resolve()`) to align the expectation with the implementation. - prebuilt(win32-x64): rebuild `proton.dll` and `proton.lib` in Release mode from current `main` source and sync into `proton/prebuilt/win32-x64/`. The committed artifacts were stale and missing the `proton_window_*`, `proton_view_*`, and other newer ABI exports declared in `native/include/proton_native.h`, causing `node scripts/verify_prebuilt_abi.mjs win32-x64` to fail. After sync the ABI validator reports `[OK] Proton win32-x64 prebuilt exports the complete public ABI.` Validation: moon fmt --check node scripts/verify_generated.mjs node scripts/verify_prebuilt_abi.mjs win32-x64 ctest --test-dir native\build-release -C Release --output-on-failure moon check --target native --deny-warn moon -C proton test native --target native moon -C cli test -p ... --target native --no-parallelize moon -C extensions test -p ... --target native moon test -p .../ffi ... --target native moon -C examples build --target native moon -C e2e build --target native
1 parent 67c6b27 commit c0645d2

5 files changed

Lines changed: 9 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ jobs:
269269
_CL_: /utf-8
270270
PATH: ${{ github.workspace }}\lib;${{ env.PATH }}
271271
run: |
272+
$ErrorActionPreference = "Stop"
273+
$PSNativeCommandUseErrorActionPreference = $true
272274
$extensionPackages = @(
273275
"moonbit-community/proton_ext"
274276
"moonbit-community/proton_ext/auto_launch"
@@ -305,6 +307,8 @@ jobs:
305307
env:
306308
_CL_: /utf-8
307309
run: |
310+
$ErrorActionPreference = "Stop"
311+
$PSNativeCommandUseErrorActionPreference = $true
308312
moon -C examples build --target native
309313
310314
- name: List Windows example binaries

cli/cef/cef_cache.mbt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -156,19 +156,6 @@ async fn ensure_cef_cache(
156156
normalize_cef_runtime_layout(cache_dir)
157157
return cache_dir
158158
}
159-
let legacy_cache = @fsutil.path_join(root, ".cef-cache")
160-
if installed_version(legacy_cache) == name &&
161-
installed_checksum(legacy_cache) == sha256 {
162-
install_cef_root(
163-
extracted_root=legacy_cache,
164-
install_dir=cache_dir,
165-
name~,
166-
sha256~,
167-
root~,
168-
platform~,
169-
)
170-
return cache_dir
171-
}
172159
if project_cache != cache_dir &&
173160
installed_version(project_cache) == name &&
174161
installed_checksum(project_cache) == sha256 {

extensions/fs/fs_wbtest.mbt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,11 @@ test "fs permission resolution anchors relative paths to the trusted base" {
287287
root.get("path"),
288288
Some(
289289
Json::string(
290-
@mbpath.Path(path_for_platform(base.join("workspace").to_string()))
290+
@mbpath.Path(
291+
path_for_platform(
292+
@mbpath.Path(canonical_base).join("workspace").to_string(),
293+
),
294+
)
291295
.normalize()
292296
.to_string(),
293297
),
512 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)