Originally created by @Edward-Knight on GitHub (Feb 3, 2024).
In the Typed objects, properties and amending section, the TutorialPart.pkl has a name: String property, but in the next section (A new template) in the workshop2023.pkl example the agenda (which I assume is to be an agenda: Mapping<String, TutorialPart> from Workshop.pkl) uses title instead of name:
After following along with the tutorial, adding amends "Workshop.pkl" to the top of workshop2023.pkl resulted in the error:
–– Pkl Error ––
Cannot find property `title` in module `TutorialPart`.
43 | title = "Basic Configuration"
^^^^^
at workshop2023#agenda["beginners"] (file://.../workshop2023.pkl, line 43)
Available properties in module `TutorialPart`:
amountLearned
bandwidthRequirementPerSecond
duration
hasExercises
name
output
part
41 | agenda {
^^^^^^^^
at workshop2023#agenda (file://.../workshop2023.pkl, line 41)
106 | text = renderer.renderDocument(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at pkl.base#Module.output.text (https://github.com/apple/pkl/blob/0.25.1/stdlib/base.pkl#L106)
Originally created by @Edward-Knight on GitHub (Feb 3, 2024).
In the [Typed objects, properties and amending](https://pkl-lang.org/main/current/language-tutorial/03_writing_a_template.html#typed-objects-properties-and-amending) section, the `TutorialPart.pkl` has a `name: String` property, but in the next section ([A new template](https://pkl-lang.org/main/current/language-tutorial/03_writing_a_template.html#a-new-template)) in the `workshop2023.pkl` example the `agenda` (which I assume is to be an `agenda: Mapping<String, TutorialPart>` from `Workshop.pkl`) uses `title` instead of `name`:
https://github.com/apple/pkl/blob/15439095667dfe102934811e58ed677601b17deb/docs/modules/language-tutorial/pages/03_writing_a_template.adoc?plain=1#L189-L203
https://github.com/apple/pkl/blob/15439095667dfe102934811e58ed677601b17deb/docs/modules/language-tutorial/pages/03_writing_a_template.adoc?plain=1#L305-L310
After following along with the tutorial, adding `amends "Workshop.pkl"` to the top of `workshop2023.pkl` resulted in the error:
```
–– Pkl Error ––
Cannot find property `title` in module `TutorialPart`.
43 | title = "Basic Configuration"
^^^^^
at workshop2023#agenda["beginners"] (file://.../workshop2023.pkl, line 43)
Available properties in module `TutorialPart`:
amountLearned
bandwidthRequirementPerSecond
duration
hasExercises
name
output
part
41 | agenda {
^^^^^^^^
at workshop2023#agenda (file://.../workshop2023.pkl, line 41)
106 | text = renderer.renderDocument(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at pkl.base#Module.output.text (https://github.com/apple/pkl/blob/0.25.1/stdlib/base.pkl#L106)
```
diff --git a/docs/modules/language-tutorial/pages/03_writing_a_template.adoc b/docs/modules/language-tutorial/pages/03_writing_a_template.adoc
index cf7024c..2bce6c7 100644
--- a/docs/modules/language-tutorial/pages/03_writing_a_template.adoc
+++ b/docs/modules/language-tutorial/pages/03_writing_a_template.adoc
@@ -304,17 +304,17 @@ assistants {
agenda {
["beginners"] {
- title = "Basic Configuration"
+ name = "Basic Configuration"
part = 1
duration = 45.min
}
["intermediates"] {
- title = "Filling out a Template"
+ name = "Filling out a Template"
part = 2
duration = 45.min
}
["experts"] {
- title = "Writing a Template"
+ name = "Writing a Template"
part = 3
duration = 45.min
}
@Edward-Knight commented on GitHub (Feb 3, 2024):
I belive this patch should fix:
```diff
diff --git a/docs/modules/language-tutorial/pages/03_writing_a_template.adoc b/docs/modules/language-tutorial/pages/03_writing_a_template.adoc
index cf7024c..2bce6c7 100644
--- a/docs/modules/language-tutorial/pages/03_writing_a_template.adoc
+++ b/docs/modules/language-tutorial/pages/03_writing_a_template.adoc
@@ -304,17 +304,17 @@ assistants {
agenda {
["beginners"] {
- title = "Basic Configuration"
+ name = "Basic Configuration"
part = 1
duration = 45.min
}
["intermediates"] {
- title = "Filling out a Template"
+ name = "Filling out a Template"
part = 2
duration = 45.min
}
["experts"] {
- title = "Writing a Template"
+ name = "Writing a Template"
part = 3
duration = 45.min
}
```
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.
Originally created by @Edward-Knight on GitHub (Feb 3, 2024).
In the Typed objects, properties and amending section, the
TutorialPart.pklhas aname: Stringproperty, but in the next section (A new template) in theworkshop2023.pklexample theagenda(which I assume is to be anagenda: Mapping<String, TutorialPart>fromWorkshop.pkl) usestitleinstead ofname:https://github.com/apple/pkl/blob/15439095667dfe102934811e58ed677601b17deb/docs/modules/language-tutorial/pages/03_writing_a_template.adoc?plain=1#L189-L203
https://github.com/apple/pkl/blob/15439095667dfe102934811e58ed677601b17deb/docs/modules/language-tutorial/pages/03_writing_a_template.adoc?plain=1#L305-L310
After following along with the tutorial, adding
amends "Workshop.pkl"to the top ofworkshop2023.pklresulted in the error:@Edward-Knight commented on GitHub (Feb 3, 2024):
I belive this patch should fix:
@holzensp commented on GitHub (Feb 5, 2024):
Happy to take this as-is, but also happy for you to do this by PR and get proper contributor attribution.