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

[feature] Provide more capabilities for managing sources #6944

Closed
1 task done
solvingj opened this issue May 1, 2020 · 1 comment
Closed
1 task done

[feature] Provide more capabilities for managing sources #6944

solvingj opened this issue May 1, 2020 · 1 comment

Comments

@solvingj
Copy link
Contributor

solvingj commented May 1, 2020

This ticket is intended to aggregate feedback from numerous other tickets related to adding features around managing source files in packages.

Summarized Related Issues

Summary of salient details coming from discussion:

  • With exports_sources, original sources already "cached" and available in all contexts

  • Plan to add equivalent "caching" for downloaded sources [feature] Support exports() and exports_sources() as methods #6943

  • Original sources are not enough for most use cases : debugging, and downstream compile

    • Will definitely need to enable some strategy in the package() method
    • Generated sources and headers cases, potentially different per settings/options
    • Patches on sources and headers applied during build
  • Effectively the same situation surrounding includes()

    • Convention is to package all headers separately for every binary in case they differ slightly
    • Usually fine since header count/size not usually prohibitive
    • Boost/Qt/Some others are exceptional, and the current convention is unfortunate for them
  • Do we copy convention from header strategy, or compose exports_sources folder + cpp_info.src_dirs?

  • Do we use strictly src_dirs strategy for cpp_info , or can we ALSO enable users to specify explicit list of source files in cpp_info, and then deduce src_dirs from that list. Some debug tools explicitly require a list of search directories, some can use list of sources. Explicit list of sources might provide a more deterministic solution for cases where exports_source directory will have an original source and package might capture a modified or generated alternative.

  • I've read the CONTRIBUTING guide.

@memsharded
Copy link
Member

memsharded commented May 31, 2023

A lot of things have happened since this issue was last active:

  • Conan 2.0 implements a new way to force the download of sources and execution of source() method, for dependencies, without really needing to build again from source, with the -c tools.build:download_source=True new configuration. It can also be used in conan graph info command, but also in conan install
  • The new deployer mechanisms allows to easily collect things from dependencies, including sources, which can be used for preparing some debugging, as they can also be used to automate tasks.

See for example: https://docs.conan.io/2/examples/extensions/deployers/sources/custom_deployer_sources.html

In any case, we have learned that the best for debugging is doing an actual local build, like conan install --build=pkg_to_debug* and that already allows to step-into that dependency.

So I am closing this as solved, please create new tickets for further questions.

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

No branches or pull requests

2 participants