-
Notifications
You must be signed in to change notification settings - Fork 359
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
[bug] the “exported” files are not copied to the self.source_folder before calling the source() method #3667
Comments
Thanks for your report.
The problem is that we often refer as "exported" files to the "exported source" files. Note: it is indeed possible that it was behaving this way in Conan 1.X, but mostly as a undesired behavior that wasn't fixed back then because of the risk of breaking. Conan 2 fixed that. |
Thanks @memsharded for your quick answer! Indeed, as your suggestion, replacing
In my use case, the FYI, I checked on the
It seems to work for them because they use the So maybe, as you suggest, the doc might benefit some clarification for the exports attribute, where it seems to me the only real use case is to define some python module (like |
Great, happy to hear that.
Sounds good. I think that if you needed for both, you can both
I see in https://docs.conan.io/2/reference/conanfile/methods/source.html#source, the comment: I also think that those recipes could benefit and be simplified by allowing them to use the built-in Moving this ticket to the docs repo for clarifications there. Thanks for your feedback again! |
Describe the bug
According to the latest conan documentation (v 2.2) https://docs.conan.io/2.2/reference/conanfile/methods/source.html:
But the exported files (in the
exports
attribute) don't seem to be copied in the source folder before thesource()
method is called.How to reproduce it
Conan version: 2.2.2
Python version: 3.8.10
OS: Ubuntu 20
In an empty directory:
conanfile.py
:foo.repos
(can be anything):Calling:
conan create . --version 0.0.0
gives an error that the
foo.repos
does not exist:Indeed, the file
foo.repos
is correctly exported in the export folder, but the source folders/
is empty:And weirdly the
self.export_folder
isNone
and theself.recipe_folder
is the folder where the files are exported (/home/nathan/.conan2/p/bug_re7a009f232436/e
)Note: I tested the same example with
conan==1.63.0
usingconan create . bug_report/0.0.0@
and it works correctly (i.e. the source folder contains thefoo.repos
file)The text was updated successfully, but these errors were encountered: