Issue 62: add V8_VERSION to v8.h
http://code.google.com/p/v8/issues/detail?id=62

Comment #2 by nicolas.alvarez:
I prefer the "check for features, not for versions" philosophy.

v8 project is open source. Suppose one day it's forked (let's call the  
fork "b9").
How can it stay API-compatible with v8? It could have
V8_VERSION_{MAJOR,MINOR,REVISION} constants that don't say the b9 version  
number,
but the v8 version number matching its features, so that version checks in  
user
code still work if it's compiled with b9 instead of v8.

But: suppose one day v8 adds feature A, and bumps its version number to  
3.0.2.
Weeks later, it adds feature B, and bumps version number to 3.0.3. Projects  
that
use v8 check for V8_VERSION_REVISION being >= 2 if they need A, or >= 3 if  
they
need B (or both). (Of course, they should also check major and minor!)

Now, suppose the b9 project adds feature B by applying the patches from the  
v8
project (possible since the code license is the same), but not feature A.  
How can
it be API-compatible with v8? What is the "correct" value of  
V8_VERSION_REVISION in
this case?

If it sets 1 to say it doesn't support A, programs needing B and checking  
for >=3
will think it's not supported. If it sets 3 to say it supports B, programs  
needing
A and checking for >=2 will try to use A and fail.

Solution? V8_FEATURE_A, V8_FEATURE_B.




-- 
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to