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

Pre-built custom sql.js for sqliteviz #62

Merged
merged 12 commits into from
Jul 3, 2021
Merged

Pre-built custom sql.js for sqliteviz #62

merged 12 commits into from
Jul 3, 2021

Conversation

saaj
Copy link
Contributor

@saaj saaj commented Jun 27, 2021

Motivation

To be able provide sqliteviz builds with fresh SQLite, and incorporate valuable SQLite "own" and 3rd party extensions, this PR proposes Docker-based scripts to build WASM sql.js.

To avoid requiring build dependencies for every potential contributor, commit built sql-wasm.js and sql-wasm.wasm in the repo.

Extensions

Included/enabled extensions are documented in lib/sql-js/README.md.

To do

  • Replace Makefile with something comprehensible
  • npm run build fails first time (2nd attempt works) with cryptic:
    ERROR  Failed to compile with 0 errors                                                    
    ERROR  Build failed with errors.
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] build: `NODE_OPTIONS=--max_old_space_size=4096 vue-cli-service build`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the [email protected] build script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
  • Add all extensions listed in lib/sql-js/README.md.
  • Add simple SQL tests for each extension.
  • Add issue for exposing added extensions in the app info dialogue.
  • Decide what downloads (if any) go to Dockerfile and what go to (replacement for) Makefile

Reference

Statically built auto-registered SQLite extensions:

@saaj
Copy link
Contributor Author

saaj commented Jul 3, 2021

There are a few bug reports about first build run failing and second succeeding for vue-cli-service. Here, vuejs/vue-cli#5399, it boils down to ESLint triggering in the build in wrong order or something like that. Worked around with lintOnSave: process.env.NODE_ENV === 'development' as described in related StackOverfow answer.

@saaj saaj marked this pull request as ready for review July 3, 2021 13:25
@lana-k lana-k merged commit 3a6628c into lana-k:master Jul 3, 2021
@lana-k lana-k linked an issue Jul 3, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFE] Custom sql.js build with newer SQLite and a few extensions
2 participants