We got ~140 more seconds on sbt reload when sbt-version-policy is added to our multi-project with 10 libraries under the root. The problem turned out to be that, the versionPolicyPreviousVersions setting is resolved at load time by searching the resolvers for previous versions of the project artifacts. It take ~14 seconds for each subproject. Typically we work on a single project at a time, that makes fetching previous versions for all the other projects a waste.
A potential optimization I'm thinking about is to make versionPolicyPreviousVersions a taskKey instead of settingKey, so the versions will be fetched only when actually needed. It would also need to make settingKeys depending on it taskKeys. I'm not familiar with this project to tell how much work there would be to do it. And is there anything else simpler could be done to improve?
Update:
Another issue I found is that it fails silently without trying sbt credentials for private repositories, so we waited a long time and got nothing.
We got ~140 more seconds on sbt reload when sbt-version-policy is added to our multi-project with 10 libraries under the root. The problem turned out to be that, the versionPolicyPreviousVersions setting is resolved at load time by searching the resolvers for previous versions of the project artifacts. It take ~14 seconds for each subproject. Typically we work on a single project at a time, that makes fetching previous versions for all the other projects a waste.
A potential optimization I'm thinking about is to make
versionPolicyPreviousVersionsa taskKey instead of settingKey, so the versions will be fetched only when actually needed. It would also need to make settingKeys depending on it taskKeys. I'm not familiar with this project to tell how much work there would be to do it. And is there anything else simpler could be done to improve?Update:
Another issue I found is that it fails silently without trying sbt credentials for private repositories, so we waited a long time and got nothing.