Skip to content

Commit f1d606a

Browse files
authored
fix(build): avoid use of debug script for capnpc build step (#101)
1 parent 699685f commit f1d606a

File tree

3 files changed

+381
-381
lines changed

3 files changed

+381
-381
lines changed

gulpfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function compileCapnp() {
4040
return file.path.endsWith('.capnp') && CAPNP_WHITELIST.some((p) => file.path.endsWith(p));
4141
}).forEach(function (file) {
4242
gutil.log('Compiling', "'" + gutil.colors.cyan(path.relative(__dirname, file.path)) + "'...");
43-
var options = ['-o./packages/capnpc-ts/bin/capnpc-ts.ts', '-I', path.join(__dirname, 'src', 'std'), file.path];
43+
var options = ['-o./packages/capnpc-ts/bin/capnpc-ts.js', '-I', path.join(__dirname, 'src', 'std'), file.path];
4444
var result = spawnSync('capnpc', options, { stdio: 'inherit' });
4545
if (result.status !== 0) {
4646
throw new Error('Process exited with non-zero status: ' + result.status);

packages/capnp-ts/src/std/schema.capnp.ts

+85-85
Original file line numberDiff line numberDiff line change
@@ -21,39 +21,39 @@ export class Node_NestedNode extends __S {
2121
setId(value: capnp.Uint64): void { __S.setUint64(0, value, this); }
2222
toString(): string { return "Node_NestedNode_" + super.toString(); }
2323
}
24-
export class Node_Const extends __S {
25-
static readonly _capnp = { displayName: "const", id: "b18aa5ac7a0d9420", size: new __O(40, 6) };
24+
export class Node_Annotation extends __S {
25+
static readonly _capnp = { displayName: "annotation", id: "ec1619d4400a0290", size: new __O(40, 6) };
2626
adoptType(value: capnp.Orphan<Type>): void { __S.adopt(value, __S.getPointer(3, this)); }
2727
disownType(): capnp.Orphan<Type> { return __S.disown(this.getType()); }
2828
getType(): Type { return __S.getStruct(3, Type, this); }
2929
hasType(): boolean { return !__S.isNull(__S.getPointer(3, this)); }
3030
initType(): Type { return __S.initStructAt(3, Type, this); }
3131
setType(value: Type): void { __S.copyFrom(value, __S.getPointer(3, this)); }
32-
adoptValue(value: capnp.Orphan<Value>): void { __S.adopt(value, __S.getPointer(4, this)); }
33-
disownValue(): capnp.Orphan<Value> { return __S.disown(this.getValue()); }
34-
getValue(): Value { return __S.getStruct(4, Value, this); }
35-
hasValue(): boolean { return !__S.isNull(__S.getPointer(4, this)); }
36-
initValue(): Value { return __S.initStructAt(4, Value, this); }
37-
setValue(value: Value): void { __S.copyFrom(value, __S.getPointer(4, this)); }
38-
toString(): string { return "Node_Const_" + super.toString(); }
39-
}
40-
export class Node_Interface extends __S {
41-
static readonly _capnp = { displayName: "interface", id: "e82753cff0c2218f", size: new __O(40, 6) };
42-
static _Methods: capnp.ListCtor<Method>;
43-
static _Superclasses: capnp.ListCtor<Superclass>;
44-
adoptMethods(value: capnp.Orphan<capnp.List<Method>>): void { __S.adopt(value, __S.getPointer(3, this)); }
45-
disownMethods(): capnp.Orphan<capnp.List<Method>> { return __S.disown(this.getMethods()); }
46-
getMethods(): capnp.List<Method> { return __S.getList(3, Node_Interface._Methods, this); }
47-
hasMethods(): boolean { return !__S.isNull(__S.getPointer(3, this)); }
48-
initMethods(length: number): capnp.List<Method> { return __S.initList(3, Node_Interface._Methods, length, this); }
49-
setMethods(value: capnp.List<Method>): void { __S.copyFrom(value, __S.getPointer(3, this)); }
50-
adoptSuperclasses(value: capnp.Orphan<capnp.List<Superclass>>): void { __S.adopt(value, __S.getPointer(4, this)); }
51-
disownSuperclasses(): capnp.Orphan<capnp.List<Superclass>> { return __S.disown(this.getSuperclasses()); }
52-
getSuperclasses(): capnp.List<Superclass> { return __S.getList(4, Node_Interface._Superclasses, this); }
53-
hasSuperclasses(): boolean { return !__S.isNull(__S.getPointer(4, this)); }
54-
initSuperclasses(length: number): capnp.List<Superclass> { return __S.initList(4, Node_Interface._Superclasses, length, this); }
55-
setSuperclasses(value: capnp.List<Superclass>): void { __S.copyFrom(value, __S.getPointer(4, this)); }
56-
toString(): string { return "Node_Interface_" + super.toString(); }
32+
getTargetsFile(): boolean { return __S.getBit(112, this); }
33+
setTargetsFile(value: boolean): void { __S.setBit(112, value, this); }
34+
getTargetsConst(): boolean { return __S.getBit(113, this); }
35+
setTargetsConst(value: boolean): void { __S.setBit(113, value, this); }
36+
getTargetsEnum(): boolean { return __S.getBit(114, this); }
37+
setTargetsEnum(value: boolean): void { __S.setBit(114, value, this); }
38+
getTargetsEnumerant(): boolean { return __S.getBit(115, this); }
39+
setTargetsEnumerant(value: boolean): void { __S.setBit(115, value, this); }
40+
getTargetsStruct(): boolean { return __S.getBit(116, this); }
41+
setTargetsStruct(value: boolean): void { __S.setBit(116, value, this); }
42+
getTargetsField(): boolean { return __S.getBit(117, this); }
43+
setTargetsField(value: boolean): void { __S.setBit(117, value, this); }
44+
getTargetsUnion(): boolean { return __S.getBit(118, this); }
45+
setTargetsUnion(value: boolean): void { __S.setBit(118, value, this); }
46+
getTargetsGroup(): boolean { return __S.getBit(119, this); }
47+
setTargetsGroup(value: boolean): void { __S.setBit(119, value, this); }
48+
getTargetsInterface(): boolean { return __S.getBit(120, this); }
49+
setTargetsInterface(value: boolean): void { __S.setBit(120, value, this); }
50+
getTargetsMethod(): boolean { return __S.getBit(121, this); }
51+
setTargetsMethod(value: boolean): void { __S.setBit(121, value, this); }
52+
getTargetsParam(): boolean { return __S.getBit(122, this); }
53+
setTargetsParam(value: boolean): void { __S.setBit(122, value, this); }
54+
getTargetsAnnotation(): boolean { return __S.getBit(123, this); }
55+
setTargetsAnnotation(value: boolean): void { __S.setBit(123, value, this); }
56+
toString(): string { return "Node_Annotation_" + super.toString(); }
5757
}
5858
export class Node_Struct extends __S {
5959
static readonly _capnp = { displayName: "struct", id: "9ea0b19b37fb4435", size: new __O(40, 6) };
@@ -78,39 +78,39 @@ export class Node_Struct extends __S {
7878
setFields(value: capnp.List<Field>): void { __S.copyFrom(value, __S.getPointer(3, this)); }
7979
toString(): string { return "Node_Struct_" + super.toString(); }
8080
}
81-
export class Node_Annotation extends __S {
82-
static readonly _capnp = { displayName: "annotation", id: "ec1619d4400a0290", size: new __O(40, 6) };
81+
export class Node_Const extends __S {
82+
static readonly _capnp = { displayName: "const", id: "b18aa5ac7a0d9420", size: new __O(40, 6) };
8383
adoptType(value: capnp.Orphan<Type>): void { __S.adopt(value, __S.getPointer(3, this)); }
8484
disownType(): capnp.Orphan<Type> { return __S.disown(this.getType()); }
8585
getType(): Type { return __S.getStruct(3, Type, this); }
8686
hasType(): boolean { return !__S.isNull(__S.getPointer(3, this)); }
8787
initType(): Type { return __S.initStructAt(3, Type, this); }
8888
setType(value: Type): void { __S.copyFrom(value, __S.getPointer(3, this)); }
89-
getTargetsFile(): boolean { return __S.getBit(112, this); }
90-
setTargetsFile(value: boolean): void { __S.setBit(112, value, this); }
91-
getTargetsConst(): boolean { return __S.getBit(113, this); }
92-
setTargetsConst(value: boolean): void { __S.setBit(113, value, this); }
93-
getTargetsEnum(): boolean { return __S.getBit(114, this); }
94-
setTargetsEnum(value: boolean): void { __S.setBit(114, value, this); }
95-
getTargetsEnumerant(): boolean { return __S.getBit(115, this); }
96-
setTargetsEnumerant(value: boolean): void { __S.setBit(115, value, this); }
97-
getTargetsStruct(): boolean { return __S.getBit(116, this); }
98-
setTargetsStruct(value: boolean): void { __S.setBit(116, value, this); }
99-
getTargetsField(): boolean { return __S.getBit(117, this); }
100-
setTargetsField(value: boolean): void { __S.setBit(117, value, this); }
101-
getTargetsUnion(): boolean { return __S.getBit(118, this); }
102-
setTargetsUnion(value: boolean): void { __S.setBit(118, value, this); }
103-
getTargetsGroup(): boolean { return __S.getBit(119, this); }
104-
setTargetsGroup(value: boolean): void { __S.setBit(119, value, this); }
105-
getTargetsInterface(): boolean { return __S.getBit(120, this); }
106-
setTargetsInterface(value: boolean): void { __S.setBit(120, value, this); }
107-
getTargetsMethod(): boolean { return __S.getBit(121, this); }
108-
setTargetsMethod(value: boolean): void { __S.setBit(121, value, this); }
109-
getTargetsParam(): boolean { return __S.getBit(122, this); }
110-
setTargetsParam(value: boolean): void { __S.setBit(122, value, this); }
111-
getTargetsAnnotation(): boolean { return __S.getBit(123, this); }
112-
setTargetsAnnotation(value: boolean): void { __S.setBit(123, value, this); }
113-
toString(): string { return "Node_Annotation_" + super.toString(); }
89+
adoptValue(value: capnp.Orphan<Value>): void { __S.adopt(value, __S.getPointer(4, this)); }
90+
disownValue(): capnp.Orphan<Value> { return __S.disown(this.getValue()); }
91+
getValue(): Value { return __S.getStruct(4, Value, this); }
92+
hasValue(): boolean { return !__S.isNull(__S.getPointer(4, this)); }
93+
initValue(): Value { return __S.initStructAt(4, Value, this); }
94+
setValue(value: Value): void { __S.copyFrom(value, __S.getPointer(4, this)); }
95+
toString(): string { return "Node_Const_" + super.toString(); }
96+
}
97+
export class Node_Interface extends __S {
98+
static readonly _capnp = { displayName: "interface", id: "e82753cff0c2218f", size: new __O(40, 6) };
99+
static _Methods: capnp.ListCtor<Method>;
100+
static _Superclasses: capnp.ListCtor<Superclass>;
101+
adoptMethods(value: capnp.Orphan<capnp.List<Method>>): void { __S.adopt(value, __S.getPointer(3, this)); }
102+
disownMethods(): capnp.Orphan<capnp.List<Method>> { return __S.disown(this.getMethods()); }
103+
getMethods(): capnp.List<Method> { return __S.getList(3, Node_Interface._Methods, this); }
104+
hasMethods(): boolean { return !__S.isNull(__S.getPointer(3, this)); }
105+
initMethods(length: number): capnp.List<Method> { return __S.initList(3, Node_Interface._Methods, length, this); }
106+
setMethods(value: capnp.List<Method>): void { __S.copyFrom(value, __S.getPointer(3, this)); }
107+
adoptSuperclasses(value: capnp.Orphan<capnp.List<Superclass>>): void { __S.adopt(value, __S.getPointer(4, this)); }
108+
disownSuperclasses(): capnp.Orphan<capnp.List<Superclass>> { return __S.disown(this.getSuperclasses()); }
109+
getSuperclasses(): capnp.List<Superclass> { return __S.getList(4, Node_Interface._Superclasses, this); }
110+
hasSuperclasses(): boolean { return !__S.isNull(__S.getPointer(4, this)); }
111+
initSuperclasses(length: number): capnp.List<Superclass> { return __S.initList(4, Node_Interface._Superclasses, length, this); }
112+
setSuperclasses(value: capnp.List<Superclass>): void { __S.copyFrom(value, __S.getPointer(4, this)); }
113+
toString(): string { return "Node_Interface_" + super.toString(); }
114114
}
115115
export class Node_Enum extends __S {
116116
static readonly _capnp = { displayName: "enum", id: "b54ab3364333f598", size: new __O(40, 6) };
@@ -227,12 +227,6 @@ export class Node extends __S {
227227
toString(): string { return "Node_" + super.toString(); }
228228
which(): Node_Which { return __S.getUint16(12, this); }
229229
}
230-
export class Field_Group extends __S {
231-
static readonly _capnp = { displayName: "group", id: "cafccddb68db1d11", size: new __O(24, 4) };
232-
getTypeId(): capnp.Uint64 { return __S.getUint64(16, this); }
233-
setTypeId(value: capnp.Uint64): void { __S.setUint64(16, value, this); }
234-
toString(): string { return "Field_Group_" + super.toString(); }
235-
}
236230
export enum Field_Ordinal_Which {
237231
IMPLICIT = 0,
238232
EXPLICIT = 1
@@ -255,6 +249,12 @@ export class Field_Ordinal extends __S {
255249
toString(): string { return "Field_Ordinal_" + super.toString(); }
256250
which(): Field_Ordinal_Which { return __S.getUint16(10, this); }
257251
}
252+
export class Field_Group extends __S {
253+
static readonly _capnp = { displayName: "group", id: "cafccddb68db1d11", size: new __O(24, 4) };
254+
getTypeId(): capnp.Uint64 { return __S.getUint64(16, this); }
255+
setTypeId(value: capnp.Uint64): void { __S.setUint64(16, value, this); }
256+
toString(): string { return "Field_Group_" + super.toString(); }
257+
}
258258
export class Field_Slot extends __S {
259259
static readonly _capnp = { displayName: "slot", id: "c42305476bb4746f", size: new __O(24, 4) };
260260
getOffset(): number { return __S.getUint32(4, this); }
@@ -387,6 +387,30 @@ export class Method extends __S {
387387
setAnnotations(value: capnp.List<Annotation>): void { __S.copyFrom(value, __S.getPointer(1, this)); }
388388
toString(): string { return "Method_" + super.toString(); }
389389
}
390+
export class Type_Enum extends __S {
391+
static readonly _capnp = { displayName: "enum", id: "9e0e78711a7f87a9", size: new __O(24, 1) };
392+
getTypeId(): capnp.Uint64 { return __S.getUint64(8, this); }
393+
setTypeId(value: capnp.Uint64): void { __S.setUint64(8, value, this); }
394+
adoptBrand(value: capnp.Orphan<Brand>): void { __S.adopt(value, __S.getPointer(0, this)); }
395+
disownBrand(): capnp.Orphan<Brand> { return __S.disown(this.getBrand()); }
396+
getBrand(): Brand { return __S.getStruct(0, Brand, this); }
397+
hasBrand(): boolean { return !__S.isNull(__S.getPointer(0, this)); }
398+
initBrand(): Brand { return __S.initStructAt(0, Brand, this); }
399+
setBrand(value: Brand): void { __S.copyFrom(value, __S.getPointer(0, this)); }
400+
toString(): string { return "Type_Enum_" + super.toString(); }
401+
}
402+
export class Type_Struct extends __S {
403+
static readonly _capnp = { displayName: "struct", id: "ac3a6f60ef4cc6d3", size: new __O(24, 1) };
404+
getTypeId(): capnp.Uint64 { return __S.getUint64(8, this); }
405+
setTypeId(value: capnp.Uint64): void { __S.setUint64(8, value, this); }
406+
adoptBrand(value: capnp.Orphan<Brand>): void { __S.adopt(value, __S.getPointer(0, this)); }
407+
disownBrand(): capnp.Orphan<Brand> { return __S.disown(this.getBrand()); }
408+
getBrand(): Brand { return __S.getStruct(0, Brand, this); }
409+
hasBrand(): boolean { return !__S.isNull(__S.getPointer(0, this)); }
410+
initBrand(): Brand { return __S.initStructAt(0, Brand, this); }
411+
setBrand(value: Brand): void { __S.copyFrom(value, __S.getPointer(0, this)); }
412+
toString(): string { return "Type_Struct_" + super.toString(); }
413+
}
390414
export enum Type_AnyPointer_Unconstrained_Which {
391415
ANY_KIND = 0,
392416
STRUCT = 1,
@@ -467,30 +491,6 @@ export class Type_AnyPointer extends __S {
467491
toString(): string { return "Type_AnyPointer_" + super.toString(); }
468492
which(): Type_AnyPointer_Which { return __S.getUint16(8, this); }
469493
}
470-
export class Type_Struct extends __S {
471-
static readonly _capnp = { displayName: "struct", id: "ac3a6f60ef4cc6d3", size: new __O(24, 1) };
472-
getTypeId(): capnp.Uint64 { return __S.getUint64(8, this); }
473-
setTypeId(value: capnp.Uint64): void { __S.setUint64(8, value, this); }
474-
adoptBrand(value: capnp.Orphan<Brand>): void { __S.adopt(value, __S.getPointer(0, this)); }
475-
disownBrand(): capnp.Orphan<Brand> { return __S.disown(this.getBrand()); }
476-
getBrand(): Brand { return __S.getStruct(0, Brand, this); }
477-
hasBrand(): boolean { return !__S.isNull(__S.getPointer(0, this)); }
478-
initBrand(): Brand { return __S.initStructAt(0, Brand, this); }
479-
setBrand(value: Brand): void { __S.copyFrom(value, __S.getPointer(0, this)); }
480-
toString(): string { return "Type_Struct_" + super.toString(); }
481-
}
482-
export class Type_Enum extends __S {
483-
static readonly _capnp = { displayName: "enum", id: "9e0e78711a7f87a9", size: new __O(24, 1) };
484-
getTypeId(): capnp.Uint64 { return __S.getUint64(8, this); }
485-
setTypeId(value: capnp.Uint64): void { __S.setUint64(8, value, this); }
486-
adoptBrand(value: capnp.Orphan<Brand>): void { __S.adopt(value, __S.getPointer(0, this)); }
487-
disownBrand(): capnp.Orphan<Brand> { return __S.disown(this.getBrand()); }
488-
getBrand(): Brand { return __S.getStruct(0, Brand, this); }
489-
hasBrand(): boolean { return !__S.isNull(__S.getPointer(0, this)); }
490-
initBrand(): Brand { return __S.initStructAt(0, Brand, this); }
491-
setBrand(value: Brand): void { __S.copyFrom(value, __S.getPointer(0, this)); }
492-
toString(): string { return "Type_Enum_" + super.toString(); }
493-
}
494494
export class Type_List extends __S {
495495
static readonly _capnp = { displayName: "list", id: "87e739250a60ea97", size: new __O(24, 1) };
496496
adoptElementType(value: capnp.Orphan<Type>): void { __S.adopt(value, __S.getPointer(0, this)); }
@@ -1033,9 +1033,9 @@ export class CodeGeneratorRequest extends __S {
10331033
setRequestedFiles(value: capnp.List<CodeGeneratorRequest_RequestedFile>): void { __S.copyFrom(value, __S.getPointer(1, this)); }
10341034
toString(): string { return "CodeGeneratorRequest_" + super.toString(); }
10351035
}
1036+
Node_Struct._Fields = capnp.CompositeList(Field);
10361037
Node_Interface._Methods = capnp.CompositeList(Method);
10371038
Node_Interface._Superclasses = capnp.CompositeList(Superclass);
1038-
Node_Struct._Fields = capnp.CompositeList(Field);
10391039
Node_Enum._Enumerants = capnp.CompositeList(Enumerant);
10401040
Node._Parameters = capnp.CompositeList(Node_Parameter);
10411041
Node._NestedNodes = capnp.CompositeList(Node_NestedNode);

0 commit comments

Comments
 (0)