[PR #657] [MERGED] Handle null contents gracefully in message passing API #658

Closed
opened 2025-12-30 01:25:59 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/657
Author: @HT154
Created: 9/22/2024
Status: Merged
Merged: 10/1/2024
Merged by: @bioball

Base: mainHead: client-resource-reader-null-contents


📝 Commits (1)

  • 88b4483 Handle null contents gracefully in message passing API

📊 Changes

4 files changed (+86 additions, -2 deletions)

View changed files

📝 docs/modules/bindings-specification/pages/message-passing-api.adoc (+4 -0)
📝 pkl-server/src/main/kotlin/org/pkl/server/ClientModuleKeyFactory.kt (+1 -1)
📝 pkl-server/src/main/kotlin/org/pkl/server/ClientResourceReader.kt (+1 -1)
📝 pkl-server/src/test/kotlin/org/pkl/server/AbstractServerTest.kt (+80 -0)

📄 Description

In messages "Read Resource Response" and "Read Module Response", if contents and error are both null, default to an empty byte array/string.

This resolves one of the issues reported in #656


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/apple/pkl/pull/657 **Author:** [@HT154](https://github.com/HT154) **Created:** 9/22/2024 **Status:** ✅ Merged **Merged:** 10/1/2024 **Merged by:** [@bioball](https://github.com/bioball) **Base:** `main` ← **Head:** `client-resource-reader-null-contents` --- ### 📝 Commits (1) - [`88b4483`](https://github.com/apple/pkl/commit/88b4483ebecda506a8ba006875f96da86491acc9) Handle `null` contents gracefully in message passing API ### 📊 Changes **4 files changed** (+86 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/modules/bindings-specification/pages/message-passing-api.adoc` (+4 -0) 📝 `pkl-server/src/main/kotlin/org/pkl/server/ClientModuleKeyFactory.kt` (+1 -1) 📝 `pkl-server/src/main/kotlin/org/pkl/server/ClientResourceReader.kt` (+1 -1) 📝 `pkl-server/src/test/kotlin/org/pkl/server/AbstractServerTest.kt` (+80 -0) </details> ### 📄 Description In messages "Read Resource Response" and "Read Module Response", if `contents` and `error` are both null, default to an empty byte array/string. This resolves one of the issues reported in #656 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 01:25:59 +01:00
adam closed this issue 2025-12-30 01:25:59 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#658