Got Alpine and Pact-JS playing ball last night, af...
# maintainers
y
Got Alpine and Pact-JS playing ball last night, after the new release of pact 0.4.15 with musl based variants. What is really bizarre though, is I initially linked it to the
.a
file, and we get a
musl
prebuild. I assumed it was linked to the
.a
file, but actually it is quite happy with the
.so
file which is non-musl, as long as it has a
musl
based prebuilt node file. head splode
🤔 1
m
Interesting. I'm wondering if the archive is embedded in the node file
y
that is plausible
Copy code
du -sh js/prebuilds/linux-arm64/node.napi.musl.node 
 46M    js/prebuilds/linux-arm64/node.napi.musl.node
prebuilds are here that contain the musl flavoured node prebuild https://github.com/YOU54F/pact-js-core/releases/tag/v15.0.0 you can unpack the archive into the root of a js project, or anywhere and set the
PACT_PREBUILD_LOCATION
to use it with a released version of pact-js
👍 1
m
Yeah,
.a
files don’t get linked at runtime, they are compiled into (statically linked) the artifact itself
You can test it working by removing the .so file in your musl tests. If there is no dynamic library on the system and it works, you know the
.node
file has everything it needs
y
Yep it is embedded and it’s all you need 🙌, managed to build the mock and stub server, verifier, plugin cli, and protobuf plugin linked against musl, and get a pact js grpc test working in Alpine For the vanilla tests in pact-js-core tested against alpine 3.13 -> 3.19, and from node 14 -> 20 (despite our node engines locking at 16 - 14 throws a warning) plugin driver and cli need updating to detect musl and try and install those variants. interesting wee meander
🎉 1
m
Awesome work sir!
y
Managed to get it rocking in pact-go, pact-php and ruby, woop woop
🎉 1
nice 7771 1