Skip to content

Files that import .template.dart files that are generated by Angular produce failures in Strong Mode analysis. #213

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

Closed
nshahan opened this issue Jan 5, 2018 · 14 comments
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@nshahan
Copy link

nshahan commented Jan 5, 2018

Example:
https://pub.dartlang.org/packages/angular_components/versions/0.9.0-alpha%2B2#-analysis-tab-

The uri_has_not_been_generated: ignore option I have in the analysis_options.yaml file is not being used. https://github.com/dart-lang/angular_components/blob/master/analysis_options.yaml#L8

@kevmoo
Copy link
Member

kevmoo commented Jan 5, 2018

We use our own analysis_options.yaml file in pana – so folks can't just ignore all errors and skip our checks.

In-file ignores are your only option – now.

@isoos
Copy link
Collaborator

isoos commented Jan 8, 2018

I'd argue the case that similarly to generated files for json_serializable, .template.dart files could be included in the package sources.

@kevmoo
Copy link
Member

kevmoo commented Jan 8, 2018 via email

@nshahan
Copy link
Author

nshahan commented Jan 8, 2018

@kevmoo So users can still avoid pana's check in this instance by placing the ignores everywhere they need them.

I'd propose that since this practice can be common, and will be required in the updated angular boostrapping it might make sense to allow that particular analysis option from the package to override pana's setting.

@matanlurey
Copy link

I agree with this being ignored in the default pana settings.

It won't hurt other customers.

@isoos
Copy link
Collaborator

isoos commented Jan 8, 2018

This is very different than json_serializable

How so?

@kevmoo
Copy link
Member

kevmoo commented Jan 8, 2018

How so?

The generated templates are a product of the top-level package/app. They need to be synced w/ the version of angular, etc.

@kevmoo
Copy link
Member

kevmoo commented Jan 8, 2018

@matanlurey @nshahan – RE uri_has_not_been_generated – I think it's fine to whitelist some analysis options that can pass through. This is a good example.

@isoos – happy to chat/VC if you want more info

@kevmoo kevmoo added the P1 A high priority bug; for example, a single project is unusable or has many test failures label Jan 8, 2018
@isoos
Copy link
Collaborator

isoos commented Jan 9, 2018

Is there a build process that generates these files? Maybe we could run standardized builds before analysis (that cannot be used to mess up with the analyzer environment).

@nshahan
Copy link
Author

nshahan commented Jan 9, 2018

In this case the files are generated by angular when building the project.

@isoos
Copy link
Collaborator

isoos commented Jan 9, 2018

In this case the files are generated by angular when building the project.

pana could trigger that build before analysis.

@kevmoo
Copy link
Member

kevmoo commented Jan 9, 2018

pana could trigger that build before analysis.

@isoos – there is no "build" for components. The build is part of an app.

@nshahan
Copy link
Author

nshahan commented Feb 13, 2018

I am still seeing these errors when I publish new version of the package:
https://pub.dartlang.org/packages/angular_components/versions/0.9.0-alpha%2B5#-analysis-tab-

@isoos
Copy link
Collaborator

isoos commented Feb 14, 2018

@nshahan thanks for flagging it again! We've had an embarrassing bug in pana, will be fixed with #248 which will be part of the 0.10.2 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

4 participants