Skip to content
This repository was archived by the owner on Nov 3, 2026. It is now read-only.

Keep the Transform class public - #932

Merged
Automation51D merged 1 commit into
mainfrom
fix/transform-public
Nov 1, 2026
Merged

Automation51D merged 1 commit into
mainfrom
fix/transform-public

Conversation

@jwrosewell

Copy link
Copy Markdown
Contributor

Transform went internal in 4.5.136, when #831 made the SWIG types internal. A caller that uses Transform directly, to turn high entropy values or structured User-Agent evidence into headers, cannot compile against any package after 4.5.125 until it is public again.

What changes

  • hash_csharp.i keeps Transform public through a csclassmodifiers typemap.
  • Interop/Swig/Transform.cs matches what SWIG then generates, which is one word on one line.

This is the first commit of #912 by James Rogers, on its own, with its message and code comment reworded. The second commit of #912 pins the native code to a branch of device-detection-cxx#427, which closed when that work moved to 51degrees-cxx#20. There is no merged commit to re-point it at, as the review of #912 asked, so the native work reaches this package through the cxx submodule instead.

Version

This widens one class back to what it was in 4.5.125 and ships as the next patch. There is no +semver directive in the commit or here.

What was checked

SWIG 4.3.0 was run over hash_csharp.i with and without the new line, against the 51degrees-cxx layout. Both runs finish with no error. Without the line Transform is internal, as on main. With the line Transform is public, and the other 35 generated classes keep the visibility they had.

The methods on Transform return MapStringStringSwig, which is already public, so a public Transform does not expose a less visible type.

Not done

This has not been built or tested. The pull request build runs the tests when this is marked ready. If this has not merged when the .NET repositories move to their monorepo on 2 November, the two lines have to move with them, because the typemap lives in this repository's hash_csharp.i.

Transform went internal with the other SWIG types in 4.5.136, which stops a
caller that uses it directly from moving past 4.5.125. This widens that one
class back. The other generated types keep the visibility they have.
@jwrosewell
jwrosewell marked this pull request as ready for review October 31, 2026 22:18
@Automation51D
Automation51D merged commit aeaa02d into main Nov 1, 2026
1 check passed
@Automation51D
Automation51D deleted the fix/transform-public branch November 1, 2026 04:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants