You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently turbo repo error outputs when building display relative paths to the the file containing the error, relative to the package, not the mono repo root. See below for an example:
@mine/test-service:build: src/services/index.ts:114:42 - error TS2345: Argument of type'number' is not assignable to parameter of type'MyType'.
@mine/test-service:build:
@mine/test-service:build: 114 .myMethod(arg1, numberArg2)
This causes issues when using a mono repo inside IDEs such as vscode which run a regex over the output to match the errors to the files in the IDE. The current behaviour when using a tsc regex expression is a malformed file as it's not able to deduce it's absolute path. See example here https://code.visualstudio.com/docs/editor/tasks.
Describe the solution you'd like
An option to enable absolute paths would be desirable and an example of the output could be like the following:
@mine/test-service:build: /root/home/user/project/monorepo/package/src/services/index.ts:114:42 - error TS2345: Argument of type'number' is not assignable to parameter of type'MyType'.
@mine/test-service:build:
@mine/test-service:build: 114 .myMethod(arg1, numberArg2)
Note the inclusion of the full path /root/home/user/project/monorepo/test-service/src/services/index.ts:114:42 instead of the relative path src/services/index.ts:114:42.
Super Thumbs up! I have a large mono repo using yarn3 and if there is an error in src/index.ts, clicking on it in vsCode just gives me a list of all the src/index.ts files in all the packages or takes me to the src/index.ts if that exists in the root package.
Neither of these are great and being able to click from a list of compile errors to the files where the errors occur improves development velocity substantially.
In a perfect world, tsc check the composite field in the tsconfig and if it is there, build a relative path back to the root (tsconfig without a composite field).
I don't think this is something that turbo can address, as this error is coming from tsc. We do have the path to the package when running the task, but we don't know what parts of the output are supposed to be filesystem paths.
Describe the feature you'd like to request
Currently turbo repo error outputs when building display relative paths to the the file containing the error, relative to the package, not the mono repo root. See below for an example:
This causes issues when using a mono repo inside IDEs such as
vscode
which run a regex over the output to match the errors to the files in the IDE. The current behaviour when using a tsc regex expression is a malformed file as it's not able to deduce it's absolute path. See example here https://code.visualstudio.com/docs/editor/tasks.Describe the solution you'd like
An option to enable absolute paths would be desirable and an example of the output could be like the following:
Note the inclusion of the full path
/root/home/user/project/monorepo/test-service/src/services/index.ts:114:42
instead of the relative pathsrc/services/index.ts:114:42
.Describe alternatives you've considered
Ideally this would be solved upstream in tsc as per the existing ticket here microsoft/TypeScript#36221
I'm not familiar with the inner-working of turborepo but assembly an absolute path as it traverses the packages seems possible.
The text was updated successfully, but these errors were encountered: