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

How can I test the latest version? #398

Open
mahdiar opened this issue Nov 17, 2022 · 17 comments
Open

How can I test the latest version? #398

mahdiar opened this issue Nov 17, 2022 · 17 comments

Comments

@mahdiar
Copy link

mahdiar commented Nov 17, 2022

Hi
Is there anyway to test the latest version?
Is there any roadmap for the final version?

Best Wishes

@tantaman
Copy link
Owner

The repository currently has some link dependencies against https://github.com/vlcn-io/cr-sqlite so you'd have to:

git clone cr-sqlite
cd cr-sqlite
pnpm build
cd ..
git clone strut
cd strut/app
pnpm install
pnpm start

though should do the trick.

Given it's a re-write its still lacking in feature parity.

No roadmap yet, other than in my head. I'll get to writing it down at some point.

@liamengland1
Copy link

liamengland1 commented Nov 17, 2022

That worked (not OP but I wanted to try).

FYI:

I had to add make above line 9: https://github.com/vlcn-io/cr-sqlite/blob/main/js/wasm-esm/crsqlite/build.sh#L9

I had to rename /app/src/components/editor/markdown/plugins/AutolinkPlugin.jsx to AutoLinkPlugin (capital L)

@tantaman
Copy link
Owner

tantaman commented Nov 18, 2022 via email

@tantaman
Copy link
Owner

refactoring the cr-sqlite build I should say. Not too much to the strut build and even less so once cr-sqlite is stable so it can just be served from npm.

@markus-96
Copy link

I do not know if this should be a new issue, but I am also running into issues following your instructions for installing. It also might an issue with bcrypt, I am not that familiar with nodejs..

root@markus-VirtualBox:/var/strut/strut-workspace# make

cd cr-sqlite/core; \

make loadable

make[1]: Verzeichnis „/var/strut/strut-workspace/cr-sqlite/core“ wird betreten

cd ./rs/bundle &&  cargo build  --release --features loadable_extension 

warning: unused variable: `table`

   --> /var/strut/strut-workspace/cr-sqlite/core/rs/core/src/automigrate.rs:431:5

    |

431 |     table: &str,

    |     ^^^^^ help: if this is intentional, prefix it with an underscore: `_table`

    |

    = note: `#[warn(unused_variables)]` on by default



warning: unused variable: `mem_db`

   --> /var/strut/strut-workspace/cr-sqlite/core/rs/core/src/automigrate.rs:433:5

    |

433 |     mem_db: &ManagedConnection,

    |     ^^^^^^ help: if this is intentional, prefix it with an underscore: `_mem_db`



warning: `crsql_core` (lib) generated 2 warnings (run `cargo fix --lib -p crsql_core` to apply 2 suggestions)

warning: unused import: `core::alloc::GlobalAlloc`

  --> src/lib.rs:20:5

   |

20 | use core::alloc::GlobalAlloc;

   |     ^^^^^^^^^^^^^^^^^^^^^^^^

   |

   = note: `#[warn(unused_imports)]` on by default



warning: `crsql_bundle` (lib) generated 1 warning (run `cargo fix --lib -p crsql_bundle` to apply 1 suggestion)

    Finished release [optimized] target(s) in 0.02s

cp ./rs/bundle/target/release/libcrsql_bundle.a ./dist/libcrsql_bundle-loadable.a

gcc -O2 -I./src/ -I./src/sqlite \

-std=c99 -fPIC -shared -Wall \

 \

src/crsqlite.c src/util.c src/tableinfo.c src/triggers.c src/changes-vtab.c src/changes-vtab-read.c src/changes-vtab-common.c src/changes-vtab-write.c src/ext-data.c src/get-table.c src/seen-peers.c ./dist/libcrsql_bundle-loadable.a -o dist/crsqlite.so

src/crsqlite.c: In function ‘crsqlBeginAlterFunc’:

src/crsqlite.c:423:15: warning: variable ‘schemaName’ set but not used [-Wunused-but-set-variable]

  423 |   const char *schemaName = 0;

      |               ^~~~~~~~~~

make[1]: Verzeichnis „/var/strut/strut-workspace/cr-sqlite/core“ wird verlassen

git submodule update --init --recursive

git submodule update --init --recursive

pnpm install

 WARN  Unsupported engine: wanted: {"node":">=19"} (current: {"node":"v18.16.0","pnpm":"8.3.0"})

Scope: all 61 workspace projects

strut/server                             |  WARN  deprecated [email protected]

model-js/ts/connectors/sqlite3-connector |  WARN  deprecated @npmcli/[email protected]

strut/app                                |  WARN  deprecated [email protected]

strut/app                                |  WARN  deprecated [email protected]

strut/app                                |  WARN  deprecated [email protected]

strut/app                                |  WARN  deprecated [email protected]

strut/deps/access-token-jwt              |  WARN  deprecated [email protected]

Packages: +1565

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Progress: resolved 1610, reused 1562, downloaded 0, added 0, done

node_modules/.pnpm/[email protected]/node_modules/core-js: Running postinstall script, done in 153ms

