Skip to content

windows: downstream hosts re-list rivet runtime sources by hand — the list rots (podlens LNK2001 case) #280

Closed

Description

@turinglambdaai

What happened

PodLens pins rivet at c7f9881 (post-#271) and its Windows host failed to link:

protocol.obj : error LNK2001: unresolved external symbol "bool __cdecl rivet::detail::valid_utf8(unsigned char const *,unsigned __int64)"

Root cause: runtime/src/protocol.cpp now uses valid_utf8 (defined in the newer runtime/src/utf8.cpp), but PodLens's committed windows/RivetHost.vcxproj still vendored the old four-file list (backend.cpp, win32_pipe_transport.cpp, system_services.cpp, protocol.cpp). The canonical list lives only in rivet's own platform/windows/rivet-host.vcxproj (15 ClCompile entries today, vs runtime/CMakeLists.txt's 8 runtime units), and nothing tells downstream hosts when it grows.

Why this will recur

Every new runtime translation unit (there have been three recently: utf8.cpp, x509_spki.cpp, discovery_advertisement.cpp) silently breaks every Windows host that compiles rivet sources into its own vcxproj. The Linux side has the same shape (hosts mirror platform/linux/rivet_linux_sources.cmake), but at least that file is a single include-able artifact; Windows hosts hand-copy <ClCompile> lines.

Proposal

Make the Windows source list machine-consumable so downstream lists can't rot, aligned with #238's packaged-consumption direction:

  1. Ship a platform/windows/rivet-runtime-sources.props (or .targets) defining the authoritative ClCompile set, and have rivet-host.vcxproj import it — so rivet's own build and the published artifact can never disagree.
  2. Document in the platform README that Windows hosts must import the props instead of re-listing sources (same contract as the Linux cmake file).

Until #238 lands prebuilt static libs, this keeps vendored lists from diverging. Happy to send the PR if the shape sounds right.

Activity

  1. turinglambdaai commented on Oct 19, 2026

    @turinglambdaai
    OwnerAuthor

    Landed in #288.

    The shape proposed in this issue is what shipped, with one refinement: the props defaults RivetSourceRoot from MSBuildThisFileDirectory (overridable), so a vendored host does not need RIVET_ROOT in the environment just to evaluate the source list — raco rivet build still supplies it for the rest of the build.

    • platform/windows/rivet-runtime-sources.props is the single author of the <ClCompile> set; rivet-host.vcxproj imports it, so rivet's own build and the published contract cannot disagree.
    • Guard test (rivet/tests/host-package-linkage.rkt) keeps the props in step with runtime/CMakeLists.txt — adding a runtime translation unit without reaching vendored Windows hosts now fails rivet CI instead of a downstream link.
    • platform/windows/README.md documents both consumption contracts (ProjectReference primary, props import transitional).
    • Verified by full MSBuild build of rivet-host.vcxproj (Release x64, NuGet restore included) plus the whole CI suite; merged as e481d31.
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions