8000 Generate centralized Boost.Serialization registrations for Python wrappers · Issue #211 · borglab/wrap · GitHub
[go: up one dir, main page]

Skip to content

Generate centralized Boost.Serialization registrations for Python wrappers #211

Open

Description

@dellaert

Context

borglab/gtsam#2853 fixes Python factor serialization that could fail with RuntimeError: unregistered class or depend on whether gtsam or gtsam_unstable was imported first. The PR shares Boost export-key declarations across binding translation units while retaining each extension's export implementations. The shared header currently lists 19 noise-model and robust-estimator types manually, which must remain synchronized with linear.i and the unstable export list.

In Fan's approving review, he asked to keep an open bug and revisit whether wrap should generate a centralized serialization library instead of maintaining this binding-side workaround.

Follow-up

Investigate generating the required Boost.Serialization registrations from wrap in a centralized, consistently included place, so each binding translation unit sees the export keys before serialization is instantiated without duplicate key specializations. If a centralized library is the right design, migrate the manual declarations in gtsam#2853 to generated output and remove the synchronization burden.

Preserve existing archive identifiers and stable/unstable Python serialization behavior, including stable-only loading and both extension import orders. Keep Python-specific registration choices out of public GTSAM headers unless compatibility with existing C++ archive registrations is addressed. Add or retain regression coverage for those cases.

This is follow-up design work; gtsam#2853 is the immediate bug fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0