You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a scripts inside ./npm that generates npm packages published on npm that allow for easier installation of tailcall cli on different systems.
Describe the bug
npm/post-install.js doesn't work as expected due to usage of the result of async call inside sync code. So, the final name of the package is wrong and no package is installed actually. The script came from Rewrite npm publish #607
on linux despite system's libc both gnu and musl versions are installed (i.e. twice of required space is occupied) and I can't run "tc" command probably due to the naming clash. The script from above in theory should fix the problem on linux but it's actually does nothing. At least on linux, on other os I expect optionalDependencies should work
Expected behavior
The easiest way to fix this would be using libc field as it is should be supported by npm and other package managers. At least swc uses this approach
After that the postinstall script could be removed.
The main concern would be only compatibility with legacy versions of npm and other package managers
Testing published packages
We want to make sure that everything will work as expected and we won't face new problems with that. To do that we may want to implement tests for published packages in ci.
The implementation could look like this:
for main target systems (windows, macos, unix-glibc, unix-musl) run test job
use local registry as verdaccio to run local registry in ci
publish npm packages in local registry (may require changing publish script to specify registry)
create temporary dir
install @tailcallhq/tailcall from running local registry
make sure that commands tc --version works
also show the output of npm ls -a to verify that only required packages are installed
The text was updated successfully, but these errors were encountered:
Thank you, that looks good. I think now we need to verify that everything works on different platforms. I've updated the issue description with ci testing description. Would you mind giving a try to implement this as well?
Prerequisites
We have a scripts inside
./npm
that generates npm packages published on npm that allow for easier installation of tailcall cli on different systems.Describe the bug
npm/post-install.js
doesn't work as expected due to usage of the result of async call inside sync code. So, the final name of the package is wrong and no package is installed actually. The script came from Rewrite npm publish #607Expected behavior
The easiest way to fix this would be using
libc
field as it is should be supported by npm and other package managers. At least swc uses this approachAfter that the postinstall script could be removed.
The main concern would be only compatibility with legacy versions of npm and other package managers
Testing published packages
We want to make sure that everything will work as expected and we won't face new problems with that. To do that we may want to implement tests for published packages in ci.
The implementation could look like this:
@tailcallhq/tailcall
from running local registrytc --version
worksnpm ls -a
to verify that only required packages are installedThe text was updated successfully, but these errors were encountered: