platform_build_blueprint/parser
Colin Cross 6d8780f724 Fix bugs related to local vs. inherited variables
The Go race detector found a race condition in the parser, which
 highlighted a few related bugs. A variable could be defined but
not referenced in a Blueprints file, then appended to in multiple
subdirs= Blueprints files.  The race detector caught the multiple
writes to assignment.Referenced from the parsers for the subdirs
Blueprints files, but multiple appends would be much more serious.

To fix this, keep local and inherited variables separate in the
Scope object and export that info to the parser.  Disallow
appending to non-local variables, which was already the intended
behavior.  Only update the referenced boolean for local variables.
Together, this should prevent all writes to Assignment objects
from parsers other than the one that created them.

Also improves the error handling code and some error messages.

Change-Id: Idb4f7d2e61bbe28d90b93074764e64e60d1eba8f
2015-08-03 16:08:16 -07:00
..
modify.go Add license headers and LICENSE file 2015-01-23 14:23:27 -08:00
parser.go Fix bugs related to local vs. inherited variables 2015-08-03 16:08:16 -07:00
parser_test.go Allow parsing Blueprints files without evaluating 2015-03-20 16:55:32 -07:00
printer.go Simplify printer whitespace and newline handling 2015-03-20 16:55:32 -07:00
printer_test.go Update import paths to include github 2015-03-21 01:03:36 -04:00
sort.go Add license headers and LICENSE file 2015-01-23 14:23:27 -08:00