I saw <this post about type-safe project accessors...
# community-support
e
I saw this post about type-safe project accessors which says they cause an issue with Kotlin IC. Is there an issue tracking this (if there is any plan to address it at all)?
v
Tracking what? That his compile tasks are out of date sounds like he added some
doLast
or
doFirst
action to the compile tasks which would make those actions and thus the build-script classpath an input to the compile task. The rest is, what it is. If you want to use type-safe accessors, they have to be generated, if that changes, the buildscript classpath changes, I don't see what should be tracked or could be improved there. I though highly disagree with the general tonus and conclusion. In a large build where you constantly add and remove projects, it might be a good idea not to use them. In all normal projects I would always use them, as there the set of projects seldomly changes and so none of the post applies. 🤷‍♂️
m
The real issue is probably https://github.com/gradle/gradle/issues/31482 It's OK for the buildscript classpath to change and the build to be invalidated but that should NOT invalidate every unit of work in my build. It should be very fast (basically just recompiling the
.gradle.kts
files are rebuilding CC)
t
There is this issue, which reads differently but is essentially the same technically background.. https://github.com/gradle/gradle/issues/35180 Also there is this issue mentioning that post in specific. https://github.com/gradle/gradle/issues/34088 As someone supporting a large build I would very much agree with the tonus and conclusion... In a large project this causes performance issues and buildcache invalidation nightmares. And once you already have a few thousand project acessors its kind of hard to get rid of them..
1
v
As someone supporting a large build I would very much agree with the tonus and conclusion...
In a large project this causes performance issues and buildcache invalidation nightmares.
As I said, for big projects where additionally you constantly change the set of projects and thus the available accessors I agree with tonus and conclusion. But the blog post is absolutely against and concludes to never use them, and that is where I disagree, as in 98.7% of the builds out there this is not an issue. 🙂
m
me: that issue looks interesting... also me: oh yea I wrote it 😅
👌 2