Comments (14)
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.
ok great, if you wouldn't mind leaving this open just so I can track the progress that would be awesome
from reflectable.dart.
Sure!
from reflectable.dart.
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.
Cf. https://codereview.chromium.org/1486663003/
from reflectable.dart.
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.
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.
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.
Re-opening this issue until the evaluationResult == null
issue in the analyzer has been resolved.
from reflectable.dart.
Awaiting an analyzer that fully resolves constants, or one that allows us to request resolution when we encounter an unresolved constant.
from reflectable.dart.
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.
Wow, I've got something that works now! \o//
Testing, double-checking, etc.
from reflectable.dart.
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.
Addressed by 543ad76. Note that this commit actually uses ^0.27.2 rather than ^0.27.0.
from reflectable.dart.
Related Issues (20)
- [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
- bug: issue with using mixins HOT 5
- importing private libaries during build_runner build HOT 4
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.