Added ini renderer and ini renderer test cases.
Changes that still need to be added are as follows:
a new in-language renderer
a new standard library module, as mentioned in this issue.
Ill create another pr later with these changes.
In IniUtils, the list of charecters that need to be escaped within the .ini file are in accourdance with INI file Wiki.
The IniRenderer is very similar to PropertiesRenderer due to .properties file having a similar style to an .ini file
🔄 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/149
**Author:** [@Madmegsox1](https://github.com/Madmegsox1)
**Created:** 2/14/2024
**Status:** 🔄 Open
**Base:** `main` ← **Head:** `main`
---
### 📝 Commits (3)
- [`4f48546`](https://github.com/apple/pkl/commit/4f48546fcb705992382a07e9d9f646a0d429c705) [Addition] Added IniRenderer and IniRenderer use cases #137
- [`9e8f5cc`](https://github.com/apple/pkl/commit/9e8f5cc5cf9f25d10bee2c54ed598efe942bbead) [Addition] Added In-Language ini renderer, Tests for ini renderer.
- [`9c91fd4`](https://github.com/apple/pkl/commit/9c91fd481ddba88a0e399cdadab98e89bfc758a9) Update pkl-core/src/main/java/org/pkl/core/IniRenderer.java
### 📊 Changes
**18 files changed** (+1233 additions, -1 deletions)
<details>
<summary>View changed files</summary>
➕ `pkl-core/src/main/java/org/pkl/core/IniRenderer.java` (+244 -0)
📝 `pkl-core/src/main/java/org/pkl/core/ValueRenderers.java` (+11 -0)
➕ `pkl-core/src/main/java/org/pkl/core/runtime/IniModule.java` (+30 -0)
📝 `pkl-core/src/main/java/org/pkl/core/runtime/ModuleCache.java` (+2 -0)
➕ `pkl-core/src/main/java/org/pkl/core/stdlib/ini/RendererNodes.java` (+409 -0)
➕ `pkl-core/src/main/java/org/pkl/core/util/ini/IniUtils.java` (+65 -0)
➕ `pkl-core/src/test/files/LanguageSnippetTests/input/api/iniRenderer1.ini.pkl` (+35 -0)
➕ `pkl-core/src/test/files/LanguageSnippetTests/input/api/iniRenderer2.ini.pkl` (+71 -0)
➕ `pkl-core/src/test/files/LanguageSnippetTests/output/api/iniRenderer1.ini` (+10 -0)
➕ `pkl-core/src/test/files/LanguageSnippetTests/output/api/iniRenderer1.ini.pcf` (+8 -0)
➕ `pkl-core/src/test/files/LanguageSnippetTests/output/api/iniRenderer2.ini` (+58 -0)
➕ `pkl-core/src/test/files/LanguageSnippetTests/output/api/iniRenderer2.ini.pcf` (+58 -0)
📝 `pkl-core/src/test/files/LanguageSnippetTests/output/errors/cannotFindStdLibModule.err` (+1 -0)
➕ `pkl-core/src/test/kotlin/org/pkl/core/IniRendererTest.kt` (+54 -0)
➕ `pkl-core/src/test/resources/org/pkl/core/iniRendererTest.ini` (+42 -0)
➕ `pkl-core/src/test/resources/org/pkl/core/iniRendererTest.pkl` (+66 -0)
📝 `stdlib/base.pkl` (+3 -1)
➕ `stdlib/ini.pkl` (+66 -0)
</details>
### 📄 Description
Added ini renderer and ini renderer test cases.
Changes that still need to be added are as follows:
- a new in-language renderer
- a new standard library module, as mentioned in [this issue](https://github.com/apple/pkl/issues/137#issuecomment-1942946804).
Ill create another pr later with these changes.
In `IniUtils`, the list of charecters that need to be escaped within the .ini file are in accourdance with [INI file Wiki](https://en.wikipedia.org/wiki/INI_file#Escape_characters).
The `IniRenderer` is very similar to [ PropertiesRenderer](https://github.com/apple/pkl/blob/main/pkl-core/src/main/java/org/pkl/core/PropertiesRenderer.java) due to .properties file having a similar style to an .ini file
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/149
Author: @Madmegsox1
Created: 2/14/2024
Status: 🔄 Open
Base:
main← Head:main📝 Commits (3)
4f48546[Addition] Added IniRenderer and IniRenderer use cases #1379e8f5cc[Addition] Added In-Language ini renderer, Tests for ini renderer.9c91fd4Update pkl-core/src/main/java/org/pkl/core/IniRenderer.java📊 Changes
18 files changed (+1233 additions, -1 deletions)
View changed files
➕
pkl-core/src/main/java/org/pkl/core/IniRenderer.java(+244 -0)📝
pkl-core/src/main/java/org/pkl/core/ValueRenderers.java(+11 -0)➕
pkl-core/src/main/java/org/pkl/core/runtime/IniModule.java(+30 -0)📝
pkl-core/src/main/java/org/pkl/core/runtime/ModuleCache.java(+2 -0)➕
pkl-core/src/main/java/org/pkl/core/stdlib/ini/RendererNodes.java(+409 -0)➕
pkl-core/src/main/java/org/pkl/core/util/ini/IniUtils.java(+65 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/input/api/iniRenderer1.ini.pkl(+35 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/input/api/iniRenderer2.ini.pkl(+71 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/output/api/iniRenderer1.ini(+10 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/output/api/iniRenderer1.ini.pcf(+8 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/output/api/iniRenderer2.ini(+58 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/output/api/iniRenderer2.ini.pcf(+58 -0)📝
pkl-core/src/test/files/LanguageSnippetTests/output/errors/cannotFindStdLibModule.err(+1 -0)➕
pkl-core/src/test/kotlin/org/pkl/core/IniRendererTest.kt(+54 -0)➕
pkl-core/src/test/resources/org/pkl/core/iniRendererTest.ini(+42 -0)➕
pkl-core/src/test/resources/org/pkl/core/iniRendererTest.pkl(+66 -0)📝
stdlib/base.pkl(+3 -1)➕
stdlib/ini.pkl(+66 -0)📄 Description
Added ini renderer and ini renderer test cases.
Changes that still need to be added are as follows:
Ill create another pr later with these changes.
In
IniUtils, the list of charecters that need to be escaped within the .ini file are in accourdance with INI file Wiki.The
IniRendereris very similar to PropertiesRenderer due to .properties file having a similar style to an .ini file🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.