margelo / margelo/react-native-nitro-sqlite
Prefix native C++ filenames to prevent dependency collisions
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 565
- Forks
- 53
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 18
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.
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.
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.
Assessment
- Tech stack
- cpp, react-native, sqlite
- Domain
- build-system, mobile-dev
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100