Skip to content

Move cxx to the 51degrees-cxx release 4.5.105 - #55

Merged
jwrosewell merged 7 commits into
rcfrom
uptake/cxx-865cee97
Nov 11, 2026
Merged

jwrosewell merged 7 commits into
rcfrom
uptake/cxx-865cee97

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Moves the cxx submodule to 7c4ac436, the second 51degrees-cxx release of 11 November 2026, which 51degrees-cxx#150 merged into main at 15:05 UTC. The publish workflow has tagged it 4.5.105, and git/matching-refs/tags/4.5.105 gives 7c4ac436e47cd15beed304cad2b8151d50a1efd1, so the submodule is at the tagged commit. rc at 5228a9f9 is merged into this branch.

Head 657b13b. Against rc the draft changes two things, the cxx pointer and four lines of ip-intelligence/fiftyone.ipintelligence.onpremise/ipi_node_wrap.cxx.

cxx taken

rc builds against c6d4e4d9, the 10 November release, which the automated Update submodules pull request #67 moved it to. 7c4ac436 is one commit after c6d4e4d9 and brings in three 51degrees-cxx pull requests.

  • #148 keeps the first data file's property names, sorted by name, across every reload of an engine created with no names, so a property's index names the same property after a reload. A property that only a later data file has reads as unavailable, by index or by name, until the engine is created again, and its metadata reports it as not available.
  • #147 makes the C and C++ IP Intelligence examples read _51DEGREES_IPI_PATH. Node does not build those examples.
  • #149 merges main back into rc with no change to the tree.

The specification for the first change is Finding Properties at 927ac677, merged from specifications#137.

An Engine created with no names takes as its names those of every Property of the first data file it loads, sorted by name, which is the order of that data set's list of available Properties. It keeps them across every data refresh, so its positions are fixed too. The native code does this.

A Property that only a later data file has gets no position until the Engine is created again, so a read of it, by position or by name, gives no value, with the invalid Property reason.

Node reads every on-premise value by name, which #68 kept because its native tests found the read by index slower in Node, for a cause in the SWIG wrapper overloads. So there is no read by index here for an engine built with no names to take up, and the reads by name get the behaviour above from the native code.

Wrappers

Node's interface files hash_node.i and ipi_node.i include only cxx/src/dd/hash/hash.i and cxx/src/ipi/ipi.i and their own node_before.i and node_after.i. The cxx .i files declare every class SWIG wraps, and the headers are only copied into the wrappers from %{ %} blocks, so SWIG reads no header. git diff 865cee97 7c4ac436 -- '*.i' in 51degrees-cxx gives the same one change as git diff c6d4e4d9 7c4ac436 -- '*.i', two lines of a // comment above copyValueAsUTF8String in src/ipi/ResultsIpi.i lines 115 and 116. SWIG does not copy a // comment into a wrapper, so nothing SWIG emits changes between those commits and the wrappers are not generated again.

The committed wrappers are the ones this draft generated on runners with SWIG 4.5.0 built from the 51Degrees fork at node-24-holder-this, commit 48753552ee7d0e0f886f9d624f761a501ce70b64, using the commands in the README.

  • With cxx at 865cee97 (run 42672708496), hash_node_wrap.cxx came out byte for byte the same and ipi_node_wrap.cxx changed in four lines, as cxx#122 limits the %newobject features to MetaData. The ConfigIpiSwig getters for components, properties, values and profiles return references the configuration owns, so they no longer pass ownership to JavaScript.
  • With cxx at b4f769ad (run 42783277602) and at cfad8978 (run 42795544973), the same commands reproduced both committed wrappers byte for byte.

The four lines differ from rc because the wrapper on rc was last generated for 51degrees-cxx 4.5.101 (a93c89e), before #122, and #67 moved cxx on without generating it again. git diff 4.5.101 c6d4e4d9 -- src/common/MetaData.i in 51degrees-cxx shows the scoped %newobject lines.

Tests

