[native_toolchain_c] Changes to header files should be added to the dependencies #1332
Labels
contributions-welcome
Contributions welcome to help resolve this (the resolution is expected to be clear from the issue)
good first issue
A good starting issue for contributors (issues with this label will appear in /contribute)
package:native_toolchain_c
The CBuilder lists the C sources, but not the header files.
native/pkgs/native_assets_cli/example/build/native_add_library/hook/build.dart
Lines 12 to 19 in 952da66
This means the headers are not added to the dependencies. Which means that any changes to the header files do not cause cache invalidation.
Thanks for the feedback @SaltySpaghetti!
Possible solutions:
.h
files to sources, which will add them to the compiler invocation (which is fine for clang-like compiler)..h
files out.includes
(ty @blaugold!)List<String> headers
parameter/field. Which would only resolve the list of paths and add it to theBuildOutput
dependencies.List<String> dependencies
parameter/field.headers
.I'm leaning towards option 1.
A PR would contain:
sources:
sources
that it should include header files..h
files in the compiler invocation.The text was updated successfully, but these errors were encountered: