Dart pub SERVICE输出错误,即“它”;无法处理私有标识符";
我有以下文件race.dart 飞镖赛跑 //版权所有(c)2015 公开发行 我看到我正在使用的reflectable 0.3.3在 任何帮助都将不胜感激 谢谢 编辑1 我按照你的建议做了,冈特。现在我看到了DartAnalysis或任何地方的错误提示。但是应用程序现在运行,显示一个空白页,并且没有显示输出错误 我的标枪是Dart pub SERVICE输出错误,即“它”;无法处理私有标识符";,dart,dart-polymer,Dart,Dart Polymer,我有以下文件race.dart 飞镖赛跑 //版权所有(c)2015 公开发行 我看到我正在使用的reflectable 0.3.3在 任何帮助都将不胜感激 谢谢 编辑1 我按照你的建议做了,冈特。现在我看到了DartAnalysis或任何地方的错误提示。但是应用程序现在运行,显示一个空白页,并且没有显示输出错误 我的标枪是 import 'package:bwu_fontawesome_iconset_svg/bwu_fontawesome_iconset_svg.dart'; import
import 'package:bwu_fontawesome_iconset_svg/bwu_fontawesome_iconset_svg.dart';
import 'package:epimss_polymer_app/main_app.dart';
import 'package:polymer/polymer.dart';
/// [MainApp] used!
main() async {
await initPolymer();
}
当我使用debug运行应用程序时,会得到以下结果:
天文台收听
内部错误:“”:错误:第40行pos 2016:表达式不是有效的编译时常量
最终数据={const prefix0.JsProxyReflectable():新的r.reflector数据([new r.ClassMirrorImpl(r“PolymerMixin”,r“polymer.src.common.polymer_js_proxy.PolymerMixin)”,519,0,const prefix0.JsProxyReflectable(),const[],const[],const[],const[],const[],const[],const[],-1,{},{},const},const{},const},-1,0,const[],const[prefix0.JsProxyReflectable]),新的r“polymer.lib.src.common.js_proxy.JsProxy”,519,1,const prefix0.JsProxyReflectable(),const[],const[],const[],const[],const[],const[],const{},const{},-1,1,const[],const[prefix0.JsProxyReflectable]),新r.ClassMirrorImpl(r“dart.dom.html.HtmlElement with polymer.src.common.polymer_-js proxy.polymer”,r”polymer.lib.polymer_micro.dart.dom.html.HtmlElement with polymer.src.common.polymer_js_proxy.PolymerMixin“,583,2,const prefix0.JsProxyReflectable(),const[],const[173174175],const[],const[],-1,const{},const{},const},-1,0,const[],const[],const[],新r.ClassMirroImplpolymer.src.common.polymer_serialize.PolymerSerialize”,519,3,const prefix0.JsProxyReflectable(),const[176177],const[176177],const[],const[],const.-1,{},{},{},const{},-1,3,const[0],const[],新的r.ClassMirrorImpl(r“带polymer.lib.src.common.js proxy.js proxy的dart.core.Object”,r“epimss_polymer_shared.data.dart.core.Object with polymer.lib.src.common.js_proxy.JsProxy(),583,4,const prefix0.JsProxyReflectable(),const[],const[],const[],const[],const[],const-1,const{},const},const{},-1,1,const[],const[],新r.ClassMirrorImpact(r“临床特征”,r“epimss_polymer_shared.data.临床特征“,7,5,const prefix0.JsProxyReflectable(),const[0,1,2,3,4,5,6],const[178,179,180,181,182,183,184,185,186,187,188,189,190,191],const[],1,{},{},{},-1,5,const[],const[prefix12.jsonObject,const prefix13.ValidIf(prefix4.isClinicalFeatureValid,customDescription:'ClinicalFeature$invalidtr')),新的r.ClassMirrorImpl(r“WebOptions”
…更多类似的输出(超过140000个)字符
这一切意味着什么
编辑2-pubspec.yaml
name:epimss\u polymer\u应用程序
版本:0.0.1
描述:使用polymer.dart构建的web应用程序。
作者:
#主页:https://www.example.com
环境:
sdk:'>=1.9.0dart:mirrors
和reflectable无法访问私有成员。
要修复此问题,您需要将\u isRaceValid
公开。乍一看,您的pubspec.yaml
缺少转换器配置。请参阅示例。使用web\u组件
和Dart入口点文件(index.Dart
)注册html入口点文件(index.html
)使用可反射的
转换器。如果这不是问题所在,请向GitHub发布一个允许重现问题的最小示例项目。转换器已正确注册。在我尝试添加模型之前,应用程序已运行。我将删除模型上的一些注释,以查看这些注释是否为p首先是问题。以下是相同的| Race extends Object with JsProxy,Exportable |和| Race extends JsProxy with Exportable |吗?如果模型使用变压器,您可能需要更改pubspec.yaml
中变压器的顺序(虽然不知道是第一个还是最后一个,但顺序很重要)模型未使用变压器,请参见上面的my pubspec.yaml。上述错误的原因是由于语句|@ValidIf(_isRaceValid,customDescription:“$invalidStr Race”中的$invalidStr变量引起的|.$invalidStr实际上是从另一个项目导入的。这在1.0.0rc-1之前的聚合物中运行良好。这个问题也是由@reflectable?删除它导致错误完全消失造成的。我想知道有什么可能性。
name: epimss_polymer_reg
description: A starting point for Dart libraries or applications.
version: 0.0.1
author: zoong <zonga@gmail.com>
#homepage: https://www.example.com
environment:
sdk: '>=1.8.3 <2.0.0'
dependencies:
#async_commands: ^0.2.5
bwu_fontawesome_iconset_svg: ^0.3.0-1
drails_validator: ^0.0.1
exportable: ^0.1.0
jsonx: ^2.0.1
polymer_elements: ^1.0.0-rc.1
polymer: ^1.0.0-rc.2
reflectable: ^0.3.1
validator: ^0.0.4
web_components: ^0.12.0
dependency_overrides:
drails_commons: '0.0.6'
logging: '0.11.2'
dev_dependencies:
test: ^0.12.0
Cannot handle private identifier _isRaceValid
[Error from Reflectable on epimss_polymer_app|ReflectableTransformed]:
import 'package:bwu_fontawesome_iconset_svg/bwu_fontawesome_iconset_svg.dart';
import 'package:epimss_polymer_app/main_app.dart';
import 'package:polymer/polymer.dart';
/// [MainApp] used!
main() async {
await initPolymer();
}
name: epimss_polymer_app
version: 0.0.1
description: A web app built using polymer.dart.
author:
#homepage: https://www.example.com
environment:
sdk: '>=1.9.0 <2.0.0'
dependencies:
browser: ^0.10.0
bwu_fontawesome_iconset_svg: ^0.3.0-1
epimss_polymer_reg:
path: J:/workspace/epimss/dart/epimss_polymer_reg
epimss_polymer_shared:
path: J:/workspace/epimss/dart/epimss_polymer_shared
epimss_shared_core:
path: J:/workspace/epimss/dart/epimss_shared_core
polymer_elements: ^1.0.0-rc.1
polymer: ^1.0.0-rc.2
reflectable: ^0.3.1
web_components: ^0.12.0
dependency_overrides:
drails_commons: '0.0.6'
logging: '0.11.2'
dev_dependencies:
test: ^0.12.5
transformers:
- web_components:
entry_points: web/index.html
- reflectable:
entry_points: web/index.dart
- $dart2js:
$include: '**/*.bootstrap.initialize.dart'
minify: true
commandLineOptions:
- --trust-type-annotations
- --trust-primitives
- test/pub_serve:
$include: test/**_test{.*,}.dart