Ok^^, well i don't want to speculate too much about hypothetical use-cases. We do use signatures that are input for the generator, so in our case we should specify those classes as dependencies.
If empty dependencies with aggregate=false is not a valid KSP configuration, getting a warning would be good i guess, maybe even a hard error in future releases.
Originally posted by @Jan-Thes in #2854
It's a helpful to emit a warning when Dependencies contains zero files and has aggregating = false. This means that the generated file depends only on the empty set of output files. However, if that is really the case, then it might as well just be a source file in project instead of being generated. The reasoning in terms of incremental compilation is as follows:
- Either the generated output file should be regenerated when any file changes, in which case it should be configured with
aggregating = true.
- Or it should only be generated once and included in all builds.
- Assume that the file really does not depend on the codebase. In this case, generating it is a one-time procedure and it can be included in the project as is.
- Assume that the generated output file does in fact depend on at least one source file in the project. In this case, it should reference that same source file in the
Dependencies object. However, that contradicts that it has no dependencies, i.e., that the list is of length zero (it is strictly greater).
Originally posted by @Jan-Thes in #2854
It's a helpful to emit a warning when
Dependenciescontains zero files and hasaggregating = false. This means that the generated file depends only on the empty set of output files. However, if that is really the case, then it might as well just be a source file in project instead of being generated. The reasoning in terms of incremental compilation is as follows:aggregating = true.Dependenciesobject. However, that contradicts that it has no dependencies, i.e., that the list is of length zero (it is strictly greater).