question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[bug] build_id broken in 2.0-beta

See original GitHub issue

Environment Details (include every applicable attribute)

  • Operating System+version: Ubuntu 20.04 (docker)
  • Compiler+version: gcc9
  • Conan version: 2.0-beta2
  • Python version: 3.8.10

Steps to reproduce (Include if Applicable)

I have a use case where I want to create multiple versions of a package that takes a while to build. I use the build_id function so that I only have to build once. The different versions have different options and different dependencies (some of the options effect the requirements). Here is some code that worked just fine in conan 1.x

def build_id(self):
    # We don't want the option or the requirement to impact the build_id
    self.info_build.options.with_zeromq = "Any"
    if self.options.with_zeromq:
        self.info_build.requires.remove("zeromq")

In the 2.0-beta, the remove fails with a KeyError. I was able to trace the error to conans/model/dependencies.py::delitem.

def __delitem__(self, name):
        r = self.get(name)
        del self._data[r]

self.get returns a conans.model.info.RequirementInfo object and the self._data keys are conans.model.requires.Requirement objects. Thus the del self._data[r] command fails with a KeyError.

Logs (Executed commands with output) (Include/Attach if Applicable)

ERROR: test_package/1.0.0: Error in build_id() method, line 378 self.info_build.requires.remove(“zeromq”) KeyError: <conans.model.info.RequirementInfo object at 0x7f75b69d9ac0>

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jsallaycommented, Sep 5, 2022

Thanks. You guys are so responsive.

0reactions
czoidocommented, Sep 5, 2022

Closed by https://github.com/conan-io/conan/pull/12019 to be relased in beta3

Read more comments on GitHub >

github_iconTop Results From Across the Web

JDK-8112976 Mac: Assertion failed ... - Bug ID
With the following SDK build: [echo] Current SDK: Product: javafx-2.0beta ... [echo] Build-ID: 2011-05-31_19-32-58 I get the following assertion crash each ...
Read more >
release: v19.2.0-beta.20191014 · Issue #41353 · cockroachdb ...
Signed off on the kv50 failure. This test has never passed (as far back as teamcity has history) and it's a test scaffolding...
Read more >
[JDK-8111440] Effect, with Z-order enabled, breaks on ovelapping ...
Effect is broken when Z-order is enabled on scene with overlapping 3D transformed ... Attached is a simple test program to illustrate this...
Read more >
[JDK-8115809] Rectangle ignores style set via setStyle()
Product: javafx-2.0beta ... Build-ID: 2011-08-10_01-53-02 ... JDK-8113097 Region background images with percentage sizes are broken.
Read more >
Firefox:2.0beta2Tasks:FFTScheduleAndResults - MozillaWiki
Firefox 2.0 Beta 2 FFTs and Results ... Build ID: 2006082101; Version String: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1b2) ... Bugs...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found