Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration-cache broken with 8.1 on ARM devices Mac + Linux #271

Closed
deepy opened this issue Apr 23, 2023 · 4 comments · Fixed by #272
Closed

Configuration-cache broken with 8.1 on ARM devices Mac + Linux #271

deepy opened this issue Apr 23, 2023 · 4 comments · Fixed by #272
Milestone

Comments

@deepy
Copy link
Member

deepy commented Apr 23, 2023

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

@deepy deepy added this to the 4.0 milestone Apr 23, 2023
@deepy deepy reopened this May 2, 2023
@cocorossello
Copy link

cocorossello commented May 4, 2023

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))
        }
    }

@deepy deepy changed the title Configuration-cache broken with 8.1 on ARM Macs Configuration-cache broken with 8.1 on ARM devices Mac + Linux May 5, 2023
@deepy
Copy link
Member Author

deepy commented May 5, 2023

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

And running external processes during configuration has limitations when the configuration cache is enabled

@deepy
Copy link
Member Author

deepy commented May 9, 2023

It always changing is going to be addressed in the next release, currently having lots of discussion on how to best evolve the setup

@deepy deepy closed this as completed in 3ea8a87 May 12, 2023
@deepy
Copy link
Member Author

deepy commented May 15, 2023

5.0.0 is out and this should now be properly fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants