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] 'assert node.pref.timestamp is not None' w/ test_requires in Conan v2 beta

See original GitHub issue

Environment Details (include every applicable attribute)

  • Operating System+version: macOS 12.3 (Monterey)
  • Compiler+version: AppleClang 13.1.6.13160021
  • Conan version: 2.0.0-beta1
  • Python version: Python 3.10.5

Steps to reproduce (Include if Applicable)

  1. git clone https://github.com/ssrobins/stackblox.git
  2. cd stackblox
  3. git checkout conan_v2_crash_gtest
  4. Delete ~/.conan2
  5. cmake --preset macos

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

The conan install command embedded in CMake fails with this error:

bzip2/1.0.8@ssrobins: Retrieving package 24df4bc901e0688f1084351da5b2fa6f658304da from remote 'artifactory-ssrobins' 
Downloading conanmanifest.txt
Downloading conaninfo.txt
Downloading conan_package.tgz
Decompressing conan_package.tgz
bzip2/1.0.8@ssrobins: Package installed 24df4bc901e0688f1084351da5b2fa6f658304da
bzip2/1.0.8@ssrobins: Downloaded package revision 14f612c81887fa9f529df75848f822cf
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/conans/cli/cli.py", line 163, in run
    command.run(self._conan_api, self._commands[command_argument].parser, args[0][1:])
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/conans/cli/command.py", line 157, in run
    info = self._method(conan_api, parser, *args)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/conans/cli/commands/install.py", line 170, in install
    conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remote, update=args.update)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/conan/api/subapi/__init__.py", line 21, in wrapper
    return f(subapi, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/conan/api/subapi/install.py", line 29, in install_binaries
    installer.install(deps_graph)
ERROR: 
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/conans/client/installer.py", line 221, in install
    self._download_bulk(install_order)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/conans/client/installer.py", line 249, in _download_bulk
    self._download_pkg(node)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/conans/client/installer.py", line 254, in _download_pkg
    assert node.pref.timestamp is not None
AssertionError

The key to the crash is switching the gtest package from requires to test_requires: https://github.com/ssrobins/conan-recipes/commit/c2bf54494ddbc618032ced9ad5615fcf703c996e …which I obviously want so my app doesn’t get built with gtest.

I wasn’t seeing this in local builds, but it was happening in GitHub Actions CI. Deleting ~/.conan2 let me reproduce it locally. Happens in Windows, but not Linux CI environments.

Reverting this commit and repeating the steps above prevents the error: https://github.com/ssrobins/stackblox/commit/bf26cd602a5815bfb67e5c5e4be8d4b7f695ee36

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ssrobinscommented, Jul 31, 2022

Confirmed that the bug is still fixed in 2.0.0-beta2. Deleted my conan_v2_crash_gtest since this is fixed and the work has been merged to main.

0reactions
memshardedcommented, Jul 13, 2022

Closed by https://github.com/conan-io/conan/pull/11619, to be released in beta.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

[bug] qt/6.2.3 failing when doing a conan build local command ...
So I am moving it to conan-center-index repo. But it is likely that this will not be addressed quickly. Conan 2.0 will change...
Read more >
Package List — Spack 0.20.0.dev0 documentation
This allows legacy applications to start taking advantage of libFLAME with virtually no changes to their source code. In combination with BLIS library...
Read more >
Compare Packages Between Distributions - DistroWatch.com
This page enables us to quickly perform a side-by-side comparison of the packages available in two different distributions, or in two different versions...
Read more >
Effective and Efficient Process Engine Evaluation
My scientific career started with the diploma thesis I wrote supervised ... Future work comprises 1) creating a TOSCA process engine node type,...
Read more >
Simple index - piwheels
... albatradis uw-saml odoo10-addon-account-invoice-report-ddt-group kornia-rs python-sample-package-with-data-aitirga placavehiculos-pkg-aquintero535 ...
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