-
Notifications
You must be signed in to change notification settings - Fork 94
Missing symbols with ts-protoc-gen #30
Comments
Well, I was able to workaround the above issue by placing /// <reference types="node" /> In |
Next issue is a disconnect between expected and actual location of generated declaration files as influenced by the Printing the expected outputs in
Printing out the compilerOptions object in compiler options: {
"alwaysStrict": true,
"sourceMap": false,
"declaration": true,
"declarationDir": "/private/var/tmp/_bazel_pcj/4418fe7b2dbf857e1778404007ae0f68/bazel-sandbox/2915656605711346695/execroot/__main__/lib",
"target": 1,
"removeComments": true,
"noImplicitReturns": true,
"noImplicitAny": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strictNullChecks": true,
"stripInternal": true,
"noFallthroughCasesInSwitch": true,
"outDir": "/private/var/tmp/_bazel_pcj/4418fe7b2dbf857e1778404007ae0f68/bazel-sandbox/2915656605711346695/execroot/__main__/bazel-out/local-fastbuild/bin",
"noEmitOnError": false,
"typeRoots": [
"/private/var/tmp/_bazel_pcj/4418fe7b2dbf857e1778404007ae0f68/bazel-sandbox/2915656605711346695/execroot/__main__/node_modules/@types"
],
"downlevelIteration": true,
"skipDefaultLibCheck": true,
"module": 1,
"moduleResolution": 2,
"rootDir": "/private/var/tmp/_bazel_pcj/4418fe7b2dbf857e1778404007ae0f68/bazel-sandbox/2915656605711346695/execroot/__main__",
"rootDirs": [
"/private/var/tmp/_bazel_pcj/4418fe7b2dbf857e1778404007ae0f68/bazel-sandbox/2915656605711346695/execroot/__main__/bazel-out/local-fastbuild/genfiles",
"/private/var/tmp/_bazel_pcj/4418fe7b2dbf857e1778404007ae0f68/bazel-sandbox/2915656605711346695/execroot/__main__/bazel-out/local-fastbuild/bin",
"/private/var/tmp/_bazel_pcj/4418fe7b2dbf857e1778404007ae0f68/bazel-sandbox/2915656605711346695/execroot/__main__"
],
"baseUrl": "/private/var/tmp/_bazel_pcj/4418fe7b2dbf857e1778404007ae0f68/bazel-sandbox/2915656605711346695/execroot/__main__",
"paths": {
"*": [
"./*",
"bazel-out/local-fastbuild/genfiles/*",
"bazel-out/local-fastbuild/bin/*"
]
},
"preserveConstEnums": false,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"jsx": 2,
"jsxFactory": "React.createElement",
"inlineSourceMap": true,
"inlineSources": true
} The delete options["declarationDir"] All outputs are generated as expected :) Will look into how |
So it looks like Probably this needs to be checked in @fortuna @alexeagle thoughts? Reference: |
Hey @pcj great to see you here! You're among the first to try integrating with this rule, I would not be surprised if you find a bunch more issues, and I'm grateful for all of them. I have not heard of What's the use case that drives you to want |
Honestly I agree with you, I don't see the real utility of declarationDir myself, but clearly it exists in the wild. I'd favor overwriting it / eliminating it in tsc_wrapper.ts and updating the README as I can't imagine anyone would care where files end up in Happy to post a PR if you like. |
My guess is that That said, if we do support such a thing, I think it belongs in the packaging rule, not in Sure, you can do a PR if you're interested. Also, are you thinking of using Bazel for a project? |
Is this fixed now? |
Yep, with workaround noted in #31. |
I'm working on getting
ts-protoc-gen
to compile with rules_typescript. First real project I've used with rules_typescript soit may beis likely something stupid I'm doing.Which made me think the ambient node types are missing, but they seem to be present:
Any pointers on how to approach it?
improbable-eng/ts-protoc-gen#24
The text was updated successfully, but these errors were encountered: