The build target node_lib in BUILD.gn uses defines that are defined in the target itself and in the config node_lib_config. The target inspector in src/inspector/BUILD.gn shares some of these defines, but not all.
That can cause the node::Environment object as defined in env.h to have different layout in src/inspector/tracing_agent.cc than in the rest of Node.js. This could cause worker tests to fail.
See https://gist.github.com/hashseed/8ee8fe7a5c491cff13c62292ae298fcc and https://github.com/hashseed/gn-node
The right way would be to move all defines into node_lib_config and use that both in the node_lib and the inspector targets.
Here is the example fix in my fork of the GN files: hashseed/gn-node@d4cf240
The build target
node_libinBUILD.gnuses defines that are defined in the target itself and in the confignode_lib_config. The targetinspectorinsrc/inspector/BUILD.gnshares some of these defines, but not all.That can cause the
node::Environmentobject as defined inenv.hto have different layout insrc/inspector/tracing_agent.ccthan in the rest of Node.js. This could cause worker tests to fail.See https://gist.github.com/hashseed/8ee8fe7a5c491cff13c62292ae298fcc and https://github.com/hashseed/gn-node
The right way would be to move all defines into
node_lib_configand use that both in thenode_liband theinspectortargets.Here is the example fix in my fork of the GN files: hashseed/gn-node@d4cf240