conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
8.25k stars 980 forks source link

[question] Support for RAD Studio (Delphi and C++Builder)? #13447

Open code-kungfu opened 1 year ago

code-kungfu commented 1 year ago

What is your question?

Hello, I apologize in advance if it isn't the right place to ask, but I figured it is worth a try.

I've used Conan for quite some time to manage a couple C++ projects for embedded development and become quite impressed with the capabilities of Conan.

As I spend most of my time in RAD Studio developing Delphi applications and sometimes cross-over with C++Builder (Due to the interop features). I was wondering if the Conan team would consider including support for RAD Studio? I don't expect the Conan team have the capacity to add the support themselves, but would it be of interest if the integration is maintained as an external contribution and upstreamed to the Conan project?

Since Delphi uses DCUs (Delphi Compiled Units) to speed up the already fast compilation (Similar to the new C++ modules), and bpl packages (Essentially a dll/so/dylib with additional header magic for lookups) for components and optional runtime packages for modularity, Conan has all the features which would fit well into RAD Studio - especially when managing dependencies in a CI/CD pipeline, managing a large project in the IDE or managing multi platform projects which requires additional C++ dependencies to be compiled. The same goes for C++Builder (It is clang/LLVM backed). RAD Studio uses MSBuild project format format and MSBuild to build projects.

Thank you in advance. Kind regards, Glenn.

Have you read the CONTRIBUTING guide?

memsharded commented 1 year ago

Hi @code-kungfu

Thanks for your question. I think that you are right and RAD studio doesn't seem mainstream enough to get priority by the maintainers team.

Regarding contributions to support it, it depends. There are many things that become a liability for the maintainers anyway: documenting, support, maintenance and upgrades, etc, that need to be handled by the team, irrespective of the initial contribution. This is the reason why Conan, and specially Conan 2.0 developed multiple extensibility points, so it is easier to integrate new technologies:

So it would be necessary to describe and propose what would be the things that should be built-in in Conan and why they cannot be supported by user-side integrations, the best way would be to create dedicated issues for each potential change or necessary feature to discuss with the team.

code-kungfu commented 1 year ago

Hello @memsharded

Thank you for your reply!

RAD studio doesn't seem mainstream enough

While RAD Studio might not hit the press often and are frequently overlooked, it is already used by millions of developers worldwide for a wide range of different applications and has an active community around Delphi and C++Builder. In that regard I respectfully disagree in the assessment it isn't mainstream enough. πŸ™‚

I would have to investigate further and see if the changes for extensibility added in Conan 2.x will suffice and assess if extensions would be needed. My last investigation was based around Conan 1.x.

It wouldn't be a problem assembling a small team from the Delphi community who can develop and maintain the extensions for Conan as there are already several who has expressed interest in the integration.

I fully understand your point of view with regards to ongoing maintenance after the initial integration is developed and why there is a hesitance to take it in. I think a link / short entry in the documentation would suffice, and the RAD Studio specific documentation would be part of the extension repository. (There are also some specifics with regards to setting up Artifactory for RAD Studio usage πŸ™‚ )

memsharded commented 1 year ago

While RAD Studio might not hit the press often and are frequently overlooked, it is already used by millions of developers worldwide for a wide range of different applications and has an active community around Delphi and C++Builder. In that regard I respectfully disagree in the assessment it isn't mainstream enough.

That is good to hear. Yeah, I think that I overlooked by the name, as I have always heard about it as "embarcadero".

It wouldn't be a problem assembling a small team from the Delphi community who can develop and maintain the extensions for Conan as there are already several who has expressed interest in the integration.

Yeah, that would make sense and help. Even getting in touch with embarcadero folks directly too, I guess that they might be interested too.

tobiasherzke commented 1 year ago

It wouldn't be a problem assembling a small team from the Delphi community who can develop and maintain the extensions for Conan as there are already several who has expressed interest in the integration.

Hello @code-kungfu! What is the state of this? Have you assembled the small team? Where do they develop and maintain Conan extensions?

code-kungfu commented 1 year ago

Yeah, that would make sense and help. Even getting in touch with embarcadero folks directly too, I guess that they might be interested too.

@memsharded Apologies for the late reply. Full disclosure, I am an Embarcadero MVP and have been in direct contact with Embarcadero regarding this and they are interested to have support for Conan, especially for C++Builder. Managing Delphi binaries would be a nice extra touch. This support would however have to come from the Delphi/C++Builder community. There are also a few changes in the IDE needed to better facilitate the integration, but there are progress. Given that Delphi is a different language from C/C++, do you know how the conan community feel about supporting this along with C/C++? The long term idea is to have a package index for the vast amount of open source libraries and components and a web front end, similar to the public conan package index. It would be really helpful to know what direction we can take without stepping on each other toes πŸ™‚

What is the state of this? Have you assembled the small team? Where do they develop and maintain Conan extensions?

@tobiasherzke I've managed to gather a few who has more python experience than I have and we've started to investigate the best plan of action to facilitate the support for managing both the C++Builder and Delphi side of things and what needs to be done to make the msbuild generator work with RAD Studio msbuild projects. We haven't formally started development yet but it will soon be announced under the umbrella project page here: https://github.com/Omphalos-Project

Do you have specific requests or thoughts about the support/integration? πŸ™‚

Kind regars Glenn

memsharded commented 1 year ago

Hi @code-kungfu

Nice to hear from you.

Given that Delphi is a different language from C/C++, do you know how the conan community feel about supporting this along with C/C++?

There is no special feeling towards Delphi, neither positive or negative, it seems that there is no much overlap among Conan users. I have heard of some isolated case that they were doing something with it, but nothing really relevant.

There have been other integrations with other platforms/languages, like Rust, Labview, Matlab, Python, Java, etc. some of them public, some of them proprietary. If the Delphi community can benefit from Conan, that is great, I don't think there will be necessarily much conflict, but we can talk about the details. Feel free to send an email to info@conan.io.

ogsadmin commented 10 months ago

Sorry to jump in, but I am also looking into the possibility to use conan with Embarcaderos C++Builder compiler (not Delphi for me).

However, as Embarcadero already supports CMake (with a bit tweaking, see the official documentation Using CMake with C++Builder), I am wondering, if using a custom CMakeToolChain (as discussed in issue #10877 and described in the CMakeToolChain documentation) might already be the way to solve this?

(sorry no experience with conan yet, looking for some guidance/experiences)...

memsharded commented 10 months ago

@code-kungfu might know better than me. The idea is to research and also document or even integrate better with Embarcadero, but this is ongoing work, might take a bit.

ogsadmin commented 8 months ago

I've actually got it working - see https://github.com/haller-erne/conan-embarcadero. It's abit hacky, but fulfils its purpose...

code-kungfu commented 8 months ago

@ogsadmin Interesting. Though, I've been working on a different route (Using MSBuild) as CMake support in C++Builder is in need of a serious update (Hopefully something happens now that the new Clang 15 toolchain is maturing) and I wanted to support Delphi at the same time πŸ™‚

code-kungfu commented 8 months ago

@memsharded For some reason I didn't get a notification when you tagged me. Anyway, CMake support in C++Builder needs updating from embt and thus MSBuild is currently the recommended way to interface with their toolchains (Delphi and C++Builder) πŸ™‚

I currently have some internal testing going on with extensions for letting conan understand both Delphi and C++Builder. More to come..