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

dep: add "codependencies" for handling version conflicts #132

Merged
merged 2 commits into from
Aug 25, 2020

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Aug 20, 2020

This patch adds a special, internal, "codependencies" package that allows us to specify minimum required versions for modules we don't directly depend on.

Problem: Updating go-multiaddr without updating go-multiaddr-net and/or go-maddr-filter can cause conflicting type issues.

Proposal: Add "dependencies" on these modules (circular module dependencies are perfectly legal), but avoid actually importing any packages.

Downside:

  • Anyone using this module will also have to download these deprecated modules.

Upside:

  • After upgrading this module, all "codependencies" will automatically be upgraded to compatible versions.
  • If unused, codependencies will not end up bloating the binary size. This is because "usage" is computed at the import/package layer, while module version requirements are computed at the module layer.

This patch adds a special, internal, "codependencies" package that allows us to
specify minimum required versions for modules we don't directly depend on.

Downside:

* Anyone using this module will also have to download these deprecated modules.

Upside:

* After upgrading this module, all "codependencies" will automatically be
  upgraded to compatible versions.
* If unused, codependencies will _not_ end up bloating the binary size. This is
  because "usage" is computed at the import/package layer, while module version
  requirements are computed at the module layer.
@Stebalien
Copy link
Member Author

Notes:

  • The "co-dependencies" are actually just shims, in this case, so it doesn't add too much weight.
  • I consider this to be a temporary upgrade measure. After some period of time, we should probably remove these.

@Stebalien Stebalien requested a review from raulk August 20, 2020 23:02
@Stebalien
Copy link
Member Author

Stebalien commented Aug 25, 2020 via email

Note that we're using codependencies to depend on packages that have been merged in to this package.

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
@aschmahmann aschmahmann merged commit d18c05e into master Aug 25, 2020
@aschmahmann aschmahmann mentioned this pull request Sep 22, 2020
72 tasks
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.

None yet

3 participants