[PR #197] Improve docs and usability of EvaluatorBuilder #443

Open
opened 2025-12-30 01:24:31 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/197
Author: @odenix
Created: 2/18/2024
Status: 🔄 Open

Base: mainHead: eval-builder


📝 Commits (1)

  • ca07756 Improve docs and usability of EvaluatorBuilder

📊 Changes

3 files changed (+617 additions, -129 deletions)

View changed files

📝 pkl-core/src/main/java/org/pkl/core/EvaluatorBuilder.java (+515 -108)
📝 pkl-core/src/main/java/org/pkl/core/SecurityManagers.java (+15 -4)
📝 pkl-core/src/test/kotlin/org/pkl/core/EvaluatorBuilderTest.kt (+87 -17)

📄 Description

  • extend, update, and reword docs (inspired by pkl-lang.org and Project.pkl docs)
  • avoid duplication of docs by referring from add/get methods to set methods
  • add a few add/get/set methods to improve consistency and documentability
  • default to empty instead of null StackFrameTransformer to improve usability
  • do not change builder state in build()
  • require non-empty allowedModules
  • require null securityManager in setRootDir()
  • improve some error messages

🔄 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/197 **Author:** [@odenix](https://github.com/odenix) **Created:** 2/18/2024 **Status:** 🔄 Open **Base:** `main` ← **Head:** `eval-builder` --- ### 📝 Commits (1) - [`ca07756`](https://github.com/apple/pkl/commit/ca07756b78e230621a82d9fa17cf7165f8a1eaf3) Improve docs and usability of EvaluatorBuilder ### 📊 Changes **3 files changed** (+617 additions, -129 deletions) <details> <summary>View changed files</summary> 📝 `pkl-core/src/main/java/org/pkl/core/EvaluatorBuilder.java` (+515 -108) 📝 `pkl-core/src/main/java/org/pkl/core/SecurityManagers.java` (+15 -4) 📝 `pkl-core/src/test/kotlin/org/pkl/core/EvaluatorBuilderTest.kt` (+87 -17) </details> ### 📄 Description - extend, update, and reword docs (inspired by pkl-lang.org and Project.pkl docs) - avoid duplication of docs by referring from add/get methods to set methods - add a few add/get/set methods to improve consistency and documentability - default to empty instead of null StackFrameTransformer to improve usability - do not change builder state in build() - require non-empty allowedModules - require null securityManager in setRootDir() - improve some error messages --- <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:24:31 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#443