weaver icon indicating copy to clipboard operation
weaver copied to clipboard

Publish Weaver crates to crates.io

Open drewrelmas opened this issue 3 weeks ago • 2 comments

Use case

The motivation for this request is to consume Weaver from crates.io in OpenTelemetry Arrow, specifically its rust/otap-dataflow workspace.

otel-arrow already uses Weaver libraries for semantic convention loading, resolution, and generation. It currently pins five crates to a Weaver Git revision (v0.28.0): weaver_common, weaver_forge, weaver_resolved_schema, weaver_resolver, and weaver_semconv.

We would like to replace these Git pins in otel-arrow with normal versioned crates.io dependencies. This would also remove the Weaver Git dependencies as an obstacle to publishing otel-arrow crates that consume them, since crates.io does not accept Git dependencies.

Request

Would the maintainers support publishing this subset of reusable Weaver crates as part of releases? It looks like we would need weaver_diff and weaver_version as well, so the initial publication would cover seven crates total.

Current blockers

Looking at revision 0c38ab0e, there are no remaining Git dependencies in Weaver's manifests or lockfiles. The publication blockers appear to be:

  • All seven crates inherit publish = false.
  • Internal path dependencies lack version requirements, which prevents packaging for crates.io.
  • weaver_forge embeds defaults/jq/semconv.jq from outside its crate directory; the published package needs to contain that asset.
  • The crates lack package descriptions.

None of these seven crate names currently has a published package on crates.io. A dependency-first publication order would be:

weaver_common + weaver_diff
  -> weaver_semconv
  -> weaver_version
  -> weaver_resolved_schema
  -> weaver_resolver
  -> weaver_forge

Additional context

In otel-arrow, we've set up a two-stage release process implemented in its Prepare Release and Push Release workflows:

Prepare versions, changelog, and publish plan
  -> Review and merge release PR
  -> Preflight crates.io publication
  -> Publish crates using trusted publishing
  -> Create release tags and GitHub releases

We can help adapt similar mechanisms for the Weaver crates.


Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

drewrelmas avatar Nov 10 '26 16:11 drewrelmas

@jsuereth when you have a moment, I’d love to go through this in more detail and see where I can help. We started talking about it, and I remember you’d explored a few options, but the details are a little fuzzy in my mind.

lquerel avatar Nov 11 '26 14:11 lquerel

TL;DR; we've only cared about stability of the binary and we're planning to take that to 1.0 soon - which would mark our crates 1.0 and we are NOT ready for them to be considered stable.

The larger issue with our crates:

  • The interfaces are all a bit awkward - there's a lot of missing documentation.
  • We are doing a lot of major breaking changes to them e.g. (https://github.com/open-telemetry/weaver/pull/1918)
  • Our tests, today, only verify compatibility at the binary level.

Before we publish crates that people depend on I want to do the following:

  • [ ] An API scrub to make sure we're exposing APIs we actually want others to use / depend on.
  • [ ] Land some of the major V2 refactorings we need
  • [ ] Ensure we have appropriate tests / checks to prevent breaking crate APIs without doing major-version bump, adding in release notes etc.
  • [ ] Possibly collapsing several of our crates into one so we can hide internal details

I'm fine with the concept of releasing weaver as a library - however the current maintainers are NOT considering the crates as independently consumable. Given how we want to mark the binary as 1.0 - there's just a lot of work for the crates we don't have the time to do. We're focus on stabilizing the algorithms and the binary.

If you really need / want the crates published and kept stable - we'd more than welcome the help in the fixes above.

jsuereth avatar Nov 19 '26 13:11 jsuereth