Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blog post demonstrating using file position in template definitions #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

holzensp
Copy link
Contributor

@holzensp holzensp commented Dec 16, 2024

No description provided.

Copy link
Contributor

@stackoverflow stackoverflow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I miss having a simple example with 1 app, 1 env, 1 cluster, to get get a better feeling of what such config would look like.

Comment on lines +101 to +106
It only introduces one "new" concept and that is the concept of a "root" node.
For `AppEnvCluster.pkl`, the root node is the one _amending the `AppEnvCluster.pkl` module from the `appEnvCluster` package_.
The function `findRootModule` finds this, by taking the reflection of `module`, and following the amends-chain, until it finds a module, whose `supermodule` does not `amends` anything.
When it finds that, it reflects back (`mod.reflectee`) to return the `Module` object.
In `pkl:base`, `Module` is defined with a method `relativePath`, which returns the path of `module` relative to `this` module.
The path is represented as a `List`, with one `String` per _directory_ -- no file name at the end.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's necessary to go that deep in the how AppEnvCluster finds all the pertinent modules, down to the algorithm. A more generic explanation should suffice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants