Rename interface
to interfaces
Build failure reported by ken2812221 in #10244 (comment)
interface
keyword to fix windows gitian build
#12906
Rename interface
to interfaces
Build failure reported by ken2812221 in #10244 (comment)
Rename `interface` to `interfaces`
Build failure reported by Chun Kuan Lee <ken2812221@gmail.com>
https://github.com/bitcoin/bitcoin/pull/10244#issuecomment-379434756
-BEGIN VERIFY SCRIPT-
git mv src/interface src/interfaces
ren() { git grep -l "$1" | xargs sed -i "s,$1,$2,g"; }
ren interface/ interfaces/
ren interface:: interfaces::
ren BITCOIN_INTERFACE_ BITCOIN_INTERFACES_
ren "namespace interface" "namespace interfaces"
-END VERIFY SCRIPT-
utACK
Anyone have an idea why this didn’t cause a problem in the Travis win build?
Anyone have an idea why this didn’t cause a problem in the Travis win build?
I don’t know the specific answer, but I guess there are just different headers or versions of headers used in the two builds. There is some information about the headers that #define interface struct
at https://stackoverflow.com/questions/25234203/what-is-the-interface-keyword-in-msvc and
https://social.msdn.microsoft.com/forums/vstudio/en-US/06bf1dea-1d20-4ec3-b9a1-3d673d7fcd8d/what-is-the-interface-keyword-in-native-c
.git
. Mind removing the git
from the first command?
Imo, a scripted diff should not (explicitly) modify the content of .git. Mind removing the git from the first command?
Currently, if you rename files in a scripted diff or add new files, you are required to update the git index, otherwise the git diff
command which verifies the script will fail because it doesn’t see the new paths. (To confirm this you can check out the PR, amend git mv
to mv
and run contrib/devtools/commit-script-check.sh HEAD^..HEAD
, which will fail.)
I actually think this is a good thing. Scripts that keep the git index up to date are easier to edit and manually verify since you can paste them into your shell and run normal git commit/diff commands afterwards without having to first manually trawl the working directory to discover new paths.
If you really wanted to make the verifier automatically detect new paths, you could do it by adding a line like git add -N $(git diff-tree --no-commit-id --diff-filter=A --name-only -r HEAD)
, but I think this would just be complicating it, and complicating manual verification and editing for no benefit.
ryanofsky
laanwj
MarcoFalke
ken2812221
Labels
Windows