Skip to content

Commit 8f10f23

Browse files
authored
Merge lidge-jun#7009: land eight owner fixes for 2.84.0
fix: land eight owner fixes for 2.84.0
2 parents a63267c + fe6768c commit 8f10f23

167 files changed

Lines changed: 13345 additions & 1877 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/actions/setup-project-bun/action.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ description: >-
44
runtime (default), or testRunnerBun for test-runner.
55
66
# Runtime 1.4.2 fixes #6684's Windows Bun.fetch stream truncation. The test runner
7-
# stays on 1.4.0: #4821 reverted #4064 after 1.4.2's multi-file --isolate preload
8-
# segfault; #6713 run 37631558263 reproduces it on Linux 1/4, macOS 2/2, Windows 9/9.
7+
# skipped 1.4.2: #4821 reverted #4064 after its multi-file --isolate preload segfault
8+
# (#6713 run 37631558263: Linux 1/4, macOS 2/2, Windows 9/9). It moved from 1.4.0 to
9+
# 1.4.3 for oven-sh/bun#44581: 1.4.0's Bun.spawnSync could lose a child's exit after
10+
# finalizers ran inside an earlier call and spin past its own timeout (#4956).
911
# Rejoin only after the upstream runner crash is fixed and a green lane=all
1012
# dispatch proves the unified version; then delete testRunnerBun and this role input.
1113
inputs:

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,9 @@ jobs:
550550
printf 'scheduled run tests dev at %s (workflow %s)\n' "$sha" "$GITHUB_SHA"
551551
552552
# Bun roles (#6713): runtime 1.4.2 fixes #6684's Windows Bun.fetch streaming;
553-
# test-runner 1.4.0 avoids 1.4.2's multi-file --isolate preload segfault (#4821
554-
# reverted #4064; run 37631558263: Linux 1/4, macOS 2/2, Windows 9/9).
553+
# the test runner skipped 1.4.2's multi-file --isolate preload segfault (#4821
554+
# reverted #4064; run 37631558263: Linux 1/4, macOS 2/2, Windows 9/9) and runs
555+
# 1.4.3, whose oven-sh/bun#44581 stops Bun.spawnSync losing a child's exit (#4956).
555556
# Rejoin after the upstream runner crash is fixed and a green lane=all dispatch
556557
# proves the unified version, then delete testRunnerBun and the action's role input.
557558
# The suite, split by file across four Linux runners.

‎CONTRIBUTING.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ A ready-for-review PR is the author's claim that the change is complete, underst
6161

6262
## Local validation and hooks
6363

64-
The suite uses Bun 1.4.0 (`testRunnerBun`) while the shipped runtime is 1.4.2.
65-
`scripts/test.ts` finds a 1.4.0 binary on PATH or in `~/.bun/bin`, or uses
64+
The suite uses Bun 1.4.3 (`testRunnerBun`) while the shipped runtime is 1.4.2.
65+
`scripts/test.ts` finds a 1.4.3 binary on PATH or in `~/.bun/bin`, or uses
6666
`OCX_TEST_RUNNER_BUN`; install that version locally if it is missing.
6767

6868
Run `bun run test` before review readiness. If the full local suite is too costly

‎Dockerfile‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# syntax=docker/dockerfile:1
22

33
# Keep the runtime aligned with package.json and pin the multi-platform image index.
4-
# Runtime 1.4.2 fixes #6684's Windows Bun.fetch streaming; CI tests stay on 1.4.0
4+
# Runtime 1.4.2 fixes #6684's Windows Bun.fetch streaming; CI tests run on 1.4.3
55
# because 1.4.2 segfaults reloading preloads in multi-file --isolate (#4821;
6-
# #6713 run 37631558263: Linux 1/4, macOS 2/2, Windows 9/9). Rejoin after the
6+
# #6713 run 37631558263: Linux 1/4, macOS 2/2, Windows 9/9) and 1.4.0's spawnSync
7+
# can lose a child's exit (#4956, oven-sh/bun#44581). Rejoin after the
78
# upstream crash fix passes a unified-version lane=all dispatch, then delete
89
# package.json's testRunnerBun pin and setup-project-bun's role input.
910
ARG BUN_IMAGE=oven/bun:1.4.2@sha256:9114c058aeae42162ee16dd5084b95fe9473970bb6bcb5b232ab1630f0546895

‎desktop/src-tauri/src/first_run.rs‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ pub fn apply_start_at_login_default(app: &AppHandle) -> StartAtLogin {
8585
/// It runs once, behind its own marker, and only where autostart is already on. It never turns the
8686
/// setting on and never turns it off; the worst case is an entry that keeps its old arguments and a
8787
/// login launch that shows its window, which is the visible failure rather than the silent one.
88+
///
89+
/// On macOS the marker lives in a config directory every copy of the app shares, while the plugin
90+
/// rewrites whatever plist exists. The rewrite is therefore limited to this copy's own entry in the
91+
/// exact shape the plugin writes; another or a missing copy, or any key the rewrite would drop, is
92+
/// left untouched and unmarked (#6972).
8893
pub fn adopt_launch_origin_argument(app: &AppHandle) {
8994
let Ok(dir) = app.path().app_config_dir() else {
9095
return;
@@ -102,6 +107,23 @@ pub fn adopt_launch_origin_argument(app: &AppHandle) {
102107
// that is already enabled, so retrying after a transient registry, LaunchAgent or desktop-file
103108
// error is free — and claiming the marker first would suppress the migration permanently and
104109
// leave a login launch showing its window forever.
110+
#[cfg(target_os = "macos")]
111+
{
112+
use crate::login_registration::Migration;
113+
let Ok(home) = app.path().home_dir() else {
114+
return;
115+
};
116+
match crate::login_registration::judge_migration(&home) {
117+
Migration::Rewrite => {
118+
if crate::login_autostart::enable(app).is_err() {
119+
return;
120+
}
121+
}
122+
Migration::Absent => {}
123+
Migration::Leave => return,
124+
}
125+
}
126+
#[cfg(not(target_os = "macos"))]
105127
match app.autolaunch().is_enabled() {
106128
Ok(true) => {
107129
if crate::login_autostart::enable(app).is_err() {

‎desktop/src-tauri/src/lib.rs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ mod formatting;
1515
mod identity;
1616
mod logging;
1717
mod login_autostart;
18+
// The judgment is portable so Linux CI runs its fixture parity tests; only macOS reads launchd.
19+
#[cfg(any(target_os = "macos", test))]
20+
mod login_registration;
1821
#[cfg(any(target_os = "windows", test))]
1922
mod windows_autostart_command;
2023
// macOS only: it exists to replace one item in a menu no other platform installs. Compiling it
@@ -35,6 +38,8 @@ mod popup;
3538
mod popup;
3639
#[cfg(target_os = "macos")]
3740
mod provider_icons;
41+
#[cfg(target_os = "macos")]
42+
mod tray_login;
3843
// The macOS build selects native_tray.rs as the popup module; compile the portable popup
3944
// module's tests on macOS too so its navigation rules run on the maintainers' platform.
4045
#[cfg(all(test, target_os = "macos"))]

0 commit comments

Comments
 (0)