You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/01/23 00:12:00 UTC

[GitHub] ccollins476ad commented on issue #260: [RFC] `$import` directive

ccollins476ad commented on issue #260: [RFC] `$import` directive
URL: https://github.com/apache/mynewt-newt/pull/260#issuecomment-456615255
 
 
   Thanks @utzig, that is a good question.  I didn't explain it well, but these `$` keywords apply equally to all YAML files, whereas maps like `pkg.cflags` or `syscfg.defs` are specific to the file type.  The process goes something like this:
   
   ```
   For each YAML file f:
       Process all keywords
       Construct a tree from the non-keyword content of the file
   ```
   
   So, keywords are processed while the tree is being constructed.  Only after the tree has been constructed can non-keyword entries be processed.
   
   We could remove the `$` and still get the same functionality, but then we wouldn't be able to warn about unrecognized keywords.  Alternatively, the tree construction process could just "know" all the valid top-level strings, and warn about everything it doesn't recognize.  But I think this blurs the phases of transformation that newt uses to read the project, and would add some messiness to the code.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services