현대적인 C 및 C++: Conan과의 통합

Source: GitLab Blog | Author: Jordi Mon and Steve Abrams

GitLab은 모든 소프트웨어 개발 및 제공 라이프사이클을 위한 단일 애플리케이션으로서 모든 다양한 소프트웨어 워크플로우와 파이프라인을 지원하기 위해 노력합니다. 이 주기가 얼마나 복잡할 수 있는가에 상관없이, C와 C++ GitLab 사용자들을 위하여 우리가 하고 싶은 것은 이러한 고통을 진정시키는 것입니다. 이 비유에 이어서, 우리는 의사로서 환자의 말을 먼저 듣고 싶습니다. 이 모든 것은 우리 지역사회가 그들의 증상을 설명하고 여기의 첫 번째 아이디어에서 짤깍거리는 것에서 시작되었습니다. 이는 금융, 로봇 또는 임베디드 소프트웨어와 같은 C++ 의존 산업의 고객들이 C++를 위한 패키지 관리를 지원하는 데 관심을 가졌을 때 GitLab과 더욱 관련이 깊어졌습니다.

Conan is now available on GitLab

The C and C++ ecosystems have a ton of legacy tooling. It is what it is: they’ve been around for a long time and the community is, in a way, very DIY-driven. For example, many C++ libraries are advertised as “Zero deps inside.” This badge is intended as a sign of quality, and is even a bit of a status symbol for the devs and maintainers. That’s fine for C/C++ developer but what about the users of such libs? Regardless of the actual quality of the lib’s code, if you wanted to use any of them, you’d better have a local, updated copy of them in a Git submodule. This is especially relevant for head-only monsters like Boost, the most popular set of libs in C++. In other words, in order to make use of them (that’s why they were created in the first place, I guess), you basically have to download the source code, build it yourself (good luck with that), compile it and include the resulting binary in your project. This process can be time consuming and, if build processes are not well documented or supported, it can be exasperating. All of this can become a real nightmare if transitive dependencies are present, or if different version control systems have been used. It’s also tricky when deciding upon static or dynamic binaries, static or dynamic linking, single or multi-threaded, 32-bit or 64-bit…

How to build C and C++ packages in GitLab the Conan way

The GitLab Conan integration allows Conan users to set GitLab as the remote registry for their packages. Users will be able to set the remote and upload and install packages from GitLab’s registry. Think of it this way: you still use the same CLI to work with your Conan packages, but GitLab is on the receiving end. In doing so, GitLab creates the unique opportunity to have the code and package generated from the code living in the same place, freeing users from having to manage multiple services to store packages and code separately and still have them working together. This allows users to share private packages within an organization that is already using GitLab, publish public packages for general or open source use, and will open up many possibilities in utilizing GitLab’s CI pipelines to build and consume these packages automatically.

Check out a full demo:

or a speedrun of Conan performed by the team in charge of the integration:

If you need more help you can always refer to the Conan docs.

The future of C and C++ in GitLab: Game development workflows!

What’s coming next? In tradition with GitLab’s value of iteration, the initial release of Conan is a bare-bones API that allows you to publish and consume packages within GitLab. Next up will be a UI that displays much of the commonly referenced metadata for a given package, pre-written CI templates for automatic package publishing and consuming, less strict package naming conventions with remotes scoped to the group and project level within GitLab, and the list goes on.

If you are interested in package management at large, find a list of publicly available issues about the topic here. Also, please note that if game development is your interest, large file support, partial clone and many other features that make game development possible with Git, will soon be available in GitLab. All the heavy lifting required for those massive binaries, engines, and animations will feel like feathers when we release those features. Stay tuned to know more about it in our newsletter.

댓글 남기기