Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trace method to servicesHost #691

Closed
onigoetz opened this issue Dec 7, 2017 · 4 comments
Closed

Add trace method to servicesHost #691

onigoetz opened this issue Dec 7, 2017 · 4 comments

Comments

@onigoetz
Copy link
Contributor

onigoetz commented Dec 7, 2017

Expected Behaviour

Adding "traceResolution": true, to tsconfig.json should display logs of how imported modules are resolved. It's very useful for debugging.

Actual Behaviour

Setting traceResolution to true makes no difference in the output. The cause is that the declared ServicesHost doesn't provide a trace method.

Can we add a method that will output those informations ?

Normal output is like:

Module 'http' was resolved as locally declared ambient module in file '/home/sgoetz/workspace/foundation/ts-project/server-war/src/main/frontend/node_modules/@types/node/index.d.ts'.

Steps to Reproduce the Problem

Add "traceResolution": true, to your compilerOptions in tsconfig.json and see that nothing is different in your build.

Location of a Minimal Repository that Demonstrates the Issue.

I don't have one, but it works on any project using ts-loader

@flyon
Copy link

flyon commented Dec 15, 2017

yes, I confirm. Right now I have a module that cannot be found even though its installed under @types, would like to debug with traceResolution, but neither in tsconfig.json nor through ts-loader -> compilerOptions overwrite works

@johnnyreilly
Copy link
Member

I'm open to this being added. Would you like to submit a speculative PR and we can iterate on that?

@onigoetz
Copy link
Contributor Author

Sure I can do that

johnnyreilly added a commit that referenced this issue Feb 7, 2018
Initial implementation of trace for traceResolution in #691
@onigoetz
Copy link
Contributor Author

onigoetz commented Feb 7, 2018

Closing now that this was merged in #721

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants