Closed thegecko closed 4 years ago
cc @jonahgraham
Oops, I guess that my dependent projects all had cross spawn as direct deps, or some other project did. (ohhh, I miss OSGi!)
Yes cross spawn is needed, otherwise the native libraries don't get built. The install.js script sits between yarn install and node-gyp rebuild so that we don't needlessly try to compile natives on Mac and windows where the native library was a no-op.
Ah, in that case I'd recommend using the built-in node spawn instead of adding another production dependency.
From the readme, it looks like cross-spawn
only fixes issues on Windows, but in this case we are only using it on Linux :)
I have pushed a temporary tag so I can test out the flowing flow:
yarn init
yarn install
yarn add cdt-gdb-adapter@bug149
The above (but using @next) is failing, and on Linux it is passing again. Need to try on Windows.
See PR #150
I followed your advice and dropped cross-spawn. I tested on Linux & Windows using the same flow and it is fixed there too. I don't have a Mac, so @thegecko please reopen if it isn't working as expected there.
FIxed in 5638382 and published
All works well on Mac, thanks for the fix
The recent addition of an install script has broken the ability for the adapter to be used as a dependency.
This is because
yarn install
is automatically called when used as a dependency, but thecross-spawn
dependency only exists as a dev-dependency, so isn't found.If the install script needs to be run even when this package is in production, then
cross-spawn
needs to be changed to be a full dependency.If this is only used in development, I recommend the
install
script is renamed so it isn't run automatically or some other mechanism is used to determine production andcross-spawn
isn't always required.