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 option to keep $$_gendir around for debugging purposes. #6203

Closed
samartioli opened this Issue May 5, 2017 · 10 comments

Comments

Projects
None yet
8 participants
@samartioli
Copy link

samartioli commented May 5, 2017

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [X] feature request

Versions.

$ ng --version
@angular/cli: 1.0.1
node: 7.9.0
os: darwin x64
@angular/animations: 4.1.0
@angular/common: 4.1.0
@angular/compiler: 4.1.0
@angular/core: 4.1.0
@angular/forms: 4.1.0
@angular/http: 4.1.0
@angular/material: 2.0.0-beta.3
@angular/platform-browser: 4.1.0
@angular/platform-browser-dynamic: 4.1.0
@angular/router: 4.1.0
@angular/cli: 1.0.1
@angular/compiler-cli: 4.1.0

OSX 10.12.4

Repro steps.

Any ng command line failure

The log given by the failure.

For instance:

ERROR in src/$$_gendir/app/core/core.module.ngfactory.ts (308,7): Supplied parameters do not match any signature of call target.

ERROR in src/$$_gendir/app/app.module.ngfactory.ts (355,7): Supplied parameters do not match any signature of call target.

Desired functionality.

I am not able to access $$_gendir to begin an investigation as to what may be the issue. In this particular case, I discovered that I needed to declare a parameter, even though I wasn't using it, for AOT.

It would be great it ng had a flag to keep the intermediate build dir around for inspection.
Maybe --keep-gendir

Mention any other details that might be useful.

@clydin

This comment has been minimized.

Copy link
Member

clydin commented May 5, 2017

It's actually completely in memory so there really is nothing to keep around.
You didn't fill out what versions you are using but with the latest angular and CLI, template error message should be improved over earlier versions with more improvements on the way.

@samartioli

This comment has been minimized.

Copy link

samartioli commented May 6, 2017

Couldn't it write out like a core dump in case of an error?

@samartioli

This comment has been minimized.

Copy link

samartioli commented May 8, 2017

Sorry.. just noticed most of my bug report was commented out with html :)
You should now be able to see it all above

@filipesilva

This comment has been minimized.

Copy link
Member

filipesilva commented May 8, 2017

@hansl WDYT?

@clydin

This comment has been minimized.

Copy link
Member

clydin commented May 8, 2017

Thanks. The full issue is far more illuminating. I was actually going to ask for the scenario you were encountering.
Ideally the error should be mapped back to the relevant origin source file. But maybe some type of '--gen-dump' option with a path could be useful on the ng build command as a stopgap.

@kylecordes

This comment has been minimized.

Copy link

kylecordes commented May 22, 2017

The ability to output these files would also be helpful even in the absence of errors - I would show them while explaining the purpose and benefit of AOT to new-to-Angular developers. (Without needing to switch away from CLI to ngc.)

@rimlin

This comment has been minimized.

Copy link

rimlin commented Jul 11, 2017

Is there any progress? This is very useful option to debugging

@csvn

This comment has been minimized.

Copy link

csvn commented Jul 24, 2017

I just ran into an issue that looks like #7062, which would be much easier to figure out if it was possible to search the $$_gendir for the issue.

@wshaver

This comment has been minimized.

Copy link

wshaver commented Nov 7, 2017

Hoping for this too :(

@hansl

This comment has been minimized.

Copy link
Collaborator

hansl commented Jan 14, 2019

There is no gendir anymore. We should have proper debugging tools for builds, but this issue is not one of them.

@hansl hansl closed this Jan 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment