Skip to content

Fix build failing on windows - #2710

Merged
zcbenz merged 2 commits into
electron:masterfrom
etiktin:fix_build_failing_on_windows
Sep 6, 2015
Merged

zcbenz merged 2 commits into
electron:masterfrom
etiktin:fix_build_failing_on_windows

Conversation

@etiktin

@etiktin etiktin commented Sep 4, 2015

Copy link
Copy Markdown
Contributor

build.py would fail on Windows due to a couple of changes made in #2459 that assumed FilePath::StringType is always std::string and that FilePath::CharType is always char, which is not the case on Windows. So this commit fixes that.

The error report I got from running build.py:

> python script\build.py -c D
ninja: Entering directory `out\D'
[43/316] CXX obj\atom\browser\electron_lib.atom_browser_main_parts.obj
FAILED: ninja -t msvc -e environment.x86 -- "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\atom\browser\electron_lib.atom_browser_main_parts.obj.rsp /c ..\..\atom\browser\atom_browser_main_parts.cc /Foobj\atom\browser\electron_lib.atom_browser_main_parts.obj /Fdobj\electron_lib.cc.pdb
c:\users\eran.t\documents\github\electron\atom\browser\atom_browser_main_parts.cc(31) : error C2440: 'initializing' : cannot convert from 'const char [11]' to 'const base::FilePath::CharType []'
        There is no context in which this conversion is possible
c:\users\eran.t\documents\github\electron\atom\browser\atom_browser_main_parts.cc(80) : error C2664: 'void brightray::BrowserContext::Initialize(const std::string &,bool)' : cannot convert argument 1 from 'const base::FilePath::StringType' to 'const std::string &'
        Reason: cannot convert from 'const base::FilePath::StringType' to 'const std::string'
        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
[43/316] CXX obj\atom\browser\api\electron_lib.atom_api_session.obj
ninja: build stopped: subcommand failed.

I think we should reconsider using a CI for Windows so we can catch issues like this faster. From what I understand the reason it's currently disabled is that building on appveyor takes over 30 minutes. appveyor states in their FAQ that if you purchase a "Pro" or "Premium" plan you'll get dedicated hardware with faster CPUs, SSD drives, 1 GB network uplink. So maybe we can contact them and see if we can try running the build on the stronger machines.

etiktin and others added 2 commits September 4, 2015 21:27
build.py would fail on Windows due to a couple of changes made in electron#2459.

This commit fixes those issues.
@zcbenz

zcbenz commented Sep 6, 2015

Copy link
Copy Markdown
Contributor

Thanks!

@zcbenz

zcbenz commented Sep 6, 2015

Copy link
Copy Markdown
Contributor

I think we should reconsider using a CI for Windows so we can catch issues like this faster. From what I understand the reason it's currently disabled is that building on appveyor takes over 30 minutes. appveyor states in their FAQ that if you purchase a "Pro" or "Premium" plan you'll get dedicated hardware with faster CPUs, SSD drives, 1 GB network uplink. So maybe we can contact them and see if we can try running the build on the stronger machines.

We have Windows CI running on GitHub's own server, but it does not test pushes by non-GitHubbers for security reasons, so for now I can only verify Electron builds on Windows when I push.

Also considering the super-bad performance of appveyor's free plan, it still won't be usable unless their Pro plan can get more than 10x faster. And since there is no mention of machine specifications on appveyor's website, I'm not even willing to have try (faster CPUs means nothing to me).

zcbenz added a commit that referenced this pull request Sep 6, 2015
@zcbenz
zcbenz merged commit 81d423c into electron:master Sep 6, 2015
@etiktin

etiktin commented Sep 6, 2015

Copy link
Copy Markdown
Contributor Author

We have Windows CI running on GitHub's own server, but it does not test pushes by non-GitHubbers for security reasons, so for now I can only verify Electron builds on Windows when I push.

Is it possible to configure the internal CI to also run on merge?
That way code that was pushed by a non GitHubber, will still go through some form of automatic testing on Windows.

@zcbenz

zcbenz commented Sep 7, 2015

Copy link
Copy Markdown
Contributor

Is it possible to configure the internal CI to also run on merge?

When the PR is merged by a GitHubber the CI will also run it, because the merge commit is authored by the one who click the merge button.

@etiktin
etiktin deleted the fix_build_failing_on_windows branch September 7, 2015 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants