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

[feature] Skip unchanged files in conan.tools.files.copy #16027

Closed
1 task done
Nekto89 opened this issue Apr 5, 2024 · 2 comments · Fixed by #16031
Closed
1 task done

[feature] Skip unchanged files in conan.tools.files.copy #16027

Nekto89 opened this issue Apr 5, 2024 · 2 comments · Fixed by #16031
Assignees
Milestone

Comments

@Nekto89
Copy link
Contributor

Nekto89 commented Apr 5, 2024

What is your suggestion?

Hi. I would like to not overwrite files that haven't been changed during call to conan.tools.files.copy. Maybe some optional parameter that would lead to skipping files that have the same timestamp and size? This will lead to less disk operations and will allow to not close applications that are currently using dlls in target folder.

That's how I currently use this method:

def generate(self):
        cmake_deps = CMakeDeps(self)
        cmake_deps.configuration = "Release"
        cmake_deps.generate()
        for dep in self.dependencies.values():
            if len(dep.cpp_info.bindirs):
                copy(self, "*.dll", dep.cpp_info.bindirs[0], r"C:/dev/bld/Binaries/Release")

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@memsharded memsharded self-assigned this Apr 5, 2024
@memsharded
Copy link
Member

Hi @Nekto89

Thanks for the suggestion. We indeed wanted to add some optimization to the copy() method, not sure if opt-in or opt-out, based on: #15148, but that was for Conan 1.X, we want this to go to Conan 2.

@memsharded
Copy link
Member

#16031 was merged, so this will be in Conan 2.3

@memsharded memsharded added this to the 2.3.0 milestone Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants