Coder Social home page Coder Social logo

Comments (6)

eernstg avatar eernstg commented on August 19, 2024

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.

eernstg avatar eernstg commented on August 19, 2024

Adjusted the title, now that this issue is only about the null.parent bug.

from reflectable.dart.

zoechi avatar zoechi commented on August 19, 2024

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.

eernstg avatar eernstg commented on August 19, 2024

OK, thanks for the quick reaction!

from reflectable.dart.

zoechi avatar zoechi commented on August 19, 2024

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

from reflectable.dart.

eernstg avatar eernstg commented on August 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.