From ec081df7d0a77f2d0744ce98512f34abb0c244d7 Mon Sep 17 00:00:00 2001 From: Meteor Date: Fri, 25 Apr 2025 06:27:35 +0000 Subject: [PATCH 1/4] doc: add import from conan --- doc/conan.md | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 doc/conan.md diff --git a/doc/conan.md b/doc/conan.md new file mode 100644 index 00000000..673ea4b6 --- /dev/null +++ b/doc/conan.md @@ -0,0 +1,67 @@ +# Import and Convert All Conan C Libraries + +Use the [rxsync](https://github.com/goplus/rxsync) tool to convert 1,800 libraries from the [Conan Center Index](https://github.com/conan-io/conan-center-index/tree/master/recipes). + +## Steps + +1. Use `rxsync` to sync Conan recipes locally +2. Customize names and generate a name mapping table +3. Parse dependency information to obtain the conversion list +4. Perform conversion according to the order in the conversion list +5. Automatically populate dependencies and remove unnecessary `include`s based on Conan dependency info +6. After converting each library, submit a pull request. Use GitHub Actions to perform a basic validation via `llgo build` +7. After merging, tag each `{{clib}}/{{cver}}` folder as `{{clib}}/{{cver}}/v0.1.0` to meet nested module requirements + +## Issues + +### 1. All `cflags` Included by Default + +The automatically generated `llcpp.cfg` includes all header files from dependencies listed under `cflags`. For example, `libxml2` includes header files from `zlib`, and `libxslt` includes headers from both `libxml2` and `zlib` as part of its include paths. This behavior is unintended — for example, in certain cases, headers from `libxml2` and `zlib` need to be removed. + +**Preliminary solution:** Automatically remove them during dependency population. + +### 2. Local `deps` + +How should dependencies be populated for `deps` in `llcppg.cfg`? All batch processing is done locally, while `deps` is expected to reference the GitHub path under `github.com/llpkg`. There's uncertainty about whether locally converted packages can be referenced as dependencies during batch processing. + +**Needs verification.** + +### 3. Package Dependency Order + +Ordering issues may arise during batch conversion. + +### 4. Naming Conflicts in Custom Names + +The `lib` prefix is removed. + +However, this may cause naming conflicts and needs to be verified. + +### 5. Demo Validation + +Batch conversion cannot perform demo validation. + +**Preliminary solution:** Use basic `llgo build` validation. + +### 6. Trim Prefix + +The expected behavior is to configure `trimPrefixes` in `llcppg.cfg` to remove namespaces before committing to the repo. +However, the automated process may not be able to identify and fill this in automatically. + +**No solution yet.** + +### 7. Tagging for All Version Branches + +How should tags be created? + +**Preliminary solution:** +``` +cjson/3.4.5/v0.1.0 +cjson/3.3.5/v0.1.0 +cjson/3.2.5/v0.1.0 +``` + +But it's unclear whether Go can recognize this format — needs verification. + +### 8. GitHub Action Verification + +Is it necessary to add `llcppg`-based validation? From 2c42a9a4313e84c090082eba720dc864c123ce65 Mon Sep 17 00:00:00 2001 From: Meteor Date: Fri, 25 Apr 2025 06:31:34 +0000 Subject: [PATCH 2/4] fix: statement --- doc/conan.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conan.md b/doc/conan.md index 673ea4b6..426ab978 100644 --- a/doc/conan.md +++ b/doc/conan.md @@ -32,7 +32,7 @@ Ordering issues may arise during batch conversion. ### 4. Naming Conflicts in Custom Names -The `lib` prefix is removed. +Remove `lib` prefix. However, this may cause naming conflicts and needs to be verified. From cc6fd24cc2fd48a976f6f1711e687695d27897f5 Mon Sep 17 00:00:00 2001 From: Meteor Date: Sun, 27 Apr 2025 01:54:55 +0000 Subject: [PATCH 3/4] fix: typo --- doc/conan.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conan.md b/doc/conan.md index 426ab978..861fef23 100644 --- a/doc/conan.md +++ b/doc/conan.md @@ -16,7 +16,7 @@ Use the [rxsync](https://github.com/goplus/rxsync) tool to convert 1,800 librari ### 1. All `cflags` Included by Default -The automatically generated `llcpp.cfg` includes all header files from dependencies listed under `cflags`. For example, `libxml2` includes header files from `zlib`, and `libxslt` includes headers from both `libxml2` and `zlib` as part of its include paths. This behavior is unintended — for example, in certain cases, headers from `libxml2` and `zlib` need to be removed. +The automatically generated `llcppg.cfg` includes all header files from dependencies listed under `cflags`. For example, `libxml2` includes header files from `zlib`, and `libxslt` includes headers from both `libxml2` and `zlib` as part of its include paths. This behavior is unintended — for example, in certain cases, headers from `libxml2` and `zlib` need to be removed. **Preliminary solution:** Automatically remove them during dependency population. From f809b77aba2cc87be27581b9ba4c4495544001fe Mon Sep 17 00:00:00 2001 From: Meteor Date: Tue, 6 May 2025 08:29:20 +0000 Subject: [PATCH 4/4] feat: add repo rank --- doc/conan.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/conan.md b/doc/conan.md index 861fef23..372ef5f3 100644 --- a/doc/conan.md +++ b/doc/conan.md @@ -26,9 +26,15 @@ How should dependencies be populated for `deps` in `llcppg.cfg`? All batch proce **Needs verification.** -### 3. Package Dependency Order +### 3. Package Order -Ordering issues may arise during batch conversion. +Sorted by popularity of repository and dependency. + +Rule: +1. Score(Stars/Forks/Watchers/Contributors) +2. The number of dependency(Less dependency is higher) + +Tools: [Rank Tool](https://github.com/MeteorsLiu/reporank) ### 4. Naming Conflicts in Custom Names