Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix art:build-info create for recipe-only dependencies #168

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dnoveczky-ntr
Copy link

We've been seeing the same issue in our project as in #166
I think the problem is that some dependencies are recipe-only, like this one for example:

Click to expand JSON
{
   "ref":"meson/1.3.2#d1125ba555ec1a94f165a3412fdf7f88",
   "id":"7",
   "recipe":"Cache",
   "package_id":"da39a3ee5e6b4b0d3255bfef95601890afd80709",
   "prev":"3ba677cf44c95996f4f326c668f92f00",
   "rrev":"d1125ba555ec1a94f165a3412fdf7f88",
   "rrev_timestamp":1717762194.047,
   "prev_timestamp":1718105046.468,
   "remote":"artifactory",
   "binary_remote":"artifactory",
   "build_id":null,
   "binary":"Skip",
   "invalid_build":false,
   "info_invalid":null,
   "name":"meson",
   "user":null,
   "channel":null,
   "url":"https://github.com/conan-io/conan-center-index",
   "license":"Apache-2.0",
   "author":null,
   "description":"Meson is a project to create the best possible next-generation build system",
   "homepage":"https://github.com/mesonbuild/meson",
   "build_policy":null,
   "upload_policy":null,
   "revision_mode":"hash",
   "provides":null,
   "deprecated":null,
   "win_bash":null,
   "win_bash_run":null,
   "default_options":null,
   "options_description":null,
   "version":"1.3.2",
   "topics":[
      "meson",
      "mesonbuild",
      "build-system"
   ],
   "package_type":"application",
   "languages":[
      
   ],
   "settings":{
      
   },
   "options":{
      
   },
   "options_definitions":{
      
   },
   "generators":[
      
   ],
   "python_requires":null,
   "system_requires":{
      
   },
   "recipe_folder":"C:\\Users\\dnoveczky\\.conan2\\p\\meson664925a500958\\e",
   "source_folder":null,
   "build_folder":null,
   "generators_folder":null,
   "package_folder":null,
   "cpp_info":{
      "root":{
         "includedirs":[
            "include"
         ],
         "srcdirs":null,
         "libdirs":[
            "lib"
         ],
         "resdirs":null,
         "bindirs":[
            "bin"
         ],
         "builddirs":null,
         "frameworkdirs":null,
         "system_libs":null,
         "frameworks":null,
         "libs":null,
         "defines":null,
         "cflags":null,
         "cxxflags":null,
         "sharedlinkflags":null,
         "exelinkflags":null,
         "objects":null,
         "sysroot":null,
         "requires":null,
         "properties":null
      }
   },
   "conf_info":{
      
   },
   "label":"meson/1.3.2",
   "info":{
      
   },
   "vendor":false,
   "dependencies":{
      "8":{
         "ref":"ninja/1.11.1",
         "run":true,
         "libs":false,
         "skip":false,
         "test":false,
         "force":false,
         "direct":true,
         "build":false,
         "transitive_headers":null,
         "transitive_libs":null,
         "headers":false,
         "package_id_mode":null,
         "visible":true
      }
   },
   "context":"build",
   "test":false
}

Notice how the recipe_folder field has a value but package_folder doesn't.
get_artifacts() was called on it twice, here and here. The first call succeeded since the node had a recipe_folder value, but the second failed because it doesn't have a package_folder value.
I added a check to see if these values exist so that get_artifacts() only gets called when it's expected to return meaningful values.

@CLAassistant
Copy link

CLAassistant commented Jan 7, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants