You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ConanClient: hardcoded per-package link metadata table instead of consuming recipe cpp_info #550
conan_known_link_metadata in src/compiler/ConanClient.w is a hand-maintained database of per-package link requirements (xorg, glfw/raylib frameworks, and as of 7fa3f2b a libcurl branch with Darwin frameworks and Linux/Windows system libs). Every new C package with system-level link requirements will need another hardcoded branch in the compiler.
This is one level short of the root cause: the metadata pipeline drops Conan's cpp_info.system_libs / cpp_info.frameworks, which is exactly where recipes declare this information. Notably, ConanClient already fetches conanfile.py (the source-build fallback path, around ConanClient.w:837), so the recipe text containing self.cpp_info...system_libs / frameworks assignments is already in hand — it just isn't mined.
Additional concern
The libcurl Linux branch (pthread, dl) and Windows branch (ws2_32, crypt32, wldap32, advapi32) were written from general knowledge and have never been executed — only the Darwin branch is covered by :release-libcurl-uat. They live in compiler source with no marker that they are unverified.
Proposed direction
Extract system_libs / frameworks assignments textually from the fetched conanfile.py (including the common if self.settings.os == ... conditional patterns), and keep conan_known_link_metadata only as an override/escape hatch for recipes whose package_info is too dynamic to scrape. Retire existing branches as the generic path proves itself.
Mission relevance
"With should understand C headers, ABIs, native libraries, linkers, package managers... without making the programmer become the build system." The hardcoded table makes the compiler maintainer the build system instead, one package at a time.
Fixed in 360f396. conan_extract_recipe_link_metadata reads package_info() from the fetched conanfile.py: indentation-scoped if/elif/else resolved against the target OS (self.settings.os ==/!=/in/not in, is_apple_os), collecting system_libs/frameworks from =/append/extend with string-literal lists. Unresolvable constructs (option-dependent conditions, computed values, multi-line lists) are skipped, never guessed — under-linking fails loudly at link time.
The hardcoded libcurl branch is deleted; extraction replaces it and also surfaces CoreServices, which the hand-written entry had missed. Verified: with get --force-reinstall c.libcurl produces -framework CoreFoundation -framework CoreServices -framework SystemConfiguration in metadata.json, all five C-package probes pass, and :release-libcurl-uat is green end to end. zlib/openssl/sqlite3/bzip2 metadata verified sane under the new path.
The table keeps precedence for opengl/glfw/raylib/xorg (conan_package_has_table_link_metadata) and shrinks per package as extraction is verified — glfw/raylib are the next candidates (the raylib spiral UAT can gate them). The untested Linux/Windows libcurl guesses this issue flagged are gone with the branch. Parser unit test: test/internals/conan_recipe_link_metadata_test.w (manual until #559 wires internals tests into :test).
Activity
Extract system link metadata from Conan recipes
ehartford commentedon Jun 12, 2026
Fixed in 360f396.
conan_extract_recipe_link_metadatareadspackage_info()from the fetchedconanfile.py: indentation-scoped if/elif/else resolved against the target OS (self.settings.os ==/!=/in/not in,is_apple_os), collectingsystem_libs/frameworksfrom=/append/extendwith string-literal lists. Unresolvable constructs (option-dependent conditions, computed values, multi-line lists) are skipped, never guessed — under-linking fails loudly at link time.The hardcoded libcurl branch is deleted; extraction replaces it and also surfaces
CoreServices, which the hand-written entry had missed. Verified:with get --force-reinstall c.libcurlproduces-framework CoreFoundation -framework CoreServices -framework SystemConfigurationin metadata.json, all five C-package probes pass, and:release-libcurl-uatis green end to end. zlib/openssl/sqlite3/bzip2 metadata verified sane under the new path.The table keeps precedence for opengl/glfw/raylib/xorg (
conan_package_has_table_link_metadata) and shrinks per package as extraction is verified — glfw/raylib are the next candidates (the raylib spiral UAT can gate them). The untested Linux/Windows libcurl guesses this issue flagged are gone with the branch. Parser unit test:test/internals/conan_recipe_link_metadata_test.w(manual until #559 wires internals tests into :test).