Open
Description
The idea is to generate GeneratedList once and reuse it across targets. We can put outputs into separate directories with persistent naming schema, e.g.
meson-private/generator1
meson-generated/generator1
generator1@gen
We need to figure out how to create unique id for generator. I would consider SHA1 of arguments since generators do not have names and are not supposed to be addressed anyway.
One shortfall of this change is that people relying on foo@sta/some/generated/file.pb.h
via foo.private_dir_include()
will get their builds broken.
@textshell please comment if I missed anything.
IRC log for the record in case I missed something above. This can be removed after I rearrange this into full proposal format.
�18�<�textshell�18�>�� jpakkane: we could have generated file directories where we allow the users more explicit control over the layout that can be used (i.e. -I) in multiple targets.
�18�<�textshell�18�>�� i.e. have non private directories in the build directory. That might solve some trouble with flat builds also because those would not be about where .exe and .dll files land but explicitly places where specific directory layout requirements could be allowed.
�18�<�jpakkane�18�>�� We could also put them in meson-private/generator1, meson-private/generator2 etc. (obviously with a persistent naming scheme but anyway)
�18�<�textshell�18�>�� yes, something like that.
�18�<�jpakkane�18�>�� It could work.
�18�<�textshell�18�>�� I personally would not use meson-private. But i don't have strong reasons about that.
�18�<�jpakkane�18�>�� meson-generated or somesuch?
�18�<�textshell�18�>�� sounds better yes.
<textshell> but yes, this is mostly about where to put the generator output not the interface.
<sarum9in__> my point is that if we have only one generator output we can allow to reuse install generatedlist
<textshell> Yes, it would be possible to have that as a separate PR, if the code does not need significat changes with the later step of using a subdirectory of generated.
<textshell> meson-generated
<sarum9in__> so my plan would be a) we implement https://github.com/mesonbuild/meson/issues/3206#issue-303702121
<sarum9in__> a2) we implement protobuf module
<textshell> jeandet: that sounds right if the build directory is a subdirectory of the source dir. Of course only when test.zip is not a generated file.
<sarum9in__> b) independently we change generators to be shared
<sarum9in__> jpakkane, what do you think?