question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`@dynamic` is suppressing a metadata error

See original GitHub issue

I’m submitting a…


[] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

I am bundling a library and having set skipTemplateCodegen and strictMetadataEmit to true.

When passing a lambda funtion to a decorator an metadata error is emitted during compilation. Marking it with @dynamic has no effect, and in fact I get

Error encountered in metadata generated for exported symbol 'Foo': Metadata collected contains an error that will be reported at runtime: Lambda not supported.

When I switch skipTemplateCodegen and strictMetadataEmit to false I also have an error

TypeError: Cannot read property 'kind' of undefined

Expected behavior

Lambda calls can be used in decorators with the @dynamic. In all fairness I am still a bit confused for what to use the @dynamic, And my question would be is there a way to use lamba function inside decorators or this is by design that you cannot use it?

Minimal reproduction of the problem with instructions

https://github.com/alan-agius4/angular5-dynamic-supress-meta-error

What is the motivation / use case for changing the behavior?

In Angular 4 this used to work because the error was not emitted as I believe there was no validation happening, I checked the metadata and indeed there is an error in the meta data.

{
	"__symbolic": "method",
	"decorators": [
		{
			"__symbolic": "error",
			"message": "Function call not supported",
			"line": 7,
			"character": 6,
			"module": "./src/foo"
		}
	]
}

Environment


Angular version: 5.1.X


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: 8.9.0
- Platform:  Windows

Others: Looping in @chuckjaz as this is following #21111

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
chuckjazcommented, Dec 21, 2017

The comment should have worked.

Partial for documentation for this is coming in #21135.

0reactions
angular-automatic-lock-bot[bot]commented, Apr 17, 2020

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Can I suppress the Python tool metadata error?
Solved: Is there a way to suppress the "Run the workflow to generate valid metadata" error the Python tool is always showing before...
Read more >
You receive MetaData error messages for various objects ...
Fixes a problem in which you MetaData error messages for various objects when you use the RoleTailored client (RTC) of Microsoft Dynamics NAV....
Read more >
Metadata Validation Messages - Oracle Help Center
Currently the Metadata Validator will display an error for any Level 0 Dynamic Calc members of the Movement Dimension except for seeded members....
Read more >
Metadata file could not be found - Visual Studio Feedback
Severity Code Description Project File Line Suppression State Error CS0006 Metadata file 'C:\Users…\bin\Debug\net35\ReportView.dll' could not be found ...
Read more >
Query Error | Customer Engagement & Dynamics CRM Forum
"Am error occurred during local report processing. An error has occurred ... MetadataCacheDetails: ProviderType=Dynamic, StandardCache=True, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found