Commit graph

6 commits

Author SHA1 Message Date
Sasha Smundak
6bc132aff9 Check missing uncoditionally loaded missing modules at runtime
A potentially inherited (via dynamically calculated path) module may in turn
unconditionally load a module that does no exist in a source tree -- it is
not an error if this potentially inherited module is actually never inherited
because its dynamically calculated path will never reference it. Instead of
emitting an uncoditional `load` for a non-existent file (which is going to fail
in the Starlark parser), emit conditional load and a runtime check.

Fixes: 213922819
Test: internal
Change-Id: I92177878e199a1f00e5f0c4045c0c0daeddd6bdb
2022-01-10 19:58:14 -08:00
Cole Faust
7321b0985e Improve error message when a required makefile can't be found
Bug: 193566316
Test: go test
Change-Id: I41a28808c95df76f212980ef1e59047312fe587b
2021-12-21 16:11:16 -08:00
Sasha Smundak
422b614355 Generate runtime conversion diagnostics
Instead of inserting a comment with error description into the generated code,
generate a call to a function that will print out a conversion error when executed.
Do not print generic "partially converted" message anymore.
Remove --verbose and --no_warnings options.

Bug: 204062171
Test: internal
Change-Id: Ib126e16dc76f49635e4939e670922f2561781049
2021-11-18 10:01:37 -08:00
Sasha Smundak
868c5e3ab2 Emit unconditional module load only when inherit/include is on the top level.
That is, when a makefile contains
```
ifneq (,$(foo))
  $(call inherit-product,module.mk)
endif
```

module.mk has to be present only if `foo` is set.

Fixes: 200163602
Test: internal
Change-Id: Ic5f10ce8d49d6b87162bfe77922bba5e2cce228b
2021-09-27 10:02:41 -07:00
Sasha Smundak
6609ba7664 Allow dynamically calculated inherit-product path
Bug: 193566316
Test: internal
Change-Id: Iaa7b68cf459f9a694ae9d37a32c9372cf8a8335a
2021-08-02 14:35:45 -07:00
Sasha Smundak
b051c4ede3 Product config makefiles to Starlark converter
Test: treehugger; internal tests in mk2rbc_test.go
Bug: 172923994
Change-Id: I43120b9c181ef2b8d9453e743233811b0fec268b
2021-07-14 09:51:10 -07:00