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

Disable anonymous namespace definition for Windows compilers #138

Merged
merged 1 commit into from
May 31, 2018

Conversation

mannatera
Copy link
Contributor

@mannatera mannatera commented May 31, 2018

Fixes #134

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 9ed7815 on mannatera:master into 7da401a on ranisalt:master.

1 similar comment
@coveralls
Copy link

coveralls commented May 31, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 9ed7815 on mannatera:master into 7da401a on ranisalt:master.

@jdforsythe
Copy link
Contributor

jdforsythe commented May 31, 2018

Thanks @mannatera this is blocking Windows development right now. I can confirm that installing your branch through npm successfully resolves this issue on Windows 10.

@ranisalt ranisalt merged commit 551cdc5 into ranisalt:master May 31, 2018
@ranisalt
Copy link
Owner

Thanks!

Also, do you happen to know how to file this bug report to Microsoft developers?

@jdforsythe
Copy link
Contributor

jdforsythe commented Jun 1, 2018

I'm not a C++ dev but the Visual C++ docs lead me to believe anonymous namespaces should work:

https://msdn.microsoft.com/en-us/library/5cb46ksf.aspx#anonymous%20or%20unnamed%20namespaces

Here's an article about reporting an issue:

https://docs.microsoft.com/en-us/cpp/how-to-report-a-problem-with-the-visual-cpp-toolset

@mannatera
Copy link
Contributor Author

It might as well be a bug with Nan. When I tested it and added new NAN_METHOD which called a class that was outside the anonymous namespace leaving all other code as is (that means that HashWorker and all related classes were still under anonymous namespace) then I got it all working too, with no problems.

I cannot explain this, but it seemed that initiating class outside the namespace "fixed" the class inside the anonymous namespace also.

My best explanation is that Execute() method of Nan::AsyncWorker was called, but when it finished HandleOKCallback() was not called afterwards - leading to this bug in Windows.

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.

4 participants