Hi all, is anyone using pact-js v9.18.1 with custo...
# pact-js
n
Hi all, is anyone using pact-js v9.18.1 with custom binaries? I’m trying to use the straight ruby gems instead of the standalone binaries to workaround the architecture limitations with travelling Ruby (yes, I know v10 uses the new Rust standalone, there are other things preventing us from making that change at the moment). I use
PACT_SKIP_BINARY_INSTALL=true
and point npm config
pact_binary_location
(via environment variable,
NPM_CONFIG_PACT_BINARY_LOCATION
to the folder with the executables, but it still doesn’t seem to be finding them. Anyone else have this working successfully?
t
I… don’t think this will work
It needs the binaries, which are made with travelling Ruby
I don’t think there’s a way to get these binaries directly with the gems
but hey, I know the answer to your question
NPM_CONFIG_PACT_BINARY_LOCATION
^ This gives pact a custom location to download the binaries from
PACT_SKIP_BINARY_INSTALL=true
^ This tells pact not to download the binaries. Don’t set it if you want to provide custom binaries.
Let us know if you get it working!
anyone using pact-js v9.18.1 with custom binaries?
I’m not a maintainer any more, but I’ve not heard of anyone trying this
m
Yes we don't support this Nick, but we could. Given it's the old 9.x.x line, we're not actively investing in new features but would happily accept a PR for it
The issue is the current config option supports a custom location of the compressed archive, but paths to the binaries. We could potentially make it discover the binaries elsewhere
n
Thanks for responding folks. I was able to work around it by jerry-rigging our Dockerfiles to link the scripts installed by the gem into the expected location after npm install, that will work for now. We’re evaluating moving to v10 but we are trying to keep the tooling consistent across our stack and we aren’t quite comfortable enough just yet to pull the trigger on moving to v2 on our Go apps.
👍 1
The other alternative I looked at was packaging up those same scripts similar to how the stand-alone are packaged and then using the config option, but this ultimately got us there faster and without having to create a new artifact.
👍 2
t
You should be able to generate the older pact version with pact-js v10
☝️ 1