Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when attempting to run example run.sh or x.sh #1

Closed
timmaffett opened this issue May 3, 2023 · 5 comments
Closed

Errors when attempting to run example run.sh or x.sh #1

timmaffett opened this issue May 3, 2023 · 5 comments

Comments

@timmaffett
Copy link

timmaffett commented May 3, 2023

I am attempting learn how to use you package. I am excited at the prospect of a long overdue replacement for https://github.com/dart-archive/js_facade_gen
Any help you could provide would be greatly appreciated! 🙏

I am sure I am missing something - I included a flutter doctor at the end - I am up to date on master channel as of today.

My fork of the repo is https://github.com/timmaffett/typings - you can see how I tried to follow the directions to add monaco-editor.

(I am evaluating monaco as a replacement for the codemirror editor within future dartpad versions and was hoping to use your package to make the bindings.)

my /src/typings/typings/lib/d/monaco_editor.dart file:

library typings.monacoeditor;

import 'package:typings/annotations.dart';

@Typings.npm(
    package: 'monaco-editor',
    version: '0.38.0',
    dirName: 'monaco_editor',
    contextCheck: 'monaco',
    uses: ['core'])
export 'monaco_editor/monaco_editor.dart';
dart run --enable-asserts --enable-experiment="inline-class" build_runner build --enable-experiment="inline-class"

