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

Rename cbor feature branch dep for downstream compatability #538

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SophisticaSean
Copy link

Description

Atree depends on a feature branch version of cbor feature/stream, unfortunately other dependencies are using the master/main branch release version of cbor. If these come into contact in a repo there's no way around the dep mismatch. This renames the import of the pinned feature-branch version of cbor to cborstream so that downstream deps can still use the most recent cbor without conflict.


  • Targeted PR against main branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@SophisticaSean
Copy link
Author

nvm this won't work. we need to have a separate fork of feature/stream in order for downstream deps to not get clobbered by the feature version of cbor

Copy link
Member

@fxamacker fxamacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SophisticaSean Thanks for opening this PR.

I tried this approach during our conversation on Slack and it will break existing projects using atree (onflow projects as well as external projects).

As mentioned on Slack, I can update fxamacker/cbor's feature/stream-mode branch to be a superset of v2.7.0.

So go.mod can use something like:
github.com/fxamacker/cbor/v2 v2.7.1-0.20250345678901-123456789012

Since v2.7.1-2025... would be a 100% compatible superset of v2.7.0 with higher version number, I think it might work without breaking existing projects using atree.

Let's try the non-breaking approach first and see if it works. If it doesn't work, we still benefit by having cbor feature/stream-mode updated to cbor v2.7.0 for this PR to use.

@SophisticaSean
Copy link
Author

@SophisticaSean Thanks for opening this PR.

I tried this approach during our conversation on Slack and it will break existing projects using atree (onflow projects as well as external projects).

As mentioned on Slack, I can update fxamacker/cbor's feature/stream-mode branch to be a superset of v2.7.0.

So go.mod can use something like: github.com/fxamacker/cbor/v2 v2.7.1-0.20250345678901-123456789012

Since v2.7.1-2025... would be a 100% compatible superset of v2.7.0 with higher version number, I think it might work without breaking existing projects using atree.

Let's try the non-breaking approach first and see if it works. If it doesn't work, we still benefit by having cbor feature/stream-mode updated to cbor v2.7.0 for this PR to use.

Definitely agree. I've tried a couple ways to work around this to no avail. I'll close this for now, but even with a superset of features, since go.mod replace directives dont work for dependencies, even a superset of features will still collide on differing cbor versions.

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

Successfully merging this pull request may close these issues.

2 participants