Check for changes to the public API#2713
Conversation
Pull Request Test Coverage Report for Build 8863062354Details
💛 - Coveralls |
42dad8b to
d9656b9
Compare
contrib/check-for-api-changes.sh
Outdated
There was a problem hiding this comment.
In eb1f4030afc0f40b7ba8df308fbfd1c11521d1c6:
trailing whitespace
There was a problem hiding this comment.
My bad, thanks. Fixed now.
|
Note that even though we agreed to just push forward on this, it may take a bit to get in because (a) we still need two ACKs, unless it sits open for 2 weeks without any comments, and (b) it will need to be rebased every time we merge something that changes the API. |
apoelstra
left a comment
There was a problem hiding this comment.
ACK d9656b9630acf0ec99057b520a94e99470e83b59
|
After two months of being kind of stressed (as stressed as a bloke who works at home in tracksuit pants can be anyways) I found myself this last couple of days in a strange place of calm, just accepting that likely nothing is going to merge any time soon. Finally making some headway in I kind of think we should do your idea of branching off and doing the |
api/README.md
Outdated
There was a problem hiding this comment.
I prefer that documentation is consistent.
All .md files in the repo uses the GH flavor, e.g.
Lines 1 to 5 in a9cdcb4
| API text files | |
| ============== | |
| # API text files |
There was a problem hiding this comment.
Ah yeah, sure thing. Thanks!
There was a problem hiding this comment.
I tend to use ==== in my own stuff so I went to check that I hadn't introduced any other files and there are tons in this repo
gg '===='
base58/README.md:2: =======================
bitcoin/tests/data/README.md:2: ================
bitcoin/tests/data/serde/README.md:2: ==========================
fuzz/README.md:103:=====================================================================
internals/README.md:2: ======================
io/README.md:2: =======================
units/README.md:2: =============
We should probably make them all uniform.
There was a problem hiding this comment.
gg is an alias to git grep -IPn --color=always
There was a problem hiding this comment.
Yes my
All .md files
was based on a sample from the root dir .mds. I should have been more specific :/
We should definitely normalize all of them.
I can work in a future PR to normalize markdown, I am quite used from an old gig that I was in charge of technical documentation in scientific software.
api/README.md
Outdated
There was a problem hiding this comment.
Also this can be a bash fenced block no?
1aaf666 to
f228f54
Compare
|
Force push is the two suggested fixes. |
apoelstra
left a comment
There was a problem hiding this comment.
ACK f228f54ff5f5e1c771617a5cd4247110eba66f23
f228f54 to
7e5ff49
Compare
storopoli
left a comment
There was a problem hiding this comment.
ACK 7e5ff49702221c64e4960b72be979541b168a965
7e5ff49 to
32e67a1
Compare
|
Re-based on |
We would like to check for API changes during development and in CI so that such changes can be discussed separately from the code. Add tooling and documentation for creating API listings for the public crates within the workspace (i.e., not `internals`). Add API text files from an initial run of the script.
Add a job that runs the new script to check for changes to the public APIs of `hashes` and `bitcoin`.
Add a `just` command to run the API checking script. Makes it more discoverable.
32e67a1 to
76331ae
Compare
|
|
Nice I was expecting it to payoff but not that fast ROI... |
apoelstra
left a comment
There was a problem hiding this comment.
ACK 76331ae normally would complain about the whitespace but I would like to ACK/merge this quickly since most other PR that gets merged will force it to be rebased. also will one-ACK merge as "no NACKs or comments from maintainers in 2 weeks"
|
I went looking for the whitespace issue but couldn't find it. Did #2780 though. |
|
@tcharding you introduced trailing whitespace in your first commit and removed it in the last one. |
|
Ah, woops. Cheers. |
This PR is #1880 re-opened.
Add a script that checks the public API of
hashesandbitcoin. Document how to use it during development. Call it in CI. Do not add it to githooks because the githooks because its expected to be run per PR not per commit.Includes a
justcommand to run the script:just check-apiImplied workflow change
This PR imposes workflow changes.
Explicitly: all PRs that change the public API of
bitcoin,base58,hashes,io, orunitsmust contain changes to the api text files.Suggestion: We add the patch updating api text files as a separate patch at the end of each PR so we can haggle over it separately from the actual code changes.
Fix: #1875