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

feat: add deprecator #297

Merged
merged 1 commit into from
May 17, 2023
Merged

feat: add deprecator #297

merged 1 commit into from
May 17, 2023

Conversation

guseggert
Copy link
Contributor

@guseggert guseggert commented May 11, 2023

This utility adds deprecation comments to all exported types in a given module. It's intended to be used by Boxo maintainers when moving repos into Boxo.

For example, if your module is "github.com/ipfs/go-unixfs", then checkout that repo and, in its root, run:

deprecator --path github.com/ipfs/boxo/ipld/unixfs

Then on the func "github.com/ipfs/go-unixfs/mod.NewDagModifier", the deprecator will add the following comment:

// Deprecated: use github.com/ipfs/boxo/ipld/unixfs/mod.NewDagModifier

@guseggert guseggert marked this pull request as ready for review May 11, 2023 18:20
@guseggert guseggert requested a review from a team as a code owner May 11, 2023 18:20
@guseggert guseggert self-assigned this May 11, 2023
@codecov
Copy link

codecov bot commented May 11, 2023

Codecov Report

Merging #297 (084e09b) into main (9b8e63b) will decrease coverage by 0.69%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #297      +/-   ##
==========================================
- Coverage   48.09%   47.41%   -0.69%     
==========================================
  Files         279      276       -3     
  Lines       33497    33426      -71     
==========================================
- Hits        16112    15850     -262     
- Misses      15702    15879     +177     
- Partials     1683     1697      +14     

see 18 files with indirect coverage changes

@guseggert guseggert force-pushed the feat/deprecator branch 2 times, most recently from c146926 to ddbd764 Compare May 11, 2023 18:40
@guseggert guseggert requested a review from Jorropo May 11, 2023 18:50
cmd/deprecator/main.go Outdated Show resolved Hide resolved
This utility adds deprecation comments to all exported types in a
given module. It's intended to be used by Boxo maintainers when moving
repos into Boxo.

For example, if your module is "github.com/ipfs/go-unixfs", then
checkout that repo and, in its root, run:

deprecator --path github.com/ipfs/boxo/ipld/unixfs

Then on the func "github.com/ipfs/go-unixfs/mod.NewDagModifier", the
deprecator will add the following comment:

// Deprecated: use github.com/ipfs/boxo/ipld/unixfs/mod.NewDagModifier
@hacdias hacdias merged commit fb3abdd into main May 17, 2023
@hacdias hacdias deleted the feat/deprecator branch May 17, 2023 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants