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

src: remove node namespace from sqlite.cc #54500

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

JonasBa
Copy link
Contributor

@JonasBa JonasBa commented Aug 22, 2024

Remove unnecessary use of node namespace from node_sqlite.cc

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. sqlite Issues and PRs related to the SQLite subsystem. labels Aug 22, 2024
src/node_sqlite.h Outdated Show resolved Hide resolved
@anonrig anonrig added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Aug 22, 2024
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.

The string_view and Local<Value> changes should be done in separate commits since they aren't related to removing the namespace.

@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 22, 2024
@nodejs-github-bot

This comment was marked as outdated.

@JonasBa JonasBa force-pushed the jb/sqlite/node-namespace branch 3 times, most recently from 5f2f4a1 to 3d1ff26 Compare August 22, 2024 15:36
@anonrig anonrig added request-ci Add this label to start a Jenkins CI on a PR. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. labels Aug 22, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 22, 2024
@nodejs-github-bot

This comment was marked as outdated.

Copy link

codecov bot commented Aug 22, 2024

Codecov Report

Attention: Patch coverage is 78.78788% with 7 lines in your changes missing coverage. Please review.

Project coverage is 88.25%. Comparing base (291d90a) to head (18e5be3).
Report is 109 commits behind head on main.

Files with missing lines Patch % Lines
src/node_sqlite.cc 78.78% 4 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #54500      +/-   ##
==========================================
+ Coverage   88.04%   88.25%   +0.21%     
==========================================
  Files         652      651       -1     
  Lines      183764   183904     +140     
  Branches    35862    35863       +1     
==========================================
+ Hits       161787   162304     +517     
+ Misses      15233    14899     -334     
+ Partials     6744     6701      -43     
Files with missing lines Coverage Δ
src/node_sqlite.h 0.00% <ø> (ø)
src/node_sqlite.cc 80.61% <78.78%> (-2.45%) ⬇️

... and 136 files with indirect coverage changes

src/node_sqlite.cc Outdated Show resolved Hide resolved
src/node_sqlite.cc Outdated Show resolved Hide resolved
Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

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

Couple of nits but otherwise LGTM

@anonrig
Copy link
Member

anonrig commented Aug 22, 2024

@JonasBa can you run the cpp formatter?

@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 24, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 24, 2024
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@jasnell
Copy link
Member

jasnell commented Sep 8, 2024

PR is currently blocked from landing due to unreliable CI. Likely needs a rebase

@lpinca
Copy link
Member

lpinca commented Sep 14, 2024

This needs a rebase to resolve conflicts.

src: remove unnecessary node namespace

src: remove string view changes
This reverts commit 1340a81744b5a934b4ea0423bc01d424fa152127.

src: use direct initialzation and const string view signature
@JonasBa
Copy link
Contributor Author

JonasBa commented Sep 20, 2024

@lpinca @jasnell rebased the PR.

@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 20, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 20, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@aduh95
Copy link
Contributor

aduh95 commented Sep 24, 2024

Related failure on Windows:

stack: "\u25B6 accessing the node:sqlite module\n  \u2714 cannot be accessed without\
  \ the node: scheme (3.8032ms)\n  \u2714 cannot be accessed without --experimental-sqlite\
  \ flag (92.0822ms)\n\u25B6 accessing the node:sqlite module (98.3768ms)\n\u2714\
  \ ERR_SQLITE_ERROR is thrown for errors originating from SQLite (52.0227ms)\n\u2716\
  \ in-memory databases are supported (1.1393ms)\n  Error: unable to open database\
  \ file\n      at TestContext.<anonymous> (c:\\workspace\\node-test-binary-windows-js-suites\\\
  node\\test\\parallel\\test-sqlite.js:66:15)\n      at Test.runInAsyncScope (node:async_hooks:211:14)\n\
  \      at Test.run (node:internal/test_runner/test:930:25)\n      at Test.processPendingSubtests\
  \ (node:internal/test_runner/test:629:18)\n      at Test.postRun (node:internal/test_runner/test:1026:19)\n\
  \      at Test.run (node:internal/test_runner/test:969:12)\n      at process.processTicksAndRejections\
  \ (node:internal/process/task_queues:105:5)\n      at async Test.processPendingSubtests\
  \ (node:internal/test_runner/test:629:7) {\n    code: 'ERR_SQLITE_ERROR',\n    errcode:\
  \ 14,\n    errstr: 'unable to open database file'\n  }

@aduh95 aduh95 removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 24, 2024
@anonrig
Copy link
Member

anonrig commented Sep 27, 2024

Can you fix the linting error?

@JonasBa
Copy link
Contributor Author

JonasBa commented Sep 27, 2024

Can you fix the linting error?

Yes, I'm sorry, still trying to build the muscle to run the linter and formatters 😅

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Sep 27, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 27, 2024
@nodejs-github-bot
Copy link
Collaborator

@aduh95
Copy link
Contributor

aduh95 commented Sep 28, 2024

Related failure on Windows:

not ok 705 parallel/test-sqlite
  ---
  duration_ms: 358.00300
  severity: fail
  exitcode: 1
  stack: |-
    ▶ accessing the node:sqlite module
      ✔ cannot be accessed without the node: scheme (3.494ms)
      ✔ cannot be accessed without --experimental-sqlite flag (93.9584ms)
    ✔ accessing the node:sqlite module (99.6248ms)
    ✔ ERR_SQLITE_ERROR is thrown for errors originating from SQLite (41.9438ms)
    ✖ in-memory databases are supported (1.2068ms)
      Error: unable to open database file
          at TestContext.<anonymous> (c:\workspace\node-test-binary-windows-js-suites\node\test\parallel\test-sqlite.js:66:15)
          at Test.runInAsyncScope (node:async_hooks:211:14)
          at Test.run (node:internal/test_runner/test:930:25)
          at Test.processPendingSubtests (node:internal/test_runner/test:629:18)
          at Test.postRun (node:internal/test_runner/test:1026:19)
          at Test.run (node:internal/test_runner/test:969:12)
          at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
          at async Test.processPendingSubtests (node:internal/test_runner/test:629:7) {
        code: 'ERR_SQLITE_ERROR',
        errcode: 14,
        errstr: 'unable to open database file'
      }
    
    ✔ PRAGMAs are supported (19.2488ms)
    ℹ tests 5
    ℹ suites 1
    ℹ pass 4
    ℹ fail 1
    ℹ cancelled 0
    ℹ skipped 0
    ℹ todo 0
    ℹ duration_ms 175.4247
    
    ✖ failing tests:
    
    test at test\parallel\test-sqlite.js:65:1
    ✖ in-memory databases are supported (1.2068ms)
      Error: unable to open database file
          at TestContext.<anonymous> (c:\workspace\node-test-binary-windows-js-suites\node\test\parallel\test-sqlite.js:66:15)
          at Test.runInAsyncScope (node:async_hooks:211:14)
          at Test.run (node:internal/test_runner/test:930:25)
          at Test.processPendingSubtests (node:internal/test_runner/test:629:18)
          at Test.postRun (node:internal/test_runner/test:1026:19)
          at Test.run (node:internal/test_runner/test:969:12)
          at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
          at async Test.processPendingSubtests (node:internal/test_runner/test:629:7) {
        code: 'ERR_SQLITE_ERROR',
        errcode: 14,
        errstr: 'unable to open database file'
      }
    (node:956) ExperimentalWarning: SQLite is an experimental feature and might change at any time
    (Use `node --trace-warnings ...` to show where the warning was created)
  ...

@aduh95 aduh95 removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. needs-ci PRs that need a full CI run. sqlite Issues and PRs related to the SQLite subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants