-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[question] Migration to 2.0 - SCM removal #13081
Comments
Thanks for your question.
Yes, it is expected. The new logic is more robust and consistent than the old one, that had several important flaws (like copying sources from user folders, outdated sources, after the package has been already created in the cache and uploaded). The changes were done to guarantee that the scm based builds are reproducible, clean and complete. It is indeed doing a git clone instead of a folder copy, it might have the inconvenience to be a bit slower (maybe it can be optimized with --depth=1 or something like that), but the "copying" approach was too problematic, so it is not expected to be possible. |
Hi @memsharded , Your explanation makes sense and I understand the benefits of cloning the repository again. Let me add reasons why I like the 1.x behavior.
At high-level, I understand this change, but I will miss the simplicity of a Conan 1.x approach, which does not lead to the issues described above. Thanks. |
Thanks for the explanation. However I'd like to understand a bit better the first point:
The git clone need to happen anyway at some point, with the legacy scm feature, because this clone is still happening whenever it is necessary to build from source, other than a Regarding 2, if that sequence is of value, and it could be useful for other users as well, then we could definitely make it built-in in |
Thanks @memsharded , You are absolutely right, that when the binary package is missing, a rebuild of a package will happen. But in my environment, it is not happening (At least not now). I am prebuilding the binary variants we need and storing them in my company's Artifactory. Regarding the shallow copy, this code words for me:
Feel free to use this code in Conan. Note: as described in stackowerflow link, it needs to have at least some minimum version of a git on server side. Therefore it might not work for everybody. |
Thanks for sharing! |
This is strange: #13096 only fails in Linux, but I can't find the reason. I keep getting:
Do you use that approach in Linux too? Have you seen this before? |
If I got it, it needs to be supported by git on Server side (Check this comment - https://stackoverflow.com/a/3489576) |
It is not even a server, it is a clone directly from a local folder. But yes, it is likely that the version and conf in Linux of git might be different. |
#13096 merged for 1.59 |
What is your question?
Hi,
I have a question about the removal of SCM. I was migrating my conanfiles to 2.0 using this guide: https://docs.conan.io/en/latest/migrating_to_2.0/recipes.html#the-scm-attribute
Overall it works fine, but there is one difference. When I have the repository already cloned with conanfile in it, the 1.x way using SMC copies this repository content to conan_cache/source_folder.
With the update to 2.0 source, I am getting a call to git clone, which was not happening with 1.x.
Is this expected? Is there a way to mimic the old behavior?
Thanks,
Michal
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: