Conversation
memsharded
left a comment
There was a problem hiding this comment.
Hi @cqc-alec
Thanks very much for your contribution.
I'd prefer to start it with a unit test (integration folder, most likely) that can reproduce the bug, in this way we make sure that we cover that scenario for the future, because clearly there is a gap there.
Then, it sounds that the fix might happen earlier in the chain, but that we can discuss when we have the repro test. Do you think you could do it? If not, please detail a bit more the steps to reproduce, so we can contribute it. Thanks!
|
Thank you @memsharded , I agree a unit test would be good! I am having a bit of difficulty making a minimal test case (it shows up with a rather complex project). Something like this should do it: conan new cmake_lib -d name=basic -d version=1.0
conan install .
conan build .
conan export-pkg .Except that when the last command reaches So I'm now starting to wonder if the real bug is somewhere else. This is where the problem actually arose: https://github.com/CQCL/tket/blob/1efc10c391c5ce5d68cccd4bcec6038ba6ef4080/.github/workflows/build_and_test.yml#L197 (It's not Windows-specific; I can reproduce it locally on Linux with this project.) |
|
I have managed to reproduce, but with kind of a very edge case, this is the test: def test_remote_none():
# https://github.com/conan-io/conan/pull/14705
c = TestClient(default_server_user=True)
c.save({"dep/conanfile.py": GenConanfile("dep", "0.1"),
"pkg/conanfile.py": GenConanfile("pkg", "0.1"),
"pkg/test_package/conanfile.py": GenConanfile().with_test("pass").with_requires("dep/0.1")})
c.run("create dep")
c.run("upload dep* -r=default -c")
c.run("install pkg")
c.run("build pkg")
c.run("remove dep*:* -c")
c.run("export-pkg pkg") # This crashes
print(c.out)This means that:
Could you please verify this is the issue in your project? Thanks! |
|
@memsharded Good that you've reproduced it! My case does seem slightly different, however, in that the I think you should be able to reproduce the issue if you do the following: git checkout git@github.com:CQCL/tket.git
cd tket
conan profile detect
conan remote add tket-libs https://quantinuumsw.jfrog.io/artifactory/api/conan/tket1-libs --index 0
conan install tket -o boost/*:header_only=True
conan build tket -o boost/*:header_only=True
conan export-pkg tket -o boost/*:header_only=True(It does take a while to build; sorry about that.) |
|
(But in the end, if you have a test that shows the issue, and the fix fixes my issue, maybe that is enough. ;-) ) |
|
Quick feedback: In Conan 2.0 you don't need Thanks very much for the feedback! |
|
Brilliant, thanks very much! |
|
Closed by #14712 This change will be released in the next Conan v2.0.11 version. |
Changelog: (Bugfix): Handle the case where
remotesisNoneinevaluate_graph()This fixes a regression in conan 2.0.10, introduced in #14467 .
The
remotesargument toevaluate_graph()may beNone, as is shown by the following stack trace from aconan export-pkgcommand:The above-mentioned PR removed handling of that case.