3

I want to use that version of nodejs that is compatible with my current version of v8 that we are using somewhere else.

I looked into "that" v8 ChangeLog file and it showed

> 2013-04-04: Version 3.17.16
> 
>         Stack trace API: poison stack frames below the first strict mode frame.
>         (issue 2564)

So i wanted to revert back to that version of nodejs that uses this or earlier v8. I changed the node.gyp file all deps/v8 to path_of_some_v8.

Then I did

cd path/to/node
gitk 

and then from the gui i selected v8: update to 3.14.5.9 and reset master branch to that commit with mixed [ which says leaving working tree as such and resetting master ].

I then rebuild the node using vcbuild.bat but i am getting errors like

type is ''unknown-type''
src\node_http_parser.cc(553): error C2664: 'v8::FunctionTemplate::New' : cannot
 convert parameter 1 from 'void (__cdecl *)(const int)' to 'v8::InvocationCallb
ack' [C:\CEF\anand\chromium\chromium\src\node_2012\node\node.vcxproj]
          Incompatible calling conventions for UDT return value
src\node_http_parser.cc(570): error C2660: 'node::NODE_SET_PROTOTYPE_METHOD' :
function does not take 3 arguments [C:\CEF\anand\chromium\chromium\src\node_201
2\node\node.vcxproj]
src\node_http_parser.cc(571): error C2660: 'node::NODE_SET_PROTOTYPE_METHOD' :
function does not take 3 arguments [C:\CEF\anand\chromium\chromium\src\node_201
2\node\node.vcxproj]
src\node_http_parser.cc(572): error C2660: 'node::NODE_SET_PROTOTYPE_METHOD' :
function does not take 3 arguments [C:\CEF\anand\chromium\chromium\src\node_201
2\node\node.vcxproj]

Is my method of reverting back the code is right ? What should i build node with old version of v8 ?

Ashish Negi
  • 5,193
  • 8
  • 51
  • 95
  • How about using `--shared-v8` option while building node? – vinayr Sep 02 '13 at 05:15
  • @vinayr i do not know about that, can you tell me how to do it ? – Ashish Negi Sep 02 '13 at 05:18
  • It's a configure option. Check here for more details https://github.com/joyent/node/blob/master/configure. Example here - http://blog.coolaj86.com/articles/debugging-v8-and-node-js-on-arm.html – vinayr Sep 02 '13 at 05:21
  • I am not using shared library and the point is to make node compatible with that version of v8. If it can not compile with its source code, it would not link too with its library too. – Ashish Negi Sep 02 '13 at 05:31

1 Answers1

0

git reset --mixed will leave the files in the working directory unchanged (the files you are actually building against). If you want to use reset, git reset --hard <commit> will also change the files in the working directory.

I would recommend doing git checkout <commit>. This puts you into a detached head, does not move your branch, and still lets you look/build against the code at that point. See https://stackoverflow.com/a/5772882/1049112 for an excellent explanation of what a detached head is.

Community
  • 1
  • 1
onionjake
  • 3,905
  • 27
  • 46