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

Take module version from node headers. #109

Merged
merged 1 commit into from
Dec 23, 2016

Conversation

shawedwa
Copy link

@shawedwa shawedwa commented Sep 5, 2016

If module abi version isn't specified in env, take it from the included node headers.

@@ -6,4 +6,7 @@ extern "system" {
#[link_name = "NeonSys_Module_ExecKernel"]
pub fn exec_kernel(kernel: *mut c_void, callback: extern fn(*mut c_void, *mut c_void, *mut c_void), exports: Local, scope: *mut c_void);

#[link_name = "NeonSys_Module_GetVersion"]
pub fn get_version() -> u32;
Copy link
Author

@shawedwa shawedwa Sep 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Wrong type. Should be i32 to match __NODE_MODULE

@shawedwa shawedwa force-pushed the feature/header-module-version branch 4 times, most recently from 59c9916 to a74fcbf Compare September 5, 2016 03:24
@shawedwa
Copy link
Author

shawedwa commented Sep 5, 2016

Sorry - new to Rust. Worked out the macro_internal stuff, so it all works properly now.

If module abi version isn't specified in env, take it from the included node headers.
@EdShaw EdShaw force-pushed the feature/header-module-version branch from a74fcbf to 51bd3cd Compare September 5, 2016 03:41
@EdShaw
Copy link
Contributor

EdShaw commented Sep 5, 2016

Helps if I use the right account too. ><

@19h
Copy link

19h commented Sep 23, 2016

Can you also touch the invocation to not pass the environment variable anymore? This will make the NEON_NODE_ABI an optional override.

@EdShaw
Copy link
Contributor

EdShaw commented Oct 15, 2016

Yup:
neon-bindings/neon-cli#31

@EdShaw
Copy link
Contributor

EdShaw commented Nov 3, 2016

Superseded by: #123

@dherman
Copy link
Collaborator

dherman commented Dec 19, 2016

This is awesome, and I'm sorry for taking so long to review! I'm working with @jedireza to try to keep on top of PRs more regularly.

Because this needs to sync with neon-bindings/neon-cli#31 it's worth merging independently of #123, and I think some aspects of #123 won't be able to land as-is anyway. So I think we should merge this one.

As far as I can tell, this improvement has the same behavior as the way it originally works, but is simply less brittle. So it seems like a clear win.

Thanks so much!

@dherman
Copy link
Collaborator

dherman commented Dec 19, 2016

(I think @jedireza wanted to just test this out in a few versions of Node before merging, so I'll wait to merge till he's ready.)

@jedireza
Copy link
Contributor

jedireza commented Dec 23, 2016

r+

I tested using the latest node 4, 6, 7 with mac and linux.

@dherman dherman merged commit f178c4a into neon-bindings:master Dec 23, 2016
@dherman
Copy link
Collaborator

dherman commented Dec 23, 2016

(Next I'll merge the commit that eliminates the env variable entirely.)

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.

5 participants