Closed deepy closed 1 year ago
I noticed that configuration cache does not work becaouse NodeVersionSource always changes. Is this the reason you reopened it?
May I suggest to skip the NodeVersionSource abstraction? Something like:
private fun configureNodeSetupTask(nodeExtension: NodeExtension) {
project.tasks.named<NodeSetupTask>(NodeSetupTask.NAME).configure {
val nodeArchiveDependencyProvider = variantComputer.computeNodeArchiveDependency(nodeExtension.version)
val archiveFileProvider = nodeArchiveDependencyProvider
.map { nodeArchiveDependency ->
resolveNodeArchiveFile(nodeArchiveDependency)
}
nodeArchiveFile.set(project.layout.file(archiveFileProvider))
}
}
I'll have a closer look tonight, but the problem is that on ARM devices we need to run a command (right now only uname
but for Mac it should be sysctl sysctl.proc_translated
)
And this needs to be done at configuration time as we need the platform specifics to declare a dependency
It always changing is going to be addressed in the next release, currently having lots of discussion on how to best evolve the setup
5.0.0 is out and this should now be properly fixed
With 8.1 it's no longer allowed to run commands during the configuration phase in the way we used to In 8.0 this was seemingly allowed and was properly picked up by the configuration-cache report