-
Notifications
You must be signed in to change notification settings - Fork 286
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
No way to build without --release? #463
Comments
Is this behavior just for Windows? Line 341 in 845425b
Why is that, do anyone know? 😢 |
This is a limitation of the windows build process. If you build on other OS, debug builds work as expected. If you need windows support, a workaround is to add the following to your [profile.release]
debug-assertions = true |
@kjvalencik Thanks so much for quick response. Does it have something to do with node-gyp and msvc? If yes, then I understand. |
To be honest, I'm not sure. It's been there a long time and I've never questioned it since I'm not a Windows user. I'll see if I can dig up an answer and get it documented. |
Would be great. I am a newbie in Rust, but I'll probably try to test what happens if I remove that compile error line, and will write here. |
Uhm.. It seems it compiles. I'll check if everything works from JS side. |
@kjvalencik Everything works on windows. I removed the line from ~/.cargo/registry/.../neon-0.3.3 |
Turns out there is some problem with building without the |
Interesting. That seems like it's catching an actual bug. Are there any more details when run with |
@kjvalencik I am not sure I did it correctly: I ran |
I have the same interest for the issue. Have you @anurbol , @kjvalencik any additional infos? I think, the issue is not a critical than before because developers who includes Windows target can use WSL2 environment in very easily. And we can split a NEON marshlling workspace and a backend core business logics workspace then we avoid the problem very easy too. But, the situation is not beautiful and confusible for newbiews then I want to solve it if possible. 🤔 |
@usagi Most likely it's being suppressed by the overridden panic hook. You can try enabling the |
This post is a progress logging about my first trial of debug build in Windows. It's works at least the first "hello". 👍
#[cfg(all(windows, not(neon_profile = "release")))]
compile_error!("Neon only builds with --release. For tests, try `cargo test --release`.");
PS C:\Users\usagi\tmp\z\WINDOWS_SPECIALIZED\aaa\native> node
Welcome to Node.js v13.5.0.
Type ".help" for more information.
> const aaa = require('./target/x86_64-pc-windows-msvc/debug/deps/aaa.node')
undefined
> aaa.hello()
'hello node'
> eg. with VSCode + LLDB debugger IDE
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug: Backend",
"program": "node",
"args": [
"-e",
"console.log(require('./native/target/x86_64-pc-windows-msvc/debug/deps/aaa.node').hello())"
],
"cwd": "${workspaceFolder}"
}
]
} And then: The debugger works fine, at least in the super simple "hello". 👍 Maybe, this problem of the linking stage is not the core of the problem. The main reason of the feature disabling by is in a more internal somewhere. But, if the problem is only it then It may solve easy. I guessing, it will be solve if fix the usage about Related commit logs: Hmm, the main reason is not written in these commit logging, but it may mean the reason is a very simple. 💡 |
And then, I found minimum workaround or fixing for the linker trouble. Add the below code to the
Then, Summary of "How to build a debug version
|
@anurbol Could you share your happened code about #463 (comment) ? Of course don't worry, any infos are so helpful for me now anything either a simple hello-world or a more complexed something. |
I'd completed a testing for all of the examples exclude 17(electron app), 18(publishing modules),21(Bindgen) that reconfigured to use the modified neon. No errors caused from the debug build mode with my modified neon. And, it could be native code debugging with msvc-debugger and lldb. Of course, the setting of these examples and the neon was modified to use with Thus, I'll PR it soon. 🎉 |
Fix #463 ; Debug build mode fixing in Windows
Hi guys 👋 Is it me or it's only possible to
neon build --release
?If I run just
neon build
then I get this messageNeon only build with --release...
. What is the reason of that?There are some conditional attributes in my code that depend on
debug_assertions
, so those don't work because of this.Response would be greatly appreciated, especially if soon.
The text was updated successfully, but these errors were encountered: