2025-01-01 missing_docs の動作変更 / Safari の Web Push Notification
新年のあいさつをする日。くたびれた。ここ何年かは大きな変化なく繰り返しているように思う。
今年はかるたを持って歩いてキッズを熱くさせた。
Rust 1.83 で lint のルールの解釈が変わっていることで bouzuya/serde-firestore-value や bouzuya/firestore-structured-query の cargo test
が壊れた。
https://aznhe21.hatenablog.com/entry/2024/11/29/rust-1.83
既定許可のリントmissing_docsはこれまで、rustc --test・cargo test経由で呼び出された際に自動的に無効化されていた。これにより#[expect(missing_docs)]が誤って満たされていなかった。この挙動は削除され#[expect(missing_docs)]があらゆる事例で満たされるようになったが、外部から到達可能な#[cfg(test)]アイテムや統合テストのクレート文書、および統合テスト内の外部から到達可能なアイテムに対して新しいmissing_docs診断が報告されるようになった
これ。
https://doc.rust-lang.org/stable/releases.html#version-1830-2024-11-28
The allow-by-default missing_docs lint used to disable itself when invoked through rustc --test/cargo test, resulting in #[expect(missing_docs)] emitting false positives due to the expectation being wrongly unfulfilled. This behavior has now been removed, which allows #[expect(missing_docs)] to be fulfilled in all scenarios, but will also report new missing_docs diagnostics for publicly reachable #[cfg(test)] items, integration test crate-level documentation, and publicly reachable items in integration tests.
原文これ。
ぼくはテストコードでは雑に #![allow(missing_docs)]
して許可した。
FCM: Firebase Cloud Messaging の検証がだいたいできた。残っていたのは Safari 。
Safari は Web Push Notification に次の環境で対応している。
- iOS 16.4 以降のホーム画面の Web アプリ
- macOS 13 以降の Safari 16 の Web ページ
Add web push to Home Screen web apps in iOS 16.4 or later and Webpages in Safari 16 for macOS 13 or later.
「ホーム画面の Web アプリ」にするためには manifest.json を置いて display
を standalone
または fullscreen
にする必要がある。
https://webkit.org/blog/13878/web-push-for-web-apps-on-ios-and-ipados/
Web developers have the option to create a manifest file (with its display member set to standalone or fullscreen) and serve it along with their website. If they do, that site becomes a Home Screen web app. Then, when you tap on its icon, the web app opens like any other app on iOS or iPadOS instead of opening in a browser. You can see its app preview in the App Switcher, separate from Safari or any other browser.
今日のコミット。
- serde-firestore-value 3 commits
- firestore-structured-query 4 commits
- googleapis-tonic 3 commits
- fcm-example 2 commits