From ff84e6c9fd31216e7f53d0e60afbcc6993307a7e Mon Sep 17 00:00:00 2001 From: jeff377 Date: Wed, 2 Dec 2026 16:53:56 +0800 Subject: [PATCH] Record the move to Polhem.JsonRpc 1.4.0 in the unreleased changelog Opens the [Unreleased] entry of both changelog indexes and the 1.17.0 release notes in English and Traditional Chinese. The move is breaking for applications that reference a Polhem.JsonRpc package themselves, for a business object registered under the ProgId rpc, and for code that sets Accept on the HttpClient of its own HttpTransport. The details of the JSON-RPC changes point to the Polhem.JsonRpc changelog at v1.4.0. Follows #644. --- CHANGELOG.md | 7 ++++ CHANGELOG.zh-TW.md | 7 ++++ docs/en/changelogs/1.17.0.md | 63 +++++++++++++++++++++++++++++++++ docs/zh-TW/changelogs/1.17.0.md | 46 ++++++++++++++++++++++++ 4 files changed, 123 insertions(+) create mode 100644 docs/en/changelogs/1.17.0.md create mode 100644 docs/zh-TW/changelogs/1.17.0.md diff --git a/CHANGELOG.md b/CHANGELOG.md index e8269364..85541e3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,13 @@ it affects and how to migrate. The format follows [Keep a Changelog](https://kee > from 2.0.0. Reference the packages with a range that stays within one minor version, for example `[1.6,1.7)`, rather > than `1.*`. The policy and its reasons are in [ADR-052](maintainers/adr/adr-052-breaking-changes-in-1-x-minors.md). +## [Unreleased] + +Details and migration steps: [docs/en/changelogs/1.17.0.md](docs/en/changelogs/1.17.0.md) + +- **Breaking:** The packages move to Polhem.JsonRpc 1.4.0: an application that references its packages itself moves with them, the ProgId `rpc` can no longer be called, and `HttpTransport` ignores an `Accept` header set on its `HttpClient`. +- Business objects do not publish streaming methods: `PolhemMethodPolicy` admits only methods that take one parameter. + ## [1.16.0] - 2026-11-20 Details and migration steps: [docs/en/changelogs/1.16.0.md](docs/en/changelogs/1.16.0.md) diff --git a/CHANGELOG.zh-TW.md b/CHANGELOG.zh-TW.md index bdc80de8..06b67226 100644 --- a/CHANGELOG.zh-TW.md +++ b/CHANGELOG.zh-TW.md @@ -10,6 +10,13 @@ Polhem 套件的重要變更,每個版本只列幾項重點。每個版本都 > 版號自 2.0.0 起依循[語意化版本](https://semver.org/lang/zh-TW/)。引用套件時請使用不跨 minor 版的範圍,例如 > `[1.6,1.7)`,不要用 `1.*`。這項政策與理由見 [ADR-052](maintainers/adr/adr-052-breaking-changes-in-1-x-minors.md)。 +## [Unreleased] + +詳細內容與遷移步驟:[docs/zh-TW/changelogs/1.17.0.md](docs/zh-TW/changelogs/1.17.0.md) + +- **破壞性:** 各套件改用 Polhem.JsonRpc 1.4.0:自己直接參考其套件的應用要一起升版,ProgId `rpc` 不再能被呼叫,`HttpTransport` 不再採用其 `HttpClient` 上設定的 `Accept` 標頭。 +- business object 不公開串流方法:`PolhemMethodPolicy` 只放行一個參數的方法。 + ## [1.16.0] - 2026-11-20 詳細內容與遷移步驟:[docs/zh-TW/changelogs/1.16.0.md](docs/zh-TW/changelogs/1.16.0.md) diff --git a/docs/en/changelogs/1.17.0.md b/docs/en/changelogs/1.17.0.md new file mode 100644 index 00000000..3f2d2d85 --- /dev/null +++ b/docs/en/changelogs/1.17.0.md @@ -0,0 +1,63 @@ +# Polhem 1.17.0 — Release Notes + +[繁體中文](../../zh-TW/changelogs/1.17.0.md) + +This file holds the details behind the `[Unreleased]` entry in [CHANGELOG.md](../../../CHANGELOG.md), which becomes +`[1.17.0]` at the release. + +The packages move from Polhem.JsonRpc 1.2.0 to 1.4.0. The framework does not use the streamed responses that JSON-RPC +1.3.0 added, and a business object cannot publish a streaming method. The wire stays compatible with 1.16.0: the +payload bodies under 256 bytes that are now written uncompressed are read by Polhem since 1.3.0 and by +polhem-connector-js. + +What each kind of application has to act on: + +- **Applications that reference a Polhem.JsonRpc package themselves**: [The packages move to Polhem.JsonRpc + 1.4.0](#the-packages-move-to-polhemjsonrpc-140). +- **Applications with a business object registered under the ProgId `rpc`**: [The ProgId `rpc` can no longer be + called](#the-progid-rpc-can-no-longer-be-called). +- **Code that calls the server through `HttpTransport` directly**: [`HttpTransport` ignores the `Accept` header of its + `HttpClient`](#httptransport-ignores-the-accept-header-of-its-httpclient). + +## New features and changes + +### Business objects do not publish streaming methods + +Since Polhem.JsonRpc 1.3.0 the dispatcher also resolves a method whose second parameter is an `IJsonRpcStream`, and +leaves the decision to the method policy. The framework does not stream: the items would leave without +`ApiOutputConverter`, which applies to the return value only. `PolhemMethodPolicy` therefore admits a method only when +it takes one parameter, so a streaming method is refused even on a business object declared with +`[ApiAccessControl]` at class level. Existing actions, which all take one parameter, are not affected. + +## Breaking changes + +### The packages move to Polhem.JsonRpc 1.4.0 + +- **Affects:** applications that reference a Polhem.JsonRpc package (`Polhem.JsonRpc.Client`, + `Polhem.JsonRpc.Server`, `Polhem.JsonRpc.Payload` and the others) themselves, besides the Polhem packages. +- **Before:** the Polhem packages required exactly Polhem.JsonRpc 1.2.0. +- **Now:** they require exactly 1.4.0. A direct reference to another version makes restore report a package + conflict (NU1605 or NU1608). +- **Migrate:** + 1. Change every direct Polhem.JsonRpc reference to 1.4.0, all of them together. + 2. Code that uses the Polhem.JsonRpc API itself reads the `[1.3.0]` and `[1.4.0]` entries of the + [Polhem.JsonRpc changelog](https://github.com/polhem-dev/polhem-jsonrpc/blob/v1.4.0/CHANGELOG.md), which list + every change with its reasons. +- **Background:** the [Polhem.JsonRpc changelog](https://github.com/polhem-dev/polhem-jsonrpc/blob/v1.4.0/CHANGELOG.md). + +### The ProgId `rpc` can no longer be called + +- **Affects:** applications that register a business object under the ProgId `rpc`. +- **Before:** a call to `rpc.` reached that business object. +- **Now:** JSON-RPC 2.0 reserves method names that start with `rpc.`, and Polhem.JsonRpc 1.3.0 answers them with + `-32601 Method not found`. +- **Migrate:** give the business object another ProgId, and change the callers and the definitions that name it. + +### `HttpTransport` ignores the `Accept` header of its `HttpClient` + +- **Affects:** code that builds an `HttpTransport` over its own `HttpClient` and sets `Accept` in + `HttpClient.DefaultRequestHeaders`. The framework's own client (`RemoteApiProvider`) creates its `HttpClient` + internally and is not affected. +- **Before:** an ordinary call sent the `Accept` header of `DefaultRequestHeaders`. +- **Now:** an ordinary call names `Accept: application/json`, so that a server never answers it as a stream. +- **Migrate:** when a proxy needs another value, set the header in a `DelegatingHandler`. diff --git a/docs/zh-TW/changelogs/1.17.0.md b/docs/zh-TW/changelogs/1.17.0.md new file mode 100644 index 00000000..ad8443d5 --- /dev/null +++ b/docs/zh-TW/changelogs/1.17.0.md @@ -0,0 +1,46 @@ + +# Polhem 1.17.0 — 發佈說明 + +[English](../../en/changelogs/1.17.0.md) + +本檔是 [CHANGELOG.zh-TW.md](../../../CHANGELOG.zh-TW.md) 中 `[Unreleased]` 條目的詳細內容,發版時該條目改為 `[1.17.0]`。 + +各套件從 Polhem.JsonRpc 1.2.0 改用 1.4.0。框架不使用 JSON-RPC 1.3.0 新增的串流回應,business object 也無法公開串流方法。wire 與 1.16.0 相容:現在不壓縮的 256 bytes 以下 payload body,Polhem 1.3.0 起與 polhem-connector-js 都讀得了。 + +各類應用需要處理的項目: + +- **自己直接參考 Polhem.JsonRpc 套件的應用**:[各套件改用 Polhem.JsonRpc 1.4.0](#各套件改用-polhemjsonrpc-140)。 +- **以 ProgId `rpc` 註冊 business object 的應用**:[ProgId `rpc` 不再能被呼叫](#progid-rpc-不再能被呼叫)。 +- **直接透過 `HttpTransport` 呼叫 server 的程式碼**:[`HttpTransport` 不再採用其 `HttpClient` 的 `Accept` 標頭](#httptransport-不再採用其-httpclient-的-accept-標頭)。 + +## 新功能與變更 + +### business object 不公開串流方法 + +Polhem.JsonRpc 1.3.0 起,dispatcher 也會解析第二個參數為 `IJsonRpcStream` 的方法,並交由 method policy 決定。框架不支援串流:item 不會經過只套用在回傳值上的 `ApiOutputConverter`。因此 `PolhemMethodPolicy` 只放行一個參數的方法,即使 business object 在類別層級宣告了 `[ApiAccessControl]`,串流方法也一律拒絕。既有的 action 都只有一個參數,不受影響。 + +## 破壞性變更 + +### 各套件改用 Polhem.JsonRpc 1.4.0 + +- **影響對象:** 除了 Polhem 套件之外,自己也直接參考 Polhem.JsonRpc 套件(`Polhem.JsonRpc.Client`、`Polhem.JsonRpc.Server`、`Polhem.JsonRpc.Payload` 等)的應用。 +- **之前:** Polhem 套件要求的是剛好 Polhem.JsonRpc 1.2.0。 +- **現在:** 要求剛好 1.4.0。直接參考其他版本時,restore 會回報套件衝突(NU1605 或 NU1608)。 +- **遷移:** + 1. 把所有直接參考的 Polhem.JsonRpc 套件一起改成 1.4.0。 + 2. 自己使用 Polhem.JsonRpc API 的程式碼,請閱讀 [Polhem.JsonRpc 變更記錄](https://github.com/polhem-dev/polhem-jsonrpc/blob/v1.4.0/CHANGELOG.zh-TW.md)的 `[1.3.0]` 與 `[1.4.0]`,那裡列出每一項變更與理由。 +- **背景:** [Polhem.JsonRpc 變更記錄](https://github.com/polhem-dev/polhem-jsonrpc/blob/v1.4.0/CHANGELOG.zh-TW.md)。 + +### ProgId `rpc` 不再能被呼叫 + +- **影響對象:** 以 ProgId `rpc` 註冊 business object 的應用。 +- **之前:** 呼叫 `rpc.` 會到達該 business object。 +- **現在:** JSON-RPC 2.0 保留以 `rpc.` 開頭的方法名稱,Polhem.JsonRpc 1.3.0 起以 `-32601 Method not found` 回應。 +- **遷移:** 為該 business object 換一個 ProgId,並修改呼叫端與參照它的定義。 + +### `HttpTransport` 不再採用其 `HttpClient` 的 `Accept` 標頭 + +- **影響對象:** 以自己的 `HttpClient` 建立 `HttpTransport`,並在 `HttpClient.DefaultRequestHeaders` 設定 `Accept` 的程式碼。框架自己的 client(`RemoteApiProvider`)在內部建立 `HttpClient`,不受影響。 +- **之前:** 一般呼叫會送出 `DefaultRequestHeaders` 的 `Accept` 標頭。 +- **現在:** 一般呼叫一律送 `Accept: application/json`,server 就不會以串流回應它。 +- **遷移:** proxy 需要其他值時,在 `DelegatingHandler` 裡設定該標頭。