[YAMLEXT-2] Normalization of the Syntax Created: 07/Jul/16 Updated: 26/Jun/19 Resolved: 26/Jun/19 |
|
| Status: | Closed |
| Project: | Yaml extensions (closed) |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | Matthias Müller | Assignee: | Aleksandr Pchelintcev |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | improvement | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Documentation update required: |
Yes
|
| Date of First Response: |
| Description |
|
The current Syntax is 'extend' (no 's') followed by a double point and no white-space. To normalize the syntax of this module with the jcr extends and the current yaml include mechanism, I suggest changing the Syntax from !extend:/path/to/file.yaml to !extends /path/to/file.yaml |
| Comments |
| Comment by Aleksandr Pchelintcev [ 07/Jul/16 ] |
|
Hi Matthias, thanks for a suggestion! Whether there should be an s at the end of the word is indeed a question - most likely in the next version I'll add the support for both variants. However, the colon (:) cannot be replaced with a whitespace at this time since the YAML syntax restrictions. With my variant without spaces it is possible to annotate the mapping and sequence YAML nodes without breaking the validity of syntax. If there'd be a whitespace then the line containing a space would be always considered a scalar node with a tag and the following YAML might get screwed up. However, there might be a way out with a little bit of pre-processing. I'll consider that, stay tuned! |
| Comment by Matthias Müller [ 07/Jul/16 ] |
|
Hi Aleksandr, thx for your rapid response. I'm completely indifferent about colon vs white-space, it should be the same for include and extend(s) though. An (unimportant) notice: Currently the syntax highlighting doesn't work for both variants (as it expects a colon followed by a whitespace). |
| Comment by Christopher Zimmermann [ 27/Sep/16 ] |
|
True - the current !include syntax does not require a colon : # an include within a list, here adding a field - !include /documentation-examples-templates/dialogs/common/categorization-field.yaml # an include within a map, here adding a tab actions: !include /documentation-examples-templates/dialogs/common/actions-block.yaml I agree that the syntax should be normalized. Its worth discussing if we change the !include syntax to require a colon instead of the proposed change. |
| Comment by Christopher Zimmermann [ 27/Sep/16 ] |
|
I recommend that we support extends with an s. |
| Comment by Daniel Kasmeroglu [ 20/Dec/17 ] |