Browse Source

codecgen: update GenVersion to 3.

Some helper methods have changed. Consequently, formerly
generated code will no longer work.

Update GenVersion to reflect that, and force users to re-generate.

Update #101 #100 ...
Ugorji Nwoke 10 years ago
parent
commit
718a1bcd19
1 changed files with 8 additions and 1 deletions
  1. 8 1
      codec/gen.go

+ 8 - 1
codec/gen.go

@@ -77,7 +77,14 @@ import (
 //   It was a concious decision to have gen.go always explicitly call EncodeNil or TryDecodeAsNil.
 //   It was a concious decision to have gen.go always explicitly call EncodeNil or TryDecodeAsNil.
 //   This way, there isn't a function call overhead just to see that we should not enter a block of code.
 //   This way, there isn't a function call overhead just to see that we should not enter a block of code.
 
 
-const GenVersion = 2 // increment this value each time codecgen changes fundamentally.
+// GenVersion is the current version of codecgen.
+//
+// NOTE: Increment this value each time codecgen changes fundamentally.
+// Fundamental changes are:
+//   - helper methods change (signature change, new ones added, some removed, etc)
+//   - codecgen command line changes
+//
+const GenVersion = 3
 
 
 const (
 const (
 	genCodecPkg        = "codec1978"
 	genCodecPkg        = "codec1978"