Comments (5)
It looks like analyzer 0.4.0 breaks things, but it isn't compatible with the test
package so I don't think I can update at this time. However, I'm going to do a dependency override and try to fix the issues I'm seeing so I can push out a fix once the test
package is updated.
from dcdg.dart.
I've got the exceptions resolved, but the output has changed a bit because of differences in the newer analyzer API so I'm going to fiddle with it to make sure we don't lose any information.
from dcdg.dart.
It's maintained, but only very lightly, as I have time. I'll take a look. The analyzer API probably changed, that's usually what breaks things.
from dcdg.dart.
For reference, here's the stack trace I get when I run DCDG with an override to analyzer
0.4.0...
Unable to spawn isolate: lib/src/diagram_visitor.dart:112:37: Error: The getter 'type' isn't defined for the class 'ClassElement'.
- 'ClassElement' is from 'package:analyzer/dart/element/element.dart' ('../../../.pub-cache/hosted/pub.dartlang.org/analyzer-0.40.0/lib/dart/element/element.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'type'.
InterfaceType current = element.type;
^^^^
lib/src/diagram_visitor.dart:216:40: Error: The getter 'isObject' isn't defined for the class 'InterfaceType'.
- 'InterfaceType' is from 'package:analyzer/dart/element/type.dart' ('../../../.pub-cache/hosted/pub.dartlang.org/analyzer-0.40.0/lib/dart/element/type.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'isObject'.
final superIsObject = superType?.isObject == true;
^^^^^^^^
lib/src/diagram_visitor.dart:225:23: Error: The getter 'isObject' isn't defined for the class 'InterfaceType'.
- 'InterfaceType' is from 'package:analyzer/dart/element/type.dart' ('../../../.pub-cache/hosted/pub.dartlang.org/analyzer-0.40.0/lib/dart/element/type.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'isObject'.
if (mixinType.isObject) {
^^^^^^^^
lib/src/diagram_visitor.dart:237:27: Error: The getter 'isObject' isn't defined for the class 'InterfaceType'.
- 'InterfaceType' is from 'package:analyzer/dart/element/type.dart' ('../../../.pub-cache/hosted/pub.dartlang.org/analyzer-0.40.0/lib/dart/element/type.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'isObject'.
if (interfaceType.isObject) {
^^^^^^^^
lib/src/diagram_visitor.dart:274:16: Error: The getter 'isObject' isn't defined for the class 'DartType'.
- 'DartType' is from 'package:analyzer/dart/element/type.dart' ('../../../.pub-cache/hosted/pub.dartlang.org/analyzer-0.40.0/lib/dart/element/type.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'isObject'.
type.isObject ||
^^^^^^^^
lib/src/diagram_visitor.dart:275:16: Error: The getter 'isUndefined' isn't defined for the class 'DartType'.
- 'DartType' is from 'package:analyzer/dart/element/type.dart' ('../../../.pub-cache/hosted/pub.dartlang.org/analyzer-0.40.0/lib/dart/element/type.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'isUndefined'.
type.isUndefined ||
^^^^^^^^^^^
lib/src/builders/type_name.dart:15:20: Error: The getter 'type' isn't defined for the class 'TypeDefiningElement'.
- 'TypeDefiningElement' is from 'package:analyzer/dart/element/element.dart' ('../../../.pub-cache/hosted/pub.dartlang.org/analyzer-0.40.0/lib/dart/element/element.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'type'.
return element.type.displayName;
from dcdg.dart.
I've updated to the latest analyzer, so the bug described above should no longer exist.
from dcdg.dart.
Related Issues (20)
- exclude samples HOT 2
- plantuml.com gives "Forbidden" error on dcdg output HOT 2
- package choosing HOT 1
- unhandled exception HOT 1
- its hanging on intl HOT 9
- update dependencies in pubspec to latest versions HOT 3
- How to get UML diagram for only the lib folder HOT 12
- Bug: Duplicated fields when using 'part' keyword in dart HOT 2
- Problem with large package and limiting scope HOT 4
- Extensions? HOT 1
- Add support for Mermaid HOT 5
- dcdg does not work with the new analyzer >=3.0.0 - but it is required for freezed to work. HOT 3
- Dot output contains the full path HOT 3
- Enhancement: Include and exclude multiple paths HOT 1
- Add separator between file and class in DOT output
- UML dependency relationship
- Mermaid - Class associations of objects with generics
- Methods not generated properly HOT 1
- New DCDG update.
- Feature request: Support D2 diagram language
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 dcdg.dart.