This PR defines pkl:AbstractSettings as a common parent module for pkl:settings and pkl:Project.
Since user-level evaluator settings should be limited to user/machine specific ones (to avoid unnecessary "works on my machine"), whereas PklProjects might want to set more detailed settings.
There isn't an overwhelming win from making pkl:AbstractSettings a super-module, other than evaluatorSettings (and possibly other properties in the future) being defined in all children by default. Alternatively, pkl:AbstractSettings could define all classes that might be used somewhere, and it just being imported, i.e.
🔄 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/493
**Author:** [@holzensp](https://github.com/holzensp)
**Created:** 5/15/2024
**Status:** ❌ Closed
**Base:** `main` ← **Head:** `settings`
---
### 📝 Commits (1)
- [`6d44260`](https://github.com/apple/pkl/commit/6d4426088b58bb91b001c4a49e77e0e1aafa8804) Add abstract base module for settings
### 📊 Changes
**7 files changed** (+104 additions, -10 deletions)
<details>
<summary>View changed files</summary>
➕ `pkl-core/src/test/files/LanguageSnippetTests/input/stdlib/settings.pkl` (+25 -0)
📝 `pkl-core/src/test/files/LanguageSnippetTests/output/errors/cannotFindStdLibModule.err` (+1 -0)
📝 `pkl-core/src/test/files/LanguageSnippetTests/output/projects/badProjectDeps4/bug.err` (+2 -2)
➕ `pkl-core/src/test/files/LanguageSnippetTests/output/stdlib/settings.pcf` (+6 -0)
➕ `stdlib/AbstractSettings.pkl` (+58 -0)
📝 `stdlib/Project.pkl` (+3 -1)
📝 `stdlib/settings.pkl` (+9 -7)
</details>
### 📄 Description
This PR defines `pkl:AbstractSettings` as a common parent module for `pkl:settings` and `pkl:Project`.
Since user-level evaluator settings should be limited to user/machine specific ones (to avoid unnecessary "works on my machine"), whereas `PklProject`s might want to set more detailed settings.
There isn't an overwhelming win from making `pkl:AbstractSettings` a super-module, other than `evaluatorSettings` (and possibly other properties in the future) being defined in all children by default. Alternatively, `pkl:AbstractSettings` could define all `class`es that might be used somewhere, and it just being `import`ed, i.e.
`settings.pkl`:
```
module pkl.settings
import "pkl:AbstractSettings"
proxy: AbstractSettings.Proxy
//...
```
`Project.pkl`:
```
module pkl.Project
import "pkl:AbstractSettings"
evaluatorSettings: AbstractSettings.Evaluator
//...
```
---
<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/493
Author: @holzensp
Created: 5/15/2024
Status: ❌ Closed
Base:
main← Head:settings📝 Commits (1)
6d44260Add abstract base module for settings📊 Changes
7 files changed (+104 additions, -10 deletions)
View changed files
➕
pkl-core/src/test/files/LanguageSnippetTests/input/stdlib/settings.pkl(+25 -0)📝
pkl-core/src/test/files/LanguageSnippetTests/output/errors/cannotFindStdLibModule.err(+1 -0)📝
pkl-core/src/test/files/LanguageSnippetTests/output/projects/badProjectDeps4/bug.err(+2 -2)➕
pkl-core/src/test/files/LanguageSnippetTests/output/stdlib/settings.pcf(+6 -0)➕
stdlib/AbstractSettings.pkl(+58 -0)📝
stdlib/Project.pkl(+3 -1)📝
stdlib/settings.pkl(+9 -7)📄 Description
This PR defines
pkl:AbstractSettingsas a common parent module forpkl:settingsandpkl:Project.Since user-level evaluator settings should be limited to user/machine specific ones (to avoid unnecessary "works on my machine"), whereas
PklProjects might want to set more detailed settings.There isn't an overwhelming win from making
pkl:AbstractSettingsa super-module, other thanevaluatorSettings(and possibly other properties in the future) being defined in all children by default. Alternatively,pkl:AbstractSettingscould define allclasses that might be used somewhere, and it just beingimported, i.e.settings.pkl:Project.pkl:🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.