This draft moves a submodule and carries a generated wrapper, and changes no Node code, so there is no new Node behaviour to show failing and then passing, and it adds no test. Node's on-premise test folders, device-detection/fiftyone.devicedetection.onpremise/tests and ip-intelligence/fiftyone.ipintelligence.onpremise/tests, hold no test that reloads an engine, so the behaviour #148 brings is not tested from Node. It is pinned in 51degrees-cxx at 7c4ac436, by HashPositionsReloadTests.NothingNamed_SmallThenLarge and C_NothingNamed_SmallThenLarge in test/dd/hash/HashPositionsTests.cpp lines 530 and 576, IpiPositionsReloadTests.NothingNamed_SmallThenLarge in test/ipi/IpiPositionsTests.cpp line 560, and the *_NothingNamed_KeepsPositions tests in test/ipi/IpiPropertyNamesTests.cpp line 522.

Full build

Run 43048185252 on tmp/pr-matrix-55, started by tools/pr-matrix.py without macOS. All 7 Setting 'PullRequestSha' lines give this head, 657b13b, and Configure printed "Left out 2 macOS entries". Every job passed, being Ubuntu_Node_22, Ubuntu_Node_24, Ubuntu_ARM_Node_22, Ubuntu_ARM_Node_24, Windows_Node_22 and Windows_Node_24.

macOS was left out of this draft's full build under the 9 November decision. The rc head is built with macOS before it merges into main.

Remaining

  • Node reads by name where the specification says every read MUST use the position, for the reason Compare property names ignoring case, in the restricted list and in every read #68 gives. Its body lists the two ways to bring the read by index back, both needing the wrappers generated again, which is James's decision for next week.
  • Node 26 (#10) is not in this draft. Ubuntu_ARM_Node_26 failed to compile hash_node_wrap.cxx against the Node 26.13.0 headers in run 42675272902, as GetAlignedPointerFromInternalField, SetAlignedPointerInInternalField, WriteUtf8 and Utf8Length changed in V8 14. That needs a change in the SWIG fork and the wrappers generated again.

Generated with SWIG 4.5.0 built from https://github.com/51Degrees/swig.git
at refs/heads/node-24-holder-this, commit
48753552ee7d0e0f886f9d624f761a501ce70b64, using the commands in the README
with cxx at 865cee97432d8b7b047223b82c64fc31a489735f. The Device Detection
wrapper is unchanged. The IP Intelligence wrapper no longer gives the
caller ownership of the collection configuration that the getters return.
@jwrosewell
jwrosewell force-pushed the uptake/cxx-865cee97 branch 3 times, most recently from 6fe8fc9 to dcf0a00 Compare November 9, 2026 19:40
@jwrosewell jwrosewell changed the title Move cxx to 865cee97 and build on Node 26 Move cxx to 865cee97 and generate the wrappers again Nov 9, 2026
Takes the eight 51degrees-cxx pull requests merged into rc after 865cee97, among them the rename of src/common/Date.cpp to date_pp.cpp so it no longer clashes with date.c on a case-insensitive file system.
@jwrosewell jwrosewell changed the title Move cxx to 865cee97 and generate the wrappers again Move cxx to the 51degrees-cxx rc commit b4f769ad and generate the wrappers again Nov 10, 2026
Takes 51degrees-cxx #130, which writes the text of each IP Intelligence value with its weight in C, and #146, which gives a reason and a message when a property has no value in the matched results.
@jwrosewell jwrosewell changed the title Move cxx to the 51degrees-cxx rc commit b4f769ad and generate the wrappers again Move cxx to the 51degrees-cxx rc commit cfad8978 and generate the wrappers again Nov 10, 2026
@jwrosewell jwrosewell changed the title Move cxx to the 51degrees-cxx rc commit cfad8978 and generate the wrappers again Move cxx to the 51degrees-cxx release commit 7c4ac436 Nov 11, 2026
@jwrosewell
jwrosewell marked this pull request as ready for review November 11, 2026 18:05
@jwrosewell
jwrosewell merged commit 8093efa into rc Nov 11, 2026
2 checks passed
@jwrosewell
jwrosewell deleted the uptake/cxx-865cee97 branch November 11, 2026 18:05
@jwrosewell jwrosewell changed the title Move cxx to the 51degrees-cxx release commit 7c4ac436 Move cxx to the 51degrees-cxx release 4.5.105 Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant