sql-js / sql.js

A javascript library to run SQLite on the web.
http://sql.js.org
Other
12.41k stars 1.06k forks source link

CONTRIBUTING.md Guide Lacking "make" Instruction #504

Open psychemedia opened 2 years ago

psychemedia commented 2 years ago

As a non-developer wanting to add FTS-5 support to my own build, I followed the instructions in https://github.com/sql-js/sql.js/blob/master/CONTRIBUTING.md and noted that:

Is there any particular reason why there is no explicit instruction to run make? This would be useful for folk who aren't developers but who may want to make use of a sql.js build with some custom sqlite extensions if there are exact and complete instructions available to do so. (The containerised build really helps in that respect.)

twoxfh commented 2 years ago

As a non-developer wanting to add FTS-5 support to my own build, I followed the instructions in https://github.com/sql-js/sql.js/blob/master/CONTRIBUTING.md and noted that:

  • step 6 of the Containerized Development Environment (Recommended) section ("Run $ npm test to ensure all tests pass") fails;
  • there is no explicit mention of running make to actually build the distribution assets.

Is there any particular reason why there is no explicit instruction to run make? This would be useful for folk who aren't developers but who may want to make use of a sql.js build with some custom sqlite extensions if there are exact and complete instructions available to do so. (The containerised build really helps in that respect.)

The documentation refers to npm commands which are defined in the package.json file in the root directory which is common for npm modules. The npm commands can contain one or more system commands to perform the action. Make is performed when using npm run build and npm run rebuild. Hope this helps.

psychemedia commented 2 years ago

Thanks, that's what I expected, but I used the dev container and ran the npm commands and the build didn't happen? But it did when I ran make?

johncardiologs commented 1 year ago

This sounds a little bit like my first experience building sql.js here: https://github.com/sql-js/sql.js/issues/526

Perhaps the instructions should clarify that an initial npm run rebuild (i.e. make) is needed!

llimllib commented 1 year ago

oddly, npm rebuild managed to not run make for me - even though I can't figure out exactly why

$ npm rebuild
rebuilt dependencies successfully

then,

$ npm test

> sql.js@1.7.0 test
> npm run lint && npm run test-asm && npm run test-asm-debug && npm run test-wasm && npm run test-wasm-debug && npm run test-asm-memory-growth
...snip...
Error: Cannot find module '../dist/sql-asm.js'

After that I ran make myself, and everything started working