Kotlin DSL compilation errors after upgrade to 2023.05
We heavily use the Kotlin DSL for coding our build pipelines.
After updating from 2022.04 to 2023.05 we get lots of errors.
We followed the "Upgrading DSL" guide and use the latest version
https://www.jetbrains.com/help/teamcity/upgrading-dsl.html#Kotlin+DSL+API+version
Kotlin DSL compilation errors
Compilation error settings.kts[2:45]: Unresolved reference: triggers
Compilation error settings.kts[3:45]: Unresolved reference: buildSteps
Compilation error settings.kts[18:9]: Unresolved reference: script
Compilation error settings.kts[19:13]: 'var name: String' can't be called in this context by implicit receiver. Use the explicit one if necessary
Compilation error settings.kts[19:13]: 'fun `<set-name>`(`<set-?>`: String): Unit' can't be called in this context by implicit receiver. Use the explicit one if necessary
Compilation error settings.kts[20:13]: Unresolved reference: scriptContent
Compilation error settings.kts[32:9]: 'fun vcs(init: VcsSettings.() -> Unit): Unit' can't be called in this context by implicit receiver. Use the explicit one if necessary
Compilation error settings.kts[42:9]: Unresolved reference: script
Compilation error settings.kts[43:13]: 'var name: String' can't be called in this context by implicit receiver. Use the explicit one if necessary

Please sign in to leave a comment.
When I import the pom.xml as a maven project in my local IntelliJ, I get the same errors. It seems that many classes are missing in the configs-dsl-kotlin-latest-2023.05.jar
Or rather it looks like the configs-dsl-kotlin-plugins-latest is missing a lot of dependencies it used to have before.
Before (2022.10):
After (2023.05):
@Anatoly Cherenkov
Upload id: 2023_07_25_5LtNXVokUmssBnZ7QGvP1J
On-Premise, TeamCity Professional 2023.05.2 (build 129341)
Freshly regenerated, with the same problems.
(I mean TeamCity now can't generate working DSL because of missing dependencies, as of the release of 2023.05)
I use TeamCity docker on K8s, so the image tag - `jetbrains/teamcity-server:latest`
Linux AMD64/ARM64, no difference.
After contacting jetbrains support I was able to solve my problem by following this procedure:
plugins.propertiesandplugins-latest.propertiesfrom<TeamCity Data Directory>/system/caches/pluginsDslCache;Administration->Diagnostics->Cachesand resetpluginsDslCache(only this one).Then you need to wait for 10 minutes for recompilation of all plugins and try again.
Bastian Voigt, thanks!
For the history, just removing of plugins* doesn't help, but drop the whole
helps