mirror of
https://github.com/apple/pkl.git
synced 2026-01-13 15:13:38 +01:00
[PR #683] [MERGED] Add methods from List/Map to Listing/Mapping
#667
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/683
Author: @holzensp
Created: 10/14/2024
Status: ✅ Merged
Merged: 10/31/2024
Merged by: @holzensp
Base:
main← Head:cleanMappingListingParity📝 Commits (10+)
e5c927fAddvaluestoMapping66a8d38AddentriestoMappingd515cc7AddcontainsValuetoMapping541659dAddeverytoMapping239ea98AddanytoMapping90a68a5AddtoDynamictoMappinga069d05AddlastIndextoListingca8f0edAddgetOrNulltoListingaa0f67fAddfirsttoListingb90699aAddfirstOrNulltoListing📊 Changes
8 files changed (+503 additions, -11 deletions)
View changed files
📝
pkl-core/src/main/java/org/pkl/core/stdlib/base/ListingNodes.java(+144 -0)📝
pkl-core/src/main/java/org/pkl/core/stdlib/base/MappingNodes.java(+55 -0)📝
pkl-core/src/main/resources/org/pkl/core/errorMessages.properties(+6 -0)📝
pkl-core/src/test/files/LanguageSnippetTests/input/api/listing.pkl(+78 -0)📝
pkl-core/src/test/files/LanguageSnippetTests/input/api/mapping.pkl(+22 -3)📝
pkl-core/src/test/files/LanguageSnippetTests/output/api/listing.pcf(+63 -0)📝
pkl-core/src/test/files/LanguageSnippetTests/output/api/mapping.pcf(+16 -0)📝
stdlib/base.pkl(+119 -8)📄 Description
Methods that "project out" of the type can be added to
ListingandMappingto avoid having to usetoList()/toMap(). Methods that result in aListing, resp.Mapping, are not included for performance and (lazy) semantics reasons, but methods likecontainsetc. can be defined straightforwardly.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.