Skip to content

Conversation

@ryanofsky
Copy link
Contributor

@ryanofsky ryanofsky commented Apr 7, 2018

Rename interface to interfaces

Build failure reported by ken2812221 in #10244 (comment)

Rename `interface` to `interfaces`

Build failure reported by Chun Kuan Lee <[email protected]>
bitcoin#10244 (comment)

-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-
@laanwj
Copy link
Member

laanwj commented Apr 7, 2018

utACK

Anyone have an idea why this didn't cause a problem in the Travis win build?

@ryanofsky
Copy link
Contributor Author

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

@laanwj
Copy link
Member

laanwj commented Apr 7, 2018

Ah yes for COM, of course.
We could also avoid this by not including the windows headers except in platform-specific utility compilation units. But meh.

@maflcko
Copy link
Member

maflcko commented Apr 7, 2018

Imo, a scripted diff should not (explicitly) modify the content of .git. Mind removing the git from the first command?

@ken2812221
Copy link
Contributor

@laanwj I think travis win build does not build qt part

@laanwj
Copy link
Member

laanwj commented Apr 7, 2018

@laanwj I think travis win build does not build qt part

Oh yes that could be true.

Does this fix your build problem?

@ryanofsky
Copy link
Contributor Author

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.

@maflcko
Copy link
Member

maflcko commented Apr 7, 2018

utACK 17780d6

@maflcko
Copy link
Member

maflcko commented Apr 7, 2018

Thanks for the clarification @ryanofsky

@ken2812221
Copy link
Contributor

Tested ACK 17780d6

@maflcko
Copy link
Member

maflcko commented Apr 7, 2018

Tested ACK 17780d6

@maflcko
Copy link
Member

maflcko commented Apr 7, 2018

Just going to merge this, since 17780d6 doesn't change the objdump for me locally.

@maflcko maflcko merged commit 17780d6 into bitcoin:master Apr 7, 2018
maflcko pushed a commit that referenced this pull request Apr 7, 2018
17780d6 scripted-diff: Avoid `interface` keyword to fix windows gitian build (Russell Yanofsky)

Pull request description:

  Rename `interface` to `interfaces`

  Build failure reported by ken2812221 in #10244 (comment)

Tree-SHA512: e02c97c728540f344202c13b036f9f63af23bd25e25ed7a5cfe9e2c2f201a12ff232cc94a93fbe37ef6fb6bf9e036fe62210ba798ecd30de191d09338754a8d0
xdustinface added a commit to xdustinface/dash that referenced this pull request Oct 14, 2020
…windows gitian build

17780d6 scripted-diff: Avoid `interface` keyword to fix windows gitian build (Russell Yanofsky)

Pull request description:

  Rename `interface` to `interfaces`

  Build failure reported by ken2812221 in bitcoin#10244 (comment)

Tree-SHA512: e02c97c728540f344202c13b036f9f63af23bd25e25ed7a5cfe9e2c2f201a12ff232cc94a93fbe37ef6fb6bf9e036fe62210ba798ecd30de191d09338754a8d0

-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-
UdjinM6 added a commit to dashpay/dash that referenced this pull request Oct 14, 2020
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants