Comments (6)
This is a bug in the reflectable transformer, it should of course never make an attempt to call parent
on null
. There is just one place where it calls parent
, and it hasn't been changed since version 0.1.1. It would be very helpful if you could provide source code that causes this failure to occur!
The other topic is whether the transformer should continue to transform other entry points when the transformation of any given entry point fails with an transformer detected error in the program under transformation. I separated that out as a new issue #39.
from reflectable.dart.
Adjusted the title, now that this issue is only about the null.parent
bug.
from reflectable.dart.
Sorry, I guess I won't be able to reproduce.
I'm working on porting PolymerElements from Polymer.js to Poylmer.dart
There are quite a few entry points where the boilerplate is generated from a script which crawles GitHub organizations for repositories generates an entry page for each repository and copies some HTML and JS from GitHub into the generated Dart files.
See https://github.com/bwu-dart-contributing/polymer_elements/tree/demo2/demo/web
I also generated an entry_point
line for each web_components
and reflectable
transformer and copied these into the pubspec.yaml
file, which led to halfway valid generated code for a lot of entry-points.
I then fixed one of the entry-points and tried to load it in Dartium which led to "unrelated" errors because the were from entry-points I didn't care about yet. I didn't expect this specific error to be of interest to you.
The generating script changed a lot since then an produces much better code now by default. I didn't check in all the changes in between.
from reflectable.dart.
OK, thanks for the quick reaction!
from reflectable.dart.
Seems not to difficult to reproduce after all. I just encountered it again.
This is the source https://github.com/bwu-dart-playground/polymer_elements_parent
- clone the repo
- change to the
demo
subdirectory - run
pub get
- launch
demo/web/iron_validatable_behavior/index.html
from WebStorm- or load http://localhost:8080/iron_validatable_behavior/index.html (I guess this would be the URL if you want to load it without WebStorm)
from reflectable.dart.
OK, thanks!
Apparently, it is possible for an analyzer FieldElement
about a field on an instance of a subclass of Element
from 'dart:html' to have null
as its syntax (node
). I've landed a commit (5725ef1) that protects against crashing in such a situation.
from reflectable.dart.
Related Issues (20)
- 【macos】Attempt to `invoke` without class mirrors. HOT 1
- [Question] is it possible build an "Angular Style DI" library using Reflectable? HOT 1
- [question] - Is it possible to have Annotations with Parameters? HOT 2
- [Question] - how to get Constructor arguments? HOT 2
- [Bug?] ERROR: This requires the 'constructor-tearoffs' language feature to be enabled. HOT 12
- [Question] - Listening to Method invocation HOT 6
- [Question] - Stats on Bundle Sizes and Performance Implications/metrics of using Reflectable ? HOT 1
- Cannot reflect ```flutter/material.dart``` URIs for ```Container``` type HOT 12
- This reflector does not match anything HOT 11
- Reflectable is not a know builder HOT 1
- Unsupported operation: location HOT 4
- Reflectable don't find "main" but im using in my library not an application HOT 5
- How to generate code according to filter rules HOT 2
- The build_runner those not generate anything HOT 1
- Annotated parameter and Functions
- Include annotated types that are not imported to `main.dart` HOT 2
- Severe error during build with @reflector and @JsonKey on the same class. HOT 1
- isSubtype exception for classes without parents HOT 2
- Where is initializeReflectable method? HOT 3
- Error: Reflecting on un-marked type "Type" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reflectable.dart.