Repository navigation
Conversation
main went red at the #1552 merge for a seam neither PR's CI could see: #1552 renamed the inherent ImportSink::finish() to into_parts() to free the name for GraphSink::finish() (which returns unit), while #1529 landed materialize.rs on main during that review with two sink.finish() calls destructuring the 3-tuple. Merged, finish() resolves to the trait method and both destructurings fail to typecheck. Each PR ran green against its own base; the merge commit is the first tree where the two coexist. Both call sites now use into_parts(). The emit_triple return is discarded explicitly with the contract stated in place: ImportSink defers errors — emit_* stashes the first encode failure and into_parts() surfaces it — so the discard is deliberate, not lossy.
Contributor
Author
|
Closing as a duplicate of #1586, which was opened first and takes the better form on the emit_triple site (real propagation rather than a documented discard — behaviorally identical today since ImportSink's emit_triple unconditionally returns Ok and defers encode errors to into_parts(), but propagation is future-proof if that contract ever changes). Two sessions independently diagnosed the same three sites, which is corroboration for #1586, not a conflict. The seam analysis in this PR's commit message and body applies to #1586 verbatim. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
main is red at eadc31e (the #1552 merge): two E0308s in
fluree-db-api/src/materialize.rs, plus anunused_must_usebehind CI's-D warnings. This is a three-line repair.Why neither PR's CI could see it
This is a semantic seam between two PRs that were each green on their own base:
ImportSink::finish()→into_parts()— deliberately, to free thefinishname for the newGraphSink::finish()trait method, which returns(). Its doc comment says so.materialize.rswith twosink.finish()calls that destructure the 3-tuple.Merged together,
sink.finish()resolves to the trait method returning(), and both destructurings fail to typecheck. Each PR's CI ran against its own pre-merge base; the merge commit is the first place the two changes coexist, and main's CI went red exactly there (parentdcfd7838c= success,eadc31e11= failure).The fix
sink.finish()call sites →sink.into_parts()(the renamed inherent method; same 3-tuple, same error).self.sink.emit_triple(s, p, o)→let _ = self.sink.emit_triple(s, p, o)with a comment stating the contract:ImportSinkuses deferred-error semantics —emit_*stashes the first encode failure andinto_parts()surfaces it as a hard error — so the discard is deliberate, not lossy. If the materialize owner prefers a per-triple failure site, propagating instead is also sound; happy to follow up.Verified:
cargo check --workspace --all-targetsclean at this branch,cargo clippy -p fluree-db-api --all-features --all-targets -- -D warningsclean,fluree-db-apitest suite green (counts in the checks below).Every open PR is currently inheriting this red; nothing else in the repo touches these lines, so this should be safe to land quickly.