Pinning Python to 2.7 is not working anymore since GitHub dropped support for Python 2.7. We originally pinned it to avoid an issue where node-gyp fails when combined with Python 3.x during npm install. The reasons for this failure are:
d3 depends either directly or transitively on contextify, a really old library that needs native code from V8 to install.
contextify builds native code via node-gyp.
The version of node-gyp used does not play well with Python 3.x.
A proper path forward would be to update and modernize the entire JavaScript stack used in parseq-tracevis -- which is a non-trivial amount of work.
As a workaround, we can use a pre-built version of d3. A local copy of d3 v3.x has been added to the local repository, and the dependency on d3 has been removed from package.json. Doing this avoids the need for building native code, and thus the need for node-gyp. This allows us to build using Python 3.x because now there is no conflict.
Testing Done
./gradlew build runs, all tests and integration tests passing.
Tested locally with a complex set of trace data. The waterfall and table views are working. I did not test the Graphviz view but it should be unaffected by this change since no JS code was modified.
Summary
Pinning Python to 2.7 is not working anymore since GitHub dropped support for Python 2.7. We originally pinned it to avoid an issue where
node-gyp
fails when combined with Python 3.x duringnpm install
. The reasons for this failure are:d3
depends either directly or transitively oncontextify
, a really old library that needs native code from V8 to install.contextify
builds native code vianode-gyp
.node-gyp
used does not play well with Python 3.x.A proper path forward would be to update and modernize the entire JavaScript stack used in
parseq-tracevis
-- which is a non-trivial amount of work.As a workaround, we can use a pre-built version of
d3
. A local copy ofd3
v3.x has been added to the local repository, and the dependency ond3
has been removed frompackage.json
. Doing this avoids the need for building native code, and thus the need fornode-gyp
. This allows us to build using Python 3.x because now there is no conflict.Testing Done
./gradlew build
runs, all tests and integration tests passing.