node icon indicating copy to clipboard operation
node copied to clipboard

src: remove node namespace from sqlite.cc

Open JonasBa opened this issue 1 year ago β€’ 17 comments

Remove unnecessary use of node namespace from node_sqlite.cc

JonasBa avatar Aug 22 '24 14:08 JonasBa

CI: https://ci.nodejs.org/job/node-test-pull-request/61349/

nodejs-github-bot avatar Aug 22 '24 15:08 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/61352/

nodejs-github-bot avatar Aug 22 '24 16:08 nodejs-github-bot

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 954 commits behind head on main.

Files with missing lines Patch % Lines
src/node_sqlite.cc 78.78% 4 Missing and 3 partials :warning:
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%) :arrow_down:

... and 136 files with indirect coverage changes

codecov[bot] avatar Aug 22 '24 17:08 codecov[bot]

@JonasBa can you run the cpp formatter?

anonrig avatar Aug 22 '24 22:08 anonrig

CI: https://ci.nodejs.org/job/node-test-pull-request/61399/

nodejs-github-bot avatar Aug 24 '24 01:08 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/61431/

nodejs-github-bot avatar Aug 25 '24 00:08 nodejs-github-bot

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

jasnell avatar Sep 08 '24 03:09 jasnell

This needs a rebase to resolve conflicts.

lpinca avatar Sep 14 '24 14:09 lpinca

@lpinca @jasnell rebased the PR.

JonasBa avatar Sep 20 '24 14:09 JonasBa

CI: https://ci.nodejs.org/job/node-test-pull-request/62607/

nodejs-github-bot avatar Sep 20 '24 14:09 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/62614/

nodejs-github-bot avatar Sep 21 '24 01:09 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/62639/

nodejs-github-bot avatar Sep 21 '24 16:09 nodejs-github-bot

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 avatar Sep 24 '24 20:09 aduh95

Can you fix the linting error?

anonrig avatar Sep 27 '24 01:09 anonrig

Can you fix the linting error?

Yes, I'm sorry, still trying to build the muscle to run the linter and formatters πŸ˜…

JonasBa avatar Sep 27 '24 15:09 JonasBa

CI: https://ci.nodejs.org/job/node-test-pull-request/62811/

nodejs-github-bot avatar Sep 27 '24 23:09 nodejs-github-bot

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 avatar Sep 28 '24 13:09 aduh95

@JonasBa do you still want to pursue this? I think at this point all of the changes from this PR have already landed with the exception of the string_view change.

cjihrig avatar Jan 29 '25 20:01 cjihrig

@cjihrig I will close it as the changes from the original intent have landed, thanks for the ping!

JonasBa avatar Jan 30 '25 16:01 JonasBa