andrzej-kaczmarek opened a new pull request #201: Allow setting value to 
reference other setting
URL: https://github.com/apache/mynewt-newt/pull/201
 
 
   Currently the only way to have one setting copy value from other setting is 
to do as follows:
   ```
   syscfg.vals:
       FOO: 'MYNEWT_VAL_BAR'
   ```
   The problem with the above is that `newt` handles value of `FOO` as a string 
which is then resolved by preprocessor during build so this won't evaluate 
properly if used inside `syscfg.restrictions`
   
   This PR allows one setting value to explicitly reference other setting and 
have other value copied by `newt`. The syntax is very simple:
   ```
   syscfg.vals:
       FOO: '@BAR'
   ````
   
   For now it does not support recursive references and there's no nice way to 
escape `@` if an actual value should start with `@` (perhaps prepending  `@` 
with space would work as a workaround...) but I think we can live with it until 
I can figure out how to do this in Go ;-)

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to