Conan 2.2 Documentation
4.46 MB
718 页
0 评论
语言 | 格式 | 评分 |
---|---|---|
英语 | .pdf | 3 |
摘要 | ||
Conan 2.2版本引入了多项改进功能,包括包列表功能,允许批量操作多个配方和包;支持上传、下载和管理元数据文件,用于构建日志、测试结果等;新增备份源功能,确保构建可重复性;支持从Conan包安装配置文件,提升配置管理灵活性;引入新的依赖图模型,更好地支持C和C++二进制文件的依赖关系;提供新的公共Python API,增强自动化功能;优化了命令行界面和锁定机制,提升依赖管理的可追溯性和一致性。 | ||
AI总结 | ||
### Conan 2.2 Documentation Summary
Conan 2.2 introduces several significant improvements and new features, particularly focused on enhancing dependency management, workflow efficiency, and compatibility. Below is a concise summary of the key updates:
---
#### **1. Package Lists**
- **Bulk Operations**: Allows users to perform upload, download, remove, and list operations on multiple recipes and packages with a single command.
- **Dependency Graph Integration**: Package lists can be created from a dependency graph generated by `conan create` or `conan install`, enabling the upload of all packages in a dependency graph with just two commands.
- **Use Cases**: Refer to the example usages and the dedicated blog post for detailed guidance.
---
#### **2. Metadata Files**
- **Enhanced File Management**: Users can now store, upload, download, and modify metadata files associated with recipes and packages.
- **Practical Applications**: Useful for managing build logs, test executables, test results, coverage data, and other files required for traceability and compliance.
---
#### **3. Backup Sources for Third-Party Builds**
- **Automated Backup**: When building packages from third-party internet sources, Conan automatically stores a copy of these sources in your own server. This ensures builds remain fully reproducible, regardless of changes to the original sources.
- **Reference**: See the backup-sources blog post for more details.
---
#### **4. Installing Configuration from Conan Packages**
- **Flexible Configuration**: From Conan 2.2, configuration files can be installed not only from Git repositories or HTTP servers but also from Conan packages.
- **Command Example**: Use `conan config install-pkg myconf/myversion` to install configuration files from a Conan package stored in a server.
- **Versioning and Lockfiles**: Supports version ranges for easy updates and uses lockfiles to ensure reproducibility.
---
#### **5. New Graph Model**
- **Improved Dependency Management**: Introduces new requirement traits (e.g., headers, libs, build, run, test) and package types (e.g., static, shared, application, header-only) to better model C and C++ binary relationships.
- **Enhanced Functionality**: Facilitates more accurate representation of dependencies, executables, shared libraries, and static libraries.
- **Resources**: Refer to the design documents and video talks for deeper insights.
---
#### **6. Public Python API**
- **Modular and Documented**: A new public Python API is available, offering building blocks for advanced automation and extending Conan's functionality.
- **Sub-APIs**: Includes APIs for tasks like listing, searching, removing, profiling, and more, enabling the creation of custom user commands and automation flows.
- **Reference**: See the Python API documentation for details.
---
#### **7. Migration and Compatibility**
- **Backward Compatibility**: Recipes using the latest 1.X integrations are compatible with Conan 2, and binaries for both versions can coexist in the same server repositories.
- **Upgrade Guide**: The Conan 2 Migration guide provides essential information for transitioning from Conan 1.X to 2.X.
---
#### **8. Enhanced CLI and Features**
- **New CLI Interface**: Cleaner command structure and more organized output for improved user experience.
- **Lockfiles and Cache Management**: Simplified and more powerful lockfiles for reproducibility, and the ability to store multiple revisions in the cache.
- **Deployment Mechanism**: A new deployers mechanism allows copying artifacts from the cache to user folders for consumption during builds.
---
#### **9. Additional Improvements**
- **Build System Integrations**: Enhanced support for build systems like CMakeDeps and CMakeToolchain for transparent integration.
- **Custom Commands**: Users can create custom commands using the public Python API and share them via `conan config install`.
- **Environment Management**: Improved configuration with `[conf]` and new tools in `conan.tools.env` for better environment management.
---
#### **10. Changelog Highlights**
- **Version 2.2.3 (April 2024)**: Fixes and improvements, including compatibility fixes for Python 3.12 and macOS versions.
- **Version 2.2.0 (March 2024)**: Features like `conan graph outdated` for dependency version tracking and support for new macOS versions.
---
#### **11. Resources**
- **Video Talks**: Access talks like "What’s New in Conan 2.0" and "CMake and Conan: past, present and future" for deeper insights.
- **Blog Posts**: Refer to dedicated posts on package lists, metadata files, and backup sources for detailed guidance.
---
This summary captures the core updates and improvements in Conan 2.2, focusing on functionality, usability, and compatibility. For detailed implementation and examples, refer to the full documentation and associated resources. |
P1
P2
P3
P4
P5
P6
P7
P8
P9
P10
P11
P12
下载文档到本地,方便使用
- 可预览页数已用完,剩余
706 页请下载阅读 -
文档评分