Prefix native C++ filenames to prevent dependency collisions
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- cpp, react-native, sqlite
- Domain
- build-system, mobile-dev
Research direction
Inspect the non-generated, non-vendored .cpp and .hpp files, including utils.hpp, macros.hpp, types.hpp, logs.hpp, and operations.cpp, then trace their includes, include guards, CocoaPods declarations, and Android build references. Confirm the source of the reported ThreadPool collision. Done means project-owned published headers are prefixed and the iOS and Android example builds pass alongside a dependency with generic filenames.
Written by the indexing model from the issue text.
Description
Several of NitroSQLite's project-owned C++ files use generic basenames such as utils.hpp, macros.hpp, types.hpp, logs.hpp, and operations.cpp. These names can collide with files from other native dependencies in the same React Native build; this was observed when NitroSQLite and op-sqlite were installed together.
Oscar Franco reported the collision in #312, including clashes around utils, macros, and ThreadPool. C++ namespaces do not protect filenames or build artifacts, so project-owned native files should use a stable NitroSQLite-specific prefix.
Proposed change
- Identify non-generated, non-vendored
.cppand.hppfiles exposed to consumer builds. - Prefix generic filenames with
NitroSQLiteorRNNitroSQLite. - Update includes, include guards, CocoaPods source declarations, and Android build references.
- Keep generated Nitrogen and vendored SQLite files unchanged unless investigation shows that they are also collision-prone and can be renamed safely.
- Confirm where the reported
ThreadPoolcollision originates because the current NitroSQLite tree does not contain a project-owned file with that name.
Acceptance criteria
- An application can build NitroSQLite alongside a dependency containing generic C++ filenames such as
utils.hppandmacros.hpp. - The iOS and Android example builds pass after the rename.
- Published project-owned headers no longer use generic, unprefixed filenames.
- Dominant language
- C
- Stars
- 565
- Forks
- 53
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 28
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from margelo/react-native-nitro-sqlite
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
margelo/react-native-nitro-sqlite#218 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
All issues in margelo/react-native-nitro-sqlite
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
libsdl-org/SDL#16372 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
corazawaf/coraza-nginx#140 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
jamesstringer90/appsandbox#160 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100