[INFO] Generating build script completed, took 519ms
[WARNING] ../ts2dart/lib/src/project.dart:61:1: Error: The 'inline-class' language feature is disabled for this library.
Try removing the package language version or setting the language version to 3.1 or higher.
inline class ExternalInteropModule {
^^^^^^
../ts2dart/lib/src/project.dart:77:1: Error: The 'inline-class' language feature is disabled for this library.
Try removing the package language version or setting the language version to 3.1 or higher.
inline class ExternalInteropProject {
^^^^^^
../ts2dart/lib/src/metadata/struct.dart:4:1: Error: The 'inline-class' language feature is disabled for this library.
Try removing the package language version or setting the language version to 3.1 or higher.
inline class MetadataCtor {
^^^^^^
../ts2dart/lib/src/metadata/struct.dart:10:1: Error: The 'inline-class' language feature is disabled for this library.
Try removing the package language version or setting the language version to 3.1 or higher.
inline class MetadataIndex {
^^^^^^
../ts2dart/lib/src/metadata/struct.dart:22:1: Error: The 'inline-class' language feature is disabled for this library.
Try removing the package language version or setting the language version to 3.1 or higher.
inline class MetadataCall {
^^^^^^
../ts2dart/lib/src/metadata/struct.dart:28:1: Error: The 'inline-class' language feature is disabled for this library.
Try removing the package language version or setting the language version to 3.1 or higher.
inline class MetadataStruct {
^^^^^^
../ts2dart/lib/src/metadata/struct.dart:80:1: Error: The 'inline-class' language feature is disabled for this library.
Try removing the package language version or setting the language version to 3.1 or higher.
inline class MetadataTypeRef {
^^^^^^
../ts2dart/lib/src/metadata/struct.dart:88:1: Error: The 'inline-class' language feature is disabled for this library.
Try removing the package language version or setting the language version to 3.1 or higher.
inline class MetadataStructMember {
^^^^^^
[INFO] Precompiling build script... completed, took 1.4s
[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.

When trying to run x.sh I get the following error

webdev serve example --enable-experiment=inline-class

[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
[SEVERE] This is likely caused by a misconfigured builder definition.
[SEVERE]
Unhandled exception:
Bad state: Unable to start build daemon.
#0      _handleDaemonStartup.<anonymous closure> (package:build_daemon/client.dart:79:21)
#1      _runUserCode (dart:async/stream_pipe.dart:11:23)
#2      Stream.firstWhere.<anonymous closure> (dart:async/stream.dart:1698:9)
#3      _RootZone.runGuarded (dart:async/zone.dart:1582:10)
#4      _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#5      _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:7)
#6      _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#7      _SyncBroadcastStreamController._sendDone.<anonymous closure> (dart:async/broadcast_stream_controller.dart:399:22)
#8      _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:322:15)
#9      _SyncBroadcastStreamController._sendDone (dart:async/broadcast_stream_controller.dart:398:7)
#10     _BroadcastStreamController.close (dart:async/broadcast_stream_controller.dart:268:5)
#11     _AsBroadcastStreamController.close (dart:async/broadcast_stream_controller.dart:505:27)
#12     _RootZone.runGuarded (dart:async/zone.dart:1582:10)
#13     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#14     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:7)
#15     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#16     _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:87:11)
#17     _EventSinkWrapper.close (dart:async/stream_transformers.dart:21:11)
#18     _StringAdapterSink.close (dart:convert/string_conversion.dart:241:11)
#19     _LineSplitterSink.close (dart:convert/line_splitter.dart:141:11)
#20     _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:132:24)
#21     _RootZone.runGuarded (dart:async/zone.dart:1582:10)
#22     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#23     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:7)
#24     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#25     _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:87:11)
#26     _EventSinkWrapper.close (dart:async/stream_transformers.dart:21:11)
#27     _StringAdapterSink.close (dart:convert/string_conversion.dart:241:11)
#28     _Utf8ConversionSink.close (dart:convert/string_conversion.dart:295:20)
#29     _ConverterStreamEventSink.close (dart:convert/chunked_conversion.dart:78:18)
#30     _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:132:24)
#31     _RootZone.runGuarded (dart:async/zone.dart:1582:10)
#32     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#33     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:7)
#34     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#35     _SyncStreamControllerDispatch._sendDone (dart:async/stream_controller.dart:784:19)
#36     _StreamController._closeUnchecked (dart:async/stream_controller.dart:639:7)
#37     _StreamController.close (dart:async/stream_controller.dart:632:5)
#38     _Socket._onData (dart:io-patch/socket_patch.dart:2375:21)
#39     _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
#40     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#41     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#42     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:776:19)
#43     _StreamController._add (dart:async/stream_controller.dart:650:7)
#44     _StreamController.add (dart:async/stream_controller.dart:598:5)
#45     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1893:35)
#46     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1336:18)
#47     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#48     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#49     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:123:13)
#50     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:190:5)
[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
[SEVERE] This is likely caused by a misconfigured builder definition.
[SEVERE]
Unhandled exception:
Bad state: Unable to start build daemon.
#0      _handleDaemonStartup.<anonymous closure> (package:build_daemon/client.dart:79:21)
#1      _runUserCode (dart:async/stream_pipe.dart:11:23)
#2      Stream.firstWhere.<anonymous closure> (dart:async/stream.dart:1698:9)
#3      _RootZone.runGuarded (dart:async/zone.dart:1582:10)
#4      _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#5      _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:7)
#6      _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#7      _SyncBroadcastStreamController._sendDone.<anonymous closure> (dart:async/broadcast_stream_controller.dart:399:22)
#8      _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:322:15)
#9      _SyncBroadcastStreamController._sendDone (dart:async/broadcast_stream_controller.dart:398:7)
#10     _BroadcastStreamController.close (dart:async/broadcast_stream_controller.dart:268:5)
#11     _AsBroadcastStreamController.close (dart:async/broadcast_stream_controller.dart:505:27)
#12     _RootZone.runGuarded (dart:async/zone.dart:1582:10)
#13     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#14     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:7)
#15     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#16     _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:87:11)
#17     _EventSinkWrapper.close (dart:async/stream_transformers.dart:21:11)
#18     _StringAdapterSink.close (dart:convert/string_conversion.dart:241:11)
#19     _LineSplitterSink.close (dart:convert/line_splitter.dart:141:11)
#20     _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:132:24)
#21     _RootZone.runGuarded (dart:async/zone.dart:1582:10)
#22     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#23     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:7)
#24     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#25     _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:87:11)
#26     _EventSinkWrapper.close (dart:async/stream_transformers.dart:21:11)
#27     _StringAdapterSink.close (dart:convert/string_conversion.dart:241:11)
#28     _Utf8ConversionSink.close (dart:convert/string_conversion.dart:295:20)
#29     _ConverterStreamEventSink.close (dart:convert/chunked_conversion.dart:78:18)
#30     _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:132:24)
#31     _RootZone.runGuarded (dart:async/zone.dart:1582:10)
#32     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#33     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:7)
#34     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#35     _SyncStreamControllerDispatch._sendDone (dart:async/stream_controller.dart:784:19)
#36     _StreamController._closeUnchecked (dart:async/stream_controller.dart:639:7)
#37     _StreamController.close (dart:async/stream_controller.dart:632:5)
#38     _Socket._onData (dart:io-patch/socket_patch.dart:2375:21)
#39     _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
#40     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#41     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#42     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:776:19)
#43     _StreamController._add (dart:async/stream_controller.dart:650:7)
#44     _StreamController.add (dart:async/stream_controller.dart:598:5)
#45     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1893:35)
#46     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1336:18)
#47     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#48     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#49     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:123:13)
#50     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:190:5)

flutter doctor output:

flutter doctor -v
[✓] Flutter (Channel master, 3.10.0-19.0.pre.19, on Microsoft Windows [Version 10.0.25352.1], locale en-US)
    • Flutter version 3.10.0-19.0.pre.19 on channel master at C:\src\flutter
    • Upstream repository git@github.com:flutter/flutter.git
    • Framework revision 00cd3edae3 (10 hours ago), 2023-05-03 01:02:55 +0800
    • Engine revision 6fe3f50797
    • Dart version 3.1.0 (build 3.1.0-64.0.dev)
    • DevTools version 2.23.1

[✓] Windows Version (Installed version of Windows is version 10 or higher)

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Users\Tim\AppData\Local\Android\sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2022 17.5.4)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.5.33530.505
    • Windows 10 SDK version 10.0.22621.0

[✓] Android Studio (version 2022.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)

[✓] Android Studio (version 4.2)
    • Android Studio at C:\src\OLD_android_studios\android-studio-ide-202.7094744
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)

[✓] IntelliJ IDEA Community Edition (version 2020.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1.1
    • Flutter plugin version 51.0.2
    • Dart plugin version 201.7223.99

[✓] VS Code (version 1.77.3)
    • VS Code at C:\Users\Tim\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.62.0
@jodinathan
Copy link
Owner

Hi, sorry but I am on vacation and will only be able to check this issue on next Thursday

@timmaffett
Copy link
Author

No problem. Enjoy your vacation!

@jodinathan
Copy link
Owner

It seems to be some change in the SDK 3.1.0 regarding the inline classes.
Can you try to bump up the dependency version in your pubspec.yaml?

environment:
  sdk: '>=3.0.0-277.0.dev <4.0.0'

to something like

environment:
  sdk: '>=3.1.0-64.0.dev <4.0.0'

@mrgnhnt96
Copy link

Bumping it to 3.1.0-63.1.beta worked for me

@jodinathan
Copy link
Owner

I will close this issue. Feel free to open another one if you hit anything, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants