[PR #413] [MERGED] Fix the sequence length in the YAML parser #540

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

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/413
Author: @luuvish
Created: 4/9/2024
Status: Merged
Merged: 4/10/2024
Merged by: @holzensp

Base: mainHead: main


📝 Commits (2)

  • 5559ab1 Fix the sequence length in the YAML parser
  • 5574d72 Update expected test outcome

📊 Changes

2 files changed (+24 additions, -7 deletions)

View changed files

📝 pkl-core/src/main/java/org/pkl/core/stdlib/yaml/ParserNodes.java (+8 -5)
📝 pkl-core/src/test/files/LanguageSnippetTests/output/api/yamlParser3.pcf (+16 -2)

📄 Description

The initialSize in EconomicsMaps.create() is not the actual stored size, hence the accurate size is not determined until ObjectMembers are added after addMembers() called.

Since the size set during the creation of VmListing cannot be changed afterwards, the size of node.getValue() is used instead of members' size.


🔄 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/413 **Author:** [@luuvish](https://github.com/luuvish) **Created:** 4/9/2024 **Status:** ✅ Merged **Merged:** 4/10/2024 **Merged by:** [@holzensp](https://github.com/holzensp) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`5559ab1`](https://github.com/apple/pkl/commit/5559ab167d464e0eebf0142a1dec104cb1410e99) Fix the sequence length in the YAML parser - [`5574d72`](https://github.com/apple/pkl/commit/5574d72eb81765dbc55c472280160c53a326a7e2) Update expected test outcome ### 📊 Changes **2 files changed** (+24 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `pkl-core/src/main/java/org/pkl/core/stdlib/yaml/ParserNodes.java` (+8 -5) 📝 `pkl-core/src/test/files/LanguageSnippetTests/output/api/yamlParser3.pcf` (+16 -2) </details> ### 📄 Description The initialSize in EconomicsMaps.create() is not the actual stored size, hence the accurate size is not determined until ObjectMembers are added after addMembers() called. Since the size set during the creation of VmListing cannot be changed afterwards, the size of node.getValue() is used instead of members' size. --- <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:13 +01:00
adam closed this issue 2025-12-30 01:25:13 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#540