This project is archived. Its data is read-only.

--debug option leads to a traceback

Summary

Using bst show TARGET works fine, but adding --debug gives me a traceback.

Steps to reproduce

$ git clone https://gitlab.com/freedesktop-sdk/freedesktop-sdk.git
$ cd freedesktop-sdk
$ git checkout 18.08  # at the time of writing, that's 094c6d22f12af9e557c733aa59c9c996f5a54d5a
$ bst --debug show all.bst
pid:14063 id:000[--:--:--][][] START   Loading elements
pid:14063 id:000[00:00:07][][] SUCCESS Loading elements
pid:14063 id:000[--:--:--][][] START   Resolving elements
pid:14063 id:000[--:--:--][][] BUG     'StackElement' object has no attribute '_Element__cache_key'

    Traceback (most recent call last):
      File "/usr/bin/bst", line 8, in <module>
        sys.exit(cli())
      File "/usr/lib/python3.6/site-packages/click/core.py", line 721, in __call__
        return self.main(*args, **kwargs)
      File "/usr/lib/python3.6/site-packages/buildstream/_frontend/cli.py", line 162, in override_main
        standalone_mode=standalone_mode, **extra)
      File "/usr/lib/python3.6/site-packages/click/core.py", line 696, in main
        rv = self.invoke(ctx)
      File "/usr/lib/python3.6/site-packages/click/core.py", line 1065, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/lib/python3.6/site-packages/click/core.py", line 894, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/usr/lib/python3.6/site-packages/click/core.py", line 534, in invoke
        return callback(*args, **kwargs)
      File "/usr/lib/python3.6/site-packages/click/decorators.py", line 27, in new_func
        return f(get_current_context().obj, *args, **kwargs)
      File "/usr/lib/python3.6/site-packages/buildstream/_frontend/cli.py", line 549, in show
        except_targets=except_)
      File "/usr/lib/python3.6/site-packages/buildstream/_stream.py", line 114, in load_selection
        fetch_subprojects=False)
      File "/usr/lib/python3.6/site-packages/buildstream/_stream.py", line 856, in _load
        fetch_subprojects=fetch_subprojects)
      File "/usr/lib/python3.6/site-packages/buildstream/_pipeline.py", line 111, in load
        fetch_subprojects=fetch_subprojects)
      File "/usr/lib/python3.6/site-packages/buildstream/_project.py", line 322, in load_elements
        for meta in meta_elements
      File "/usr/lib/python3.6/site-packages/buildstream/_project.py", line 322, in <listcomp>
        for meta in meta_elements
      File "/usr/lib/python3.6/site-packages/buildstream/element.py", line 902, in _new_from_meta
        element = meta.project.create_element(artifacts, meta, first_pass=meta.first_pass)
      File "/usr/lib/python3.6/site-packages/buildstream/_project.py", line 233, in create_element
        return self.config.element_factory.create(self._context, self, artifacts, meta)
      File "/usr/lib/python3.6/site-packages/buildstream/_elementfactory.py", line 61, in create
        element = element_type(context, project, artifacts, meta, default_config)
      File "/usr/lib/python3.6/site-packages/buildstream/element.py", line 197, in __init__
        super().__init__(meta.name, context, project, meta.provenance, "element")
      File "/usr/lib/python3.6/site-packages/buildstream/plugin.py", line 170, in __init__
        self.debug("Created: {}".format(self))
      File "/usr/lib/python3.6/site-packages/buildstream/plugin.py", line 451, in debug
        self.__message(MessageType.DEBUG, brief, detail=detail)
      File "/usr/lib/python3.6/site-packages/buildstream/plugin.py", line 693, in __message
        self.__context.message(message)
      File "/usr/lib/python3.6/site-packages/buildstream/_context.py", line 425, in message
        self._message_handler(message, context=self)
      File "/usr/lib/python3.6/site-packages/buildstream/_frontend/app.py", line 677, in _message_handler
        text = self.logger.render(message)
      File "/usr/lib/python3.6/site-packages/buildstream/_frontend/widget.py", line 591, in render
        return self._render(message)
      File "/usr/lib/python3.6/site-packages/buildstream/_frontend/widget.py", line 626, in _render
        text += widget.render(message)
      File "/usr/lib/python3.6/site-packages/buildstream/_frontend/widget.py", line 228, in render
        _, key, missing = plugin._get_display_key()
      File "/usr/lib/python3.6/site-packages/buildstream/element.py", line 1148, in _get_display_key
        cache_key = self._get_cache_key()
      File "/usr/lib/python3.6/site-packages/buildstream/element.py", line 1001, in _get_cache_key
        return self.__cache_key
    AttributeError: 'StackElement' object has no attribute '_Element__cache_key'

What is the current bug behavior?

A traceback.

What is the expected correct behavior?

The same as bst show all.bst, but with additional debug input.

Other relevant information

I don't think it matters, but that's with the Fedora package I made.

  • BuildStream version affected: 1.1.6

Assignee Loading
Time tracking Loading