[MAGNOLIA-7377] YAML module descriptor cannot handle version * Created: 12/Sep/18  Updated: 12/Sep/18  Resolved: 12/Sep/18

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Christoph Meier Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

5.7.2-SNAPSHOT , with UI branch "feature/content-types" plus content-types-1.0-SNAPSHOT


Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

In the dependencies section of the Magnolia module descriptor, one must specify the version of the dependent module. Several kind of wildcards are possible, see docs.

In the YAML based module descriptor, the Magnolia throws an error when the the version i specified as * - something which is possible in an XML based mod. desc. file.
Interestingly it works, if the version - * - is wrapped with quotes.

The sole star {*} should work, because: 

  • It works in the XML based version.
  • In YAML, value and "value" must be the same.

 


Example, which does not work:

dependencies:
  travel-demo-stories-app:
    version: *

 


Examples, which do work:

dependencies:
  travel-demo-stories-app:
    version: 1.0/*
dependencies:
  travel-demo-stories-app:
    version: "*"

 



 Comments   
Comment by Christopher Zimmermann [ 12/Sep/18 ]

"*" is a reserved character in YAML used as an "alias" to reference "anchors"
http://yaml.org/spec/1.2/spec.html#id2786196

Therefore it cannot be used at the front of a value.

(Handy blog post http://blogs.perl.org/users/tinita/2018/03/strings-in-yaml---to-quote-or-not-to-quote.html)

 

Closing as "wont fix".

Documentation of the module syntax should provide a tip that starting with a * should be in quotes.

 

 

Comment by Christoph Meier [ 12/Sep/18 ]

OK - sorry then.

It is mentioned in docs.

Generated at Mon Feb 12 04:23:14 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.