-
Notifications
You must be signed in to change notification settings - Fork 989
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
Conan install won't call build if a previous one with same build_id failed. #2879
Comments
Hi @NokiDev ! Thanks for your report. I have been playing with it, changing a few things, as-is is not reproducible, so I have used a "Hello" dependency generated with It seems it works as intended here, and the second time the build() is not called at all. If you could please try to put something that is fully reproducible, that could help (like a full github repo, or some recipe and the previous steps to be able to make it work). Also your default_options is wrong, it should be Please try to provide something reproducible and we will try to help. Thanks! |
Hi @memsharded ! I created a git repo (Here : https://github.com/NokiDev/conan_build_skipped), to highlight the issue. Thanks for your time, and have a nice day. |
Hi @memsharded, After a little of investigation, the error seems to be due to this if statement in installer.py > prepare_build() if self.build_reference != self._package_reference and \
os.path.exists(self.build_folder) and hasattr(self._conan_file, "build_id"):
self.skip_build=True
return As the build folder is not removed uppon an error, (and we're using build_id () ) it leads to a skip build. We should try to remove it, in the try / except statement in installer.py > _build_package() if the build failed or keep track of the state of the build in a file. EDIT : Nop, forget what I was saying it's not there. I'm not familiar enough with conan source code, I suppose. I'll keep searching. |
Hi @memsharded, @lasote I' updated my repository higlighting the unwanted behaviour. As a Reminder, the problem was : Leading to an empty package, and no further builds. Tell me if you need something else |
Hi @NokiDev Sorry for that. I have assigned the issue for next 1.9, I'll try to have a look at it for next release. Thanks for reporting and following up. |
I am having a look at this for 1.9. Able to reproduce it, but a note about your code: It is NOT enough to I have been able to reproduce, even raising exceptions, investigating possible fixes. |
Okay, Glad you be able to reproduce it ! I didn't checked if it produces this kind of issue with package_id method, but it could be great to check it as well. |
Hi, I'm running into a weird behaviour with Conan.
When installing a project to my local cache, that had failed during a previous install (with same recipe), Conan won't call the build method and calls the package method directly, even with --build MyProject .
The workaround is to manually remove the build folder and re run conan install.
I want to know if it's a normal behavior and if there is a way to bypass it.
I appologize if there is already an issue, for the same thing I clearly didn't take enough time to check every issues, and if there is one I'll be glad to know where.
Thank you.
Configuration
Conanfile
How to reproduce
Run :
Then
The build failed.
Retry to install to local cache
The build method is skipped, conan calls package method directly.
Here we expect the build method to be called again as with a recipe without build_id method.
The text was updated successfully, but these errors were encountered: