Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlite: enable common flags #57621

Merged

Conversation

geeksilva97
Copy link
Contributor

@geeksilva97 geeksilva97 commented Mar 25, 2025

This PR enables flags that are common to other sqlite players in Node.js ecosystem:

This is related to #56476, even though it does not enable the RBU extension.

I see this as a good step toward the stabilization since it will make it easier for people from other dependencies.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/security-wg
  • @nodejs/sqlite

@nodejs-github-bot nodejs-github-bot added dependencies Pull requests that update a dependency file. needs-ci PRs that need a full CI run. sqlite Issues and PRs related to the SQLite subsystem. labels Mar 25, 2025
@geeksilva97
Copy link
Contributor Author

Not sure whether this will be a problem, but this increases the binary size by 600KB.

@geeksilva97 geeksilva97 force-pushed the enable-common-sqlite-flags branch from e4b93b9 to 9590dee Compare March 25, 2025 17:53
Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not saying whether or not we should land this, but https://github.com/nodejs/node/blob/main/deps/sqlite/unofficial.gni should be updated, and there should be at least one test for each new API to prevent regressions.

@geeksilva97
Copy link
Contributor Author

Not saying whether or not we should land this, but https://github.com/nodejs/node/blob/main/deps/sqlite/unofficial.gni should be updated, and there should be at least one test for each new API to prevent regressions.

Good point. Also, I think it would be good to have some benchmarks on sqlite implementations.

@geeksilva97 geeksilva97 force-pushed the enable-common-sqlite-flags branch from 9590dee to 0c1ec86 Compare March 25, 2025 19:22
@geeksilva97
Copy link
Contributor Author

Not saying whether or not we should land this, but https://github.com/nodejs/node/blob/main/deps/sqlite/unofficial.gni should be updated, and there should be at least one test for each new API to prevent regressions.

@cjihrig , what's the difference between .gyp and .gni file?

@geeksilva97 geeksilva97 force-pushed the enable-common-sqlite-flags branch from 0c1ec86 to 31c5aa5 Compare March 25, 2025 19:28
@cjihrig
Copy link
Contributor

cjihrig commented Mar 25, 2025

what's the difference between .gyp and .gni file?

They are for two different build systems. The .gyp file is used by the official build. The .gni file is used by the unofficial GN build.

@geeksilva97
Copy link
Contributor Author

what's the difference between .gyp and .gni file?

They are for two different build systems. The .gyp file is used by the official build. The .gni file is used by the unofficial GN build.

Thank you!

@cjihrig
Copy link
Contributor

cjihrig commented Mar 25, 2025

even though it does not enable the RBU extension.

Why not? And why not the Geopoly extension?

@geeksilva97
Copy link
Contributor Author

geeksilva97 commented Mar 25, 2025

even though it does not enable the RBU extension.

Why not? And why not the Geopoly extension?

For RBU, I didn't see it in better-sqlite3 or node-sqlite3. Geopoly seems like a good extension to have.

@geeksilva97
Copy link
Contributor Author

geeksilva97 commented Mar 25, 2025

even though it does not enable the RBU extension.

Why not? And why not the Geopoly extension?

For RBU, I didn't see it in better-sqlite3 or node-sqlite3. Geopoly seems like a good extension to have.

On the other hand, the issue mentions the SQLite Amalgamation. I think we could have RBU enabled.

The amalgamation contains everything you need to integrate SQLite into a larger project

Copy link

codecov bot commented Mar 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.23%. Comparing base (1b5b019) to head (c22f75e).
Report is 69 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #57621      +/-   ##
==========================================
+ Coverage   90.22%   90.23%   +0.01%     
==========================================
  Files         630      630              
  Lines      185054   185055       +1     
  Branches    36254    36219      -35     
==========================================
+ Hits       166963   166985      +22     
- Misses      11032    11037       +5     
+ Partials     7059     7033      -26     

see 45 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@TheOneTheOnlyJJ TheOneTheOnlyJJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small typo

@geeksilva97 geeksilva97 force-pushed the enable-common-sqlite-flags branch from 31c5aa5 to 3f64dfa Compare March 26, 2025 13:49
Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment, but changes LGTM.

Co-authored-by: Colin Ihrig <[email protected]>
);
});

test('fts3 parenthesis', (t) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is inconsistent with the rest, missing is enabled in its name.

Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still unsure whether or not we want all of these enabled, but giving this a LGTM so it's not stalled.

@cjihrig cjihrig added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 3, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 3, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Apr 3, 2025

@cjihrig cjihrig added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed needs-ci PRs that need a full CI run. labels Apr 3, 2025
@TheOneTheOnlyJJ
Copy link

Still unsure whether or not we want all of these enabled, but giving this a LGTM so it's not stalled.

I really hope they land. Not having them enabled limits the usefulness of the library a lot.

@bakkot
Copy link
Contributor

bakkot commented Apr 3, 2025

I personally don't care about the other ones but I'm really hoping FTS5 specifically lands.

@TheOneTheOnlyJJ
Copy link

I personally don't care about the other ones but I'm really hoping FTS5 specifically lands.

This is why, for all the various use cases various projects have, they should all be included. 😊

@cjihrig
Copy link
Contributor

cjihrig commented Apr 4, 2025

Just noting that this is ready to land. It just needs one person who believes in this change strongly enough to put the commit-queue label on it.

@geeksilva97 geeksilva97 added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 4, 2025
@geeksilva97
Copy link
Contributor Author

Let's do this!

@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 4, 2025
@nodejs-github-bot nodejs-github-bot merged commit 9aa57bf into nodejs:main Apr 4, 2025
67 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 9aa57bf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. dependencies Pull requests that update a dependency file. sqlite Issues and PRs related to the SQLite subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants