Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix trait errors with overriden automerge #36

Closed
gterzian opened this issue Aug 30, 2023 · 2 comments
Closed

Fix trait errors with overriden automerge #36

gterzian opened this issue Aug 30, 2023 · 2 comments

Comments

@gterzian
Copy link
Contributor

gterzian commented Aug 30, 2023

Follow-up on #31 (which I tried to re-open).

I am still having the problem when using my own local checked-out version of Automerge at 0.5.1, and Autosurgeon at 0.8.

Is there a reason why this would only happen when working with your own checked-out Automerge as a path dependency?

For example:

error[E0277]: the trait bound `Transaction<'_>: autosurgeon::ReadDoc` is not satisfied
   --> examples/distributed_bakery.rs:476:27
    |
476 |                 reconcile(&mut tx, &bakery).unwrap();
    |                 --------- ^^^^^^^ the trait `autosurgeon::ReadDoc` is not implemented for `Transaction<'_>`
    |                 |
    |                 required by a bound introduced by this call
    |
    = help: the following other types implement trait `autosurgeon::ReadDoc`:
              automerge::autocommit::AutoCommit
              automerge::automerge::Automerge
              automerge::transaction::manual_transaction::Transaction<'a>
    = note: required for `Transaction<'_>` to implement `Doc`
note: required by a bound in `autosurgeon::reconcile`
@gterzian gterzian changed the title Fix trait errors with new automerge versions Fix trait errors with overriden automerge Aug 30, 2023
@gterzian
Copy link
Contributor Author

problem goes away when using [patch.crates-io] to override the dependency...

@issackelly
Copy link

Yeah I think it was related to automerge-test depending on a fixed version and manually editing Cargo.toml -- I had the same trouble this week. (saving notes here for next time I run into it, no further action needed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants