Coder Social home page Coder Social logo

Comments (14)

eernstg avatar eernstg commented on June 19, 2024

I'm waiting for analyzer 0.27.1-or-so which will resolve the "libraries whose constants are null" issue. Brian just got my response on this, I think he will have an update ready soon.

from reflectable.dart.

jakemac53 avatar jakemac53 commented on June 19, 2024

ok great, if you wouldn't mind leaving this open just so I can track the progress that would be awesome

from reflectable.dart.

eernstg avatar eernstg commented on June 19, 2024

Sure!

from reflectable.dart.

eernstg avatar eernstg commented on June 19, 2024

Trying out the version of analyzer that Brian mentioned (1f3dabd9c7ef391c468d2697294695194a67c569): That does not fix the problem, we still get null from evaluation of constants, where we get non-null with 0.26.1+14.

from reflectable.dart.

eernstg avatar eernstg commented on June 19, 2024

Cf. https://codereview.chromium.org/1486663003/

from reflectable.dart.

eernstg avatar eernstg commented on June 19, 2024

Commit 406b87e has been published as version 0.5.0, which uses analyzer ^0.27.0 and code_transformers ^0.3.0. Note that this version contains several breaking changes. In particular, several methods including instanceMembers will now require declarationsCapability, as specified in the design document, but previously not enforced; no-such-method situations will throw a ReflectableNoSuchMethodError; the methods bestEffort.. have been deprecated (they are conceptually ill-defined; please replace call-sites for them by their method bodies, which are trivial); finally, please check CHANGELOG.md for more details.

from reflectable.dart.

eernstg avatar eernstg commented on June 19, 2024

One step backwards: Package-bots are now failing for reflectable, and a local test shows that it fails with the most recent analyzer (0.27.1+1) and works with an added constraint to stay with 0.27.1. Will land a commit that includes this constraint. We may have to publish it, too.

from reflectable.dart.

eernstg avatar eernstg commented on June 19, 2024

We just landed commit efbfd3b and published it as version 0.5.1, which depends on analyzer 0.27.1 (just that single version). This is a temporary measure, because it is very inconvenient for the larger context to have narrow constraints like that, but analyzer 0.27.1 is currently the only version in ^0.27.0 that will work.

from reflectable.dart.

eernstg avatar eernstg commented on June 19, 2024

Re-opening this issue until the evaluationResult == null issue in the analyzer has been resolved.

from reflectable.dart.

eernstg avatar eernstg commented on June 19, 2024

Awaiting an analyzer that fully resolves constants, or one that allows us to request resolution when we encounter an unresolved constant.

from reflectable.dart.

eernstg avatar eernstg commented on June 19, 2024

Turns out that there is a need to adjust code_transformers and/or the analyzer: The features needed in order to request resolution are available in the analyzer, but reflectable does not have access to make those calls. More details in dart-lang/sdk#24890.

from reflectable.dart.

eernstg avatar eernstg commented on June 19, 2024

Wow, I've got something that works now! \o//
Testing, double-checking, etc.

from reflectable.dart.

eernstg avatar eernstg commented on June 19, 2024

https://codereview.chromium.org/1761423002/ uses the lazy and fine-grained constant resolution based on Resolver.computeLibraryElement that we discovered recently. That should resolve this issue.

from reflectable.dart.

eernstg avatar eernstg commented on June 19, 2024

Addressed by 543ad76. Note that this commit actually uses ^0.27.2 rather than ^0.27.0.

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.