Slackbot
02/07/2024, 2:20 AMadam
02/07/2024, 7:35 PMArrayList
or Provider<T>
it knows how to do this efficiently. For everything else, it will just serialize the value.Ryan Schmitt
02/08/2024, 6:27 PMRyan Schmitt
02/08/2024, 6:28 PMValueSource
is known to provide an input to configuration, doesn't that mean the value it yields must be serializable? Doesn't the CC entry have to be discarded if ValueSource::obtain
changes from the serialized value?adam
02/12/2024, 7:14 PMIs there some annotation I can use to make Gradle use the value as-is?There is not. We're not super keen on adding such a thing, as it's pretty error prone, but it's certainly an option. Do you have an example of a type you'd like to opt-in, where serialization is problem?
adam
02/12/2024, 7:15 PMdoesn't that mean the value it yields must be serializable?It depends what "serializable" means. It doesn't need to implement Java
Serializable
, but it will be serialized (ie turned into bytes) using the CC infrastructure.Ryan Schmitt
03/13/2024, 4:42 PMDo you have an example of a type you'd like to opt-in, where serialization is problem?@adam I have to integrate with a legacy build system that runs an external process to find, start (if necessary), and connect to a localhost daemon. This is proving quite difficult to do in a way that is compatible with configuration caching
Ryan Schmitt
03/13/2024, 4:59 PMValueSource
which initializes said field upon constructionMikhail Lopatkin
03/14/2024, 10:08 AMValueSource
because of the external process, right? Is this process/connection used at configuration time? I'm asking because this is sometimes a proxy for "start the process always regardless of which tasks are being invoked", and a better API can be designed for that use case.Ryan Schmitt
03/14/2024, 3:52 PM