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

Tooling to minimize impact on those updating to boxo #181

Closed
Tracked by #196
BigLep opened this issue Feb 17, 2023 · 7 comments
Closed
Tracked by #196

Tooling to minimize impact on those updating to boxo #181

BigLep opened this issue Feb 17, 2023 · 7 comments
Assignees
Labels
topic/project-management Items related to organizing and managing this project well.

Comments

@BigLep
Copy link
Contributor

BigLep commented Feb 17, 2023

Identify/brainstorm/decide on any tooling that exists or that could be built to help users switch to migrate to boxo. For example, a script you could run at the root of your repo. It would identify what you have that has now been moved into go-libipfs and then offer to update go.mod and your import paths? If we think there is something that would be really useful to get done here, I'm game for us to carve time for it (or to engage IPDX).

It should also identify if one has a "go-libipfs" dependency that should switch to "boxo" as a result of the renaming working happening in #215

@BigLep BigLep added kind/discussion Topical discussion; usually not changes to codebase topic/project-management Items related to organizing and managing this project well. labels Feb 17, 2023
@guseggert
Copy link
Contributor

guseggert commented Feb 22, 2023

Took a stab at something like this: https://github.com/ipfs/go-libipfs/blob/feat/consumer-migration-tool/cmd/migrate/migrate.go

It basically just rewrites import paths for repos that were moved into go-libipfs. If there were any subsequent breaking changes, it's still on the consumer to work through those. And it also doesn't do anything to help with managing versions (generally consumer can just use the latest version, which Go does by default). One thing this might be able to do is to also detect transitive dependencies of modules that were moved into go-libipfs, to prevent having multiple versions of the same library in the dependency graph (ex if a consumer upgrades to go-libipfs but one of its dependencies still uses an older archived repo).

@BigLep BigLep removed the kind/discussion Topical discussion; usually not changes to codebase label Mar 10, 2023
@BigLep BigLep changed the title [Tracking issue] Tooling to minimize impact on migrators Tooling to minimize impact on migrators Mar 10, 2023
@BigLep BigLep changed the title Tooling to minimize impact on migrators Tooling to minimize impact on those updating to go-libipfs Mar 10, 2023
@guseggert
Copy link
Contributor

guseggert commented Mar 20, 2023

I've added some functionality to that tool which checks the consuming repo for any dependencies (direct or transitive) which were migrated to go-libipfs, it prints something like this:

Warning: you still have dependencies on modules which have migrated to go-libipfs.
You should consider not having these dependencies to avoid multiple versions of the same code.
You can use 'go mod why' or 'go mod graph' to find the reason for these dependencies.

Dependent module versions:

github.com/ipfs/go-bitswap v0.11.0
github.com/ipfs/go-ipfs-files v0.3.0
github.com/ipfs/interface-go-ipfs-core v0.10.0
github.com/ipfs/go-unixfs v0.3.1
github.com/ipfs/go-path v0.3.0
github.com/ipfs/go-namesys v0.7.0
github.com/ipfs/go-ipfs-keystore v0.1.0
github.com/ipfs/go-ipns v0.3.0
github.com/ipfs/go-blockservice v0.5.0
github.com/ipfs/go-ipfs-chunker v0.0.1
github.com/ipfs/go-fetcher v1.6.1
github.com/ipfs/go-ipfs-blockstore v1.2.0
github.com/ipfs/go-ipfs-posinfo v0.0.1
github.com/ipfs/go-ipfs-util v0.0.2
github.com/ipfs/go-ipfs-ds-help v1.1.0
github.com/ipfs/go-verifcid v0.0.2
github.com/ipfs/go-ipfs-exchange-offline v0.3.0
github.com/ipfs/go-ipfs-routing v0.3.0
github.com/ipfs/go-ipfs-exchange-interface v0.2.0

@BigLep BigLep changed the title Tooling to minimize impact on those updating to go-libipfs Tooling to minimize impact on those updating to boxo Mar 21, 2023
@BigLep
Copy link
Contributor Author

BigLep commented Mar 21, 2023

@guseggert : I updated the issue description, but tooling should also account for anyone who is using go-libipfs rather than boxo (given the renaming effort of #215 ).

@lidel
Copy link
Member

lidel commented Mar 29, 2023

@guseggert quick feedback on feat/consumer-migration-tool/cmd/migrate/migrate.go (used in bifrost-gateway and caboose PRs)

  • worked as expected, thanks!
  • rename binary to boxo-migrations so there is no conflict with other things on PATH
  • thoughts on automatically running go mod tidy after successful update-imports? it will surface issues early (if any)

@guseggert
Copy link
Contributor

Thanks appreciate the feedback, will incorporate.

@guseggert
Copy link
Contributor

Addressed that feedback and added README documentation here: #243

@guseggert
Copy link
Contributor

I think we're good here, at least for the MVP of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/project-management Items related to organizing and managing this project well.
Projects
No open projects
Archived in project
Development

No branches or pull requests

3 participants