node_modules/.pnpm/[email protected]/node_modules/better-sqlite3: Running install script...

node_modules/.pnpm/[email protected]/node_modules/bcrypt: Running install script, failed in 273ms

.../[email protected]/node_modules/bcrypt install$ node-pre-gyp install --fallback-to-build

└─ Failed in 273ms at /var/strut/strut-workspace/node_modules/.pnpm/[email protected]/node_modules/bcrypt

 ELIFECYCLE  Command failed with exit code 1.

make: *** [Makefile:10: node_modules] Fehler 1

@tantaman
Copy link
Owner

 WARN  Unsupported engine: wanted: {"node":">=19"} (current: {"node":"v18.16.0","pnpm":"8.3.0"})

Could you try again with node 19? Or not possible to upgrade?

@markus-96
Copy link

Still the same issue:

strut/deps/access-token-jwt              |  WARN  Unsupported engine: wanted: {"node":"^12.19.0 || ^14.15.0 || ^16.13.0 || ^18.12.0"} (current: {"node":"v19.9.0","pnpm":"8.3.0"})
Scope: all 61 workspace projects
strut/server                             |  WARN  deprecated [email protected]
model-js/ts/connectors/sqlite3-connector |  WARN  deprecated @npmcli/[email protected]
strut/app                                |  WARN  deprecated [email protected]
strut/app                                |  WARN  deprecated [email protected]
strut/app                                |  WARN  deprecated [email protected]
strut/app                                |  WARN  deprecated [email protected]
strut/deps/access-token-jwt              |  WARN  deprecated [email protected]
Packages: +1565
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 1610, reused 1562, downloaded 0, added 0, done
node_modules/.pnpm/[email protected]/node_modules/browser-tabs-lock: Running postinstall script, done in 200ms
node_modules/.pnpm/[email protected]/node_modules/core-js: Running postinstall script, done in 178ms
node_modules/.pnpm/[email protected]/node_modules/bcrypt: Running install script, failed in 312ms
.../[email protected]/node_modules/bcrypt install$ node-pre-gyp install --fallback-to-build
└─ Failed in 312ms at /var/strut/strut-workspace/node_modules/.pnpm/[email protected]/node_modules/bcrypt
node_modules/.pnpm/[email protected]/node_modules/better-sqlite3: Running install script...
 ELIFECYCLE  Command failed with exit code 1.
make: *** [Makefile:10: node_modules] Fehler 1

@tantaman
Copy link
Owner

tantaman commented Apr 19, 2023

Looks like it is an issue installing better-sqlite3.

That component is technically only needed for the server side rather than the client. You could remove the server package from pnpm-workspace.yaml to unblock you for the time being.

I'm about to push an update the simplifies things quite a bit (no more need for the giant workspace checkout).

Also, since it seems like a better-sqlite3 issue, what happens if you create a new project and try only installing that package?

@tantaman
Copy link
Owner

Ok, things should be much simpler to checkout and build now. Updated instructions in the readme.

This likely will not resolve the better-sqlite3 / bcrypt issue, however. lmk if you still have an issue with that dependency and we can look into why.

MohannadNaj added a commit to mohannadnaj-archive/Strut that referenced this issue Apr 20, 2023
Following up on tantaman#398 and @markus .. just a missing git clone with-submodules flag. in my machine, everything else worked like a charm 🥳 (auth0 ✔ hot reload ✔ ... ✔️)
@makefu
Copy link

makefu commented Apr 26, 2023

hey! anyone got at least the dockerfile running?
removing the "pnpm fetch" "--offline" from "pnpm install" got the container building at least, however after starting i get:
A1EFCD35673DAA4FC3560685: cannot acquire lease or find primary, retrying: fetch primary url: Get "http://127.0.0.1:8500/v1/kv/litefs": dial tcp 127.0.0.1:8500: connect: connection refused

@tantaman
Copy link
Owner

Ah, I haven't kept the docker file up to date. The build instructions in the readme should work on all platforms.

Will update the docker.

@makefu
Copy link

makefu commented Apr 28, 2023

okay, thanks for the response!

@tantaman
Copy link
Owner

tantaman commented May 2, 2023

okay, thanks for the response!

an update on this -- finishing up a nextjs integration for cr-sqlite. Once that is done, Strut will be NextJS based and built & launched via a single command.

@makefu
Copy link

makefu commented May 7, 2023

sounds awesome! looking forward to testing it!

@tantaman
Copy link
Owner

Have a pretty solid vite scaffolding together that includes a sync server + automatic migrations (https://github.com/vlcn-io/vite-starter)

Working on porting Strut over to that.

The original plan was NextJS but webpack is a bit in the stone age and missing require features, hence the pivot to Vite.

@oleteacher
Copy link
Contributor

@tantaman Your Vite project is very intriguing, be perfect for a classroom environment. Following...

@tantaman
Copy link
Owner

tantaman commented May 22, 2023

Everything should be good to go now.

strut.mov

Fixing some server bugs with respect to schema migrations next but the UI works fine.

note that the UI doesn't have feature parity with the original version. Only text components are available at the moment.

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

No branches or pull requests

6 participants