-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Migrating library APIs #1159
Labels
need/community-input
Needs input from the wider community
Comments
wking
added a commit
to wking/go-ipfs
that referenced
this issue
Apr 29, 2015
Folks should be using the node-returning AddFromReader defined in shell/fsnode instead, since that creates the same node but returns the dag.Node object itself, instead of the stringified key. It's cheaper to go from Node to stringified key than it is to go the other way around, and you need the Node to do anything besides printing the stringified key, so the shell/fsnode version has a better API and we want to push people in that direction. The shell/fsnode version also uses our intended high-/low-level API distinction (core/... is for low-level stuff) [1]. This commit starts the deprecation/migration using the procedure outlined here [2]. [1]: ipfs#1158 [2]: ipfs#1159
wking
added a commit
to wking/go-ipfs
that referenced
this issue
Apr 29, 2015
Folks should be using the node-returning AddFromReader defined in shell/fsnode instead, since that creates the same node but returns the dag.Node object itself, instead of the stringified key. It's cheaper to go from Node to stringified key than it is to go the other way around, and you need the Node to do anything besides printing the stringified key, so the shell/fsnode version has a better API and we want to push people in that direction. The shell/fsnode version also uses our intended high-/low-level API distinction (core/... is for low-level stuff) [1]. This commit starts the deprecation/migration using the procedure outlined here [2]. [1]: ipfs#1158 [2]: ipfs#1159
wking
added a commit
to wking/go-ipfs
that referenced
this issue
Apr 30, 2015
Folks should be using the node-returning AddFromReader defined in shell/unixfs instead, since that creates the same node but returns the dag.Node object itself, instead of the stringified key. It's cheaper to go from Node to stringified key than it is to go the other way around, and you need the Node to do anything besides printing the stringified key, so the shell/unixfs version has a better API and we want to push people in that direction. The shell/unixfs version also uses our intended high-/low-level API distinction (core/... is for low-level stuff) [1]. This commit starts the deprecation/migration using the procedure outlined here [2]. [1]: ipfs#1158 [2]: ipfs#1159
wking
added a commit
to wking/go-ipfs
that referenced
this issue
May 1, 2015
Folks should be using the node-returning AddFromReader defined in shell/unixfs instead, since that creates the same node but returns the dag.Node object itself, instead of the stringified key. It's cheaper to go from Node to stringified key than it is to go the other way around, and you need the Node to do anything besides printing the stringified key, so the shell/unixfs version has a better API and we want to push people in that direction. The shell/unixfs version also uses our intended high-/low-level API distinction (core/... is for low-level stuff) [1]. This commit starts the deprecation/migration using the procedure outlined here [2], with the API-release-notes directory proposed here [3] and accepted here [4]. [1]: ipfs#1158 [2]: ipfs#1159 [3]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29379579 [4]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29498385
wking
added a commit
to wking/go-ipfs
that referenced
this issue
May 2, 2015
Folks should be using the node-returning AddFromReader defined in shell/unixfs instead, since that creates the same node but returns the dag.Node object itself, instead of the stringified key. It's cheaper to go from Node to stringified key than it is to go the other way around, and you need the Node to do anything besides printing the stringified key, so the shell/unixfs version has a better API and we want to push people in that direction. The shell/unixfs version also uses our intended high-/low-level API distinction (core/... is for low-level stuff) [1]. This commit starts the deprecation/migration using the procedure outlined here [2], with the API-release-notes directory proposed here [3] and accepted here [4]. [1]: ipfs#1158 [2]: ipfs#1159 [3]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29379579 [4]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29498385
wking
added a commit
to wking/go-ipfs
that referenced
this issue
May 2, 2015
Folks should be using the node-returning AddFromReader defined in shell/unixfs instead, since that creates the same node but returns the dag.Node object itself, instead of the stringified key. It's cheaper to go from Node to stringified key than it is to go the other way around, and you need the Node to do anything besides printing the stringified key, so the shell/unixfs version has a better API and we want to push people in that direction. The shell/unixfs version also uses our intended high-/low-level API distinction (core/... is for low-level stuff) [1]. This commit starts the deprecation/migration using the procedure outlined here [2], with the API-release-notes directory proposed here [3] and accepted here [4]. [1]: ipfs#1158 [2]: ipfs#1159 [3]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29379579 [4]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29498385
wking
added a commit
to wking/go-ipfs
that referenced
this issue
May 4, 2015
Folks should be using the node-returning AddFromReader defined in shell/unixfs instead, since that creates the same node but returns the dag.Node object itself, instead of the stringified key. It's cheaper to go from Node to stringified key than it is to go the other way around, and you need the Node to do anything besides printing the stringified key, so the shell/unixfs version has a better API and we want to push people in that direction. The shell/unixfs version also uses our intended high-/low-level API distinction (core/... is for low-level stuff) [1]. This commit starts the deprecation/migration using the procedure outlined here [2], with the API-release-notes directory proposed here [3] and accepted here [4]. [1]: ipfs#1158 [2]: ipfs#1159 [3]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29379579 [4]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29498385
whyrusleeping
added
the
need/community-input
Needs input from the wider community
label
Aug 23, 2016
Superseded by the "CoreAPI" interfaces. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As discussed in #1158, sometimes we want to make changes to our public library APIs. How should we do that? Do we need ‘gofix’ style translators? Should we be logging runtime deprecation warnings? Some folks do some sed-like things with
go fmt
. Maybe we're just explaining migrations in our release notes? What do we want this to look like?I'm currently leaning towards a well-definied distinction between stable (
core/…
) and fluxy (shell/…`) APIs (see #1158), with migration suggestions in the release notes whenever we make a backwards-incompatible change to an existing API. Since I can't find a way to get compile-time deprecation warnings in Go, I'd suggest this strategy:Implement new interface using a new function name (to not collide with the existing usage).
Add a mention of the new interface (and deprecated old interface) to all subsequent release notes, giving a target version for the actual removal. For example:
Keep printing that deprecation warning and migration advice in subsequent release notes leading up to 0.4.0.
Cut 0.4.0 with a prominent list of removals and migration advice.
Once we get to 1.0, things like this will hopefully happen less frequently (if we do a good job planning the API now), so the gaps between backwards-incompatible changes should be larger.
Spun off from ipfs/team-mgmt#6.
The text was updated successfully, but these errors were encountered: