Giter VIP home page Giter VIP logo

conan2-missing-override-bug's Introduction

Introduction

This Repo demonstrates a bug found in conan version 2.0.3. The bug is caused by an override statement in a downstream package to a dependency which is never required as a real dependency in the result graph.

The follwing diagram illustrates the dependency graph:

graph

Reproduction

In order to reproduce the bug, you need to build all three packages in the following order: 1. liba 2. libb 3. libc

using conan create .. Make sure you have conan 2.0.3 installed. The issue might exists in older versions as well but it was not tested.

During the build of libc you shoud receive the following error message:

Traceback (most recent call last):
  File "/home/sin7hi/miniconda3/envs/conan2/lib/python3.10/site-packages/conan/cli/cli.py", line 272, in main
    cli.run(args)
  File "/home/sin7hi/miniconda3/envs/conan2/lib/python3.10/site-packages/conan/cli/cli.py", line 171, in run
    command.run(self._conan_api, self._commands[command_argument].parser, args[0][1:])
  File "/home/sin7hi/miniconda3/envs/conan2/lib/python3.10/site-packages/conan/cli/command.py", line 157, in run
    info = self._method(conan_api, parser, *args)
  File "/home/sin7hi/miniconda3/envs/conan2/lib/python3.10/site-packages/conan/cli/commands/create.py", line 69, in create
    deps_graph = conan_api.graph.load_graph_requires(requires, tool_requires,
  File "/home/sin7hi/miniconda3/envs/conan2/lib/python3.10/site-packages/conan/api/subapi/graph.py", line 123, in load_graph_requires
    deps_graph = self.load_graph(root_node, profile_host=profile_host,
  File "/home/sin7hi/miniconda3/envs/conan2/lib/python3.10/site-packages/conan/api/subapi/graph.py", line 172, in load_graph
    deps_graph = builder.load_graph(root_node, profile_host, profile_build, lockfile)
  File "/home/sin7hi/miniconda3/envs/conan2/lib/python3.10/site-packages/conans/client/graph/graph_builder.py", line 53, in load_graph
    new_node = self._expand_require(require, node, dep_graph, profile_host,
  File "/home/sin7hi/miniconda3/envs/conan2/lib/python3.10/site-packages/conans/client/graph/graph_builder.py", line 100, in _expand_require
    node.propagate_closing_loop(require, prev_node)
  File "/home/sin7hi/miniconda3/envs/conan2/lib/python3.10/site-packages/conans/client/graph/graph.py", line 82, in propagate_closing_loop
    prev_node.propagate_downstream(transitive.require, transitive.node, self)
  File "/home/sin7hi/miniconda3/envs/conan2/lib/python3.10/site-packages/conans/client/graph/graph.py", line 86, in propagate_downstream
    assert node is not None
AssertionError

ERROR:

Remarks

It is interesting that the error occurs only in that specific dependency graph pattern. When removing libb or liba from libc, the package creation is fine. I'm not sure what the right behvior should look like. Maybe I would expect some warning but the build should succeed anyway even if the override dependency was never materialized.

conan2-missing-override-bug's People

Contributors

nicosmd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.