GithubHelp home page GithubHelp logo

atom-dartino's People

Contributors

devoncarew avatar mit-mit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

devoncarew jinhu

atom-dartino's Issues

"Run app on device" exception when active editor is settings page

If select "Run app on device" on settings page, this exception occurs

Uncaught NullError: method not found: 'invoke$1' on null

Atom Version: 1.5.3
System: Mac OS X 10.11.3
Thrown From: dartino package, v0.0.5

Stack Trace

Uncaught NullError: method not found: 'invoke$1' on null

At ~/.atom/packages/dartino/web/entry.dart.js:7666

TypeError: Cannot read property 'invoke$1' of null
    at ~/.atom/packages/dartino/web/entry.dart.js:10918:83
    ...

"TypeError: Cannot read property 'get$kind' of undefined" when debugging Dartino program

Everything works before turning on debugging.

In the Dartino plug-in I am pointing to a 0.5.0 SDK in /tmp/dartino-sdk. In the dartlang SDK I am pointing to the Dart SDK in /tmp/dartino-sdk/internal/dart-sdk.

  • Add debugging to the launch configuration
# Dartino launch configuration for main.dart.
type: dartino
path: main.dart

dartino:
  debug: true
  • Hit Run on the toolbar
  • Output in the console
Compile and deploy to connected device ...
$ /tmp/dartino-sdk/bin/dartino flash --debugging-mode /Users/sgjesse/dartino-projects/draw/main.dart
Using template settings file '/private/tmp/dartino-sdk/internal/.dartino-settings'
Done building image: /Users/sgjesse/dartino-projects/draw/main.bin
Flashing image: /Users/sgjesse/dartino-projects/draw/main.bin
Done flashing image: /Users/sgjesse/dartino-projects/draw/main.bin
Starting debug session...
$ /tmp/dartino-sdk/bin/dartino debug serve /Users/sgjesse/dartino-projects/draw/main.dart on tty /dev/tty.usbmodem1413
Using template settings file '/private/tmp/dartino-sdk/internal/.dartino-settings'
Attached to /dev/tty.usbmodem1413
localhost:53454
Connecting observatory to application on device...

Atom Version: 1.8.0
System: Mac OS X 10.11.5
Thrown From: dartlang package, v0.6.29

Stack Trace

Uncaught NullError: method not found: 'get$kind' on null

At /Users/sgjesse/.atom/packages/dartlang/web/entry.dart.js:27251

TypeError: Cannot read property 'get$kind' of undefined
    at [object Object].J.get$kind$x (/Users/sgjesse/.atom/packages/dartlang/web/entry.dart.js:78009:40)
    at ObservatoryConnection__registerNewIsolate_closure0.dart.ObservatoryConnection__registerNewIsolate_closure0.call$1 (/Users/sgjesse/.atom/packages/dartlang/web/entry.dart.js:39030:22)
    at _RootZone.dart._RootZone.runUnary$2 (/Users/sgjesse/.atom/packages/dartlang/web/entry.dart.js:49510:20)
    at _FutureListener.dart._FutureListener.handleValue$1 (/Users/sgjesse/.atom/packages/dartlang/web/entry.dart.js:47458:34)
    at _Future__propagateToListeners_handleValueCallback.dart._Future__propagateToListeners_handleValueCallback.call$0 (/Users/sgjesse/.atom/packages/dartlang/web/entry.dart.js:47919:60)
    at [object Object].dart._Future.static._Future__propagateToListeners (/Users/sgjesse/.atom/packages/dartlang/web/entry.dart.js:47778:104)
    at _Future.dart._Future._completeWithValue$1 (/Users/sgjesse/.atom/packages/dartlang/web/entry.dart.js:47639:11)
    at _Future__asyncComplete_closure0.dart._Future__asyncComplete_closure0.call$0 (/Users/sgjesse/.atom/packages/dartlang/web/entry.dart.js:47857:20)
    at [object Object].dart._microtaskLoop (/Users/sgjesse/.atom/packages/dartlang/web/entry.dart.js:46661:27)
    at [object Object].dart._startMicrotaskLoop (/Users/sgjesse/.atom/packages/dartlang/web/entry.dart.js:46667:11)
    at TimerImpl_internalCallback0.dart.TimerImpl_internalCallback0.call$0 (/Users/sgjesse/.atom/packages/dartlang/web/entry.dart.js:27629:23)
    at invokeClosure_closure.dart.invokeClosure_closure.call$0 (/Users/sgjesse/.atom/packages/dartlang/web/entry.dart.js:29508:29)
    at _IsolateContext.dart._IsolateContext.eval$1 (/Users/sgjesse/.atom/packages/dartlang/web/entry.dart.js:27242:25)
    at [object Object].dart._callInIsolate (/Users/sgjesse/.atom/packages/dartlang/web/entry.dart.js:26884:28)
    at dart.invokeClosure (/Users/sgjesse/.atom/packages/dartlang/web/entry.dart.js:28471:20)
    at /Users/sgjesse/.atom/packages/dartlang/web/entry.dart.js:28492:18

Commands

  9x -8:01.3.0 core:move-right (atom-text-editor.editor.is-focused)
     -8:00.1.0 core:move-left (atom-text-editor.editor.is-focused)
 42x -7:59.8.0 core:move-down (atom-text-editor.editor.is-focused)
undefined -7:57.2.0 core:move-up (atom-text-editor.editor.is-focused)
     -4:58.9.0 tree-view:reveal-active-file (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-atom-dark-syntax.theme-atom-dark-ui)
     -4:45.5.0 core:move-left (atom-text-editor.editor.is-focused.autocomplete-active)
     -4:44.9.0 core:move-down (atom-text-editor.editor.is-focused)
 11x -4:44.3.0 core:move-left (atom-text-editor.editor.is-focused)
     -4:40.6.0 core:save (atom-text-editor.editor.is-focused)
     -3:32.6.0 dartino:settings (a.stack-toggle)
     -3:32.5.0 tree-view:reveal-active-file (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-atom-dark-syntax.theme-atom-dark-ui)
     -3:19.8.0 dartlang:settings (atom-text-editor#dartino.devicePath.editor.mini.is-focused)
  2x -2:46.8.0 tree-view:reveal-active-file (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-atom-dark-syntax.theme-atom-dark-ui)
     -1:04.7.0 dartino:settings (a.stack-toggle)
     -1:04.7.0 tree-view:reveal-active-file (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-atom-dark-syntax.theme-atom-dark-ui)
     -0:51.5.0 dartlang:settings (div.package-detail.panels-item)

Config

{
  "core": {
    "followSymlinks": false,
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ]
  },
  "dartlang": {
    "sdkLocation": "/tmp/dartino-sdk/internal/dart-sdk"
  }
}

Installed Packages

# User
atom-toolbar, v0.1.6
dartino, v0.0.12
dartlang, v0.6.29
linter, v1.11.14
synced-sidebar, v0.4.3

# Dev
No dev packages

Multiple errors restarting lines.dart

Summary

After I tried to restart the Dartino example app, the reboot command was processed, but then I got two errors:

  1. failed to mount 'spifs' at path '/spifs' on 'qspi-flash'.
  2. TimeoutException after 0:00:03.000000: Future not completed

Also, a nit: not sure what LFUTF-8Dartmaster is supposed to mean at the end of the log.

Complete log

lines/lines.dart
checked mode • debug
Building /sod/sod/dart/examples/lines/lines.dart ...
$ cd /sod/sod
$ make /sod/sod/dart/examples/lines/lines.snap
ninja -C third_party/dartino/ && ninja -C third_party/dartino/out/ReleaseIA32/ toplevel_dartino
ninja: Entering directory `third_party/dartino/'
ninja: no work to do.
ninja: Entering directory `third_party/dartino/out/ReleaseIA32/'
ninja: no work to do.
third_party/dartino/out/ReleaseIA32/dartino quit
Background process exited
third_party/dartino/out/ReleaseIA32/dartino create session sodff with file dart/dartino-settings
third_party/dartino/out/ReleaseIA32/dartino export /sod/sod/dart/examples/lines/lines.dart to /sod/sod/dart/examples/lines/lines.snap in session sodff
Deploy and run on connected device ...
$ dart /sod/sod/dart/bin/sod.dart run /sod/sod/dart/examples/lines/lines.snap on /dev/ttyUSB1
Pinging 192.168.0.98 to see if it is connected
Connecting to /dev/ttyUSB1
Starting dartino VM
 dartino start
dartino-vm already running...
]
 reboot
REBOOT
welcome to lk

boot args 0x272dd8 0x0 0x20012b3c 0x20012b3c
initializing heap
calling constructors
initializing mp
initializing threads
initializing timers
initializing ports
creating bootstrap completion thread
top of bootstrap2()
INIT: cpu 0, calling hook 0x2044d1 (usb) at level 0x70000, flags 0x1
INIT: cpu 0, calling hook 0x22dd75 (pktbuf) at level 0x70000, flags 0x1
pktbuf: creating 16 pktbuf entries of size 1536 (total 24576)
CONTROL 0x0
FPSCR 0x0
FPCCR 0xc0000000
initializing platform
clocks:
    sysclk 216000000
    hclk 216000000
    pclk1 54000000
    pclk2 108000000
unique id: 0x003800203234510e37343138
initializing target
failed to mount 'spifs' at path '/spifs' on 'qspi-flash'. Make sure that device is formatted
appending interfaces
calling apps_init()
starting app shell
entering main console loop
]
 dartino start
Starting dartino-vm...
]
Requesting device receive binary
Sending binary to device using tftp 192.168.0.98
Opening datagram socket to 192.168.0.98
Sending from 0.0.0.0:54443

Unhandled exception:
TimeoutException after 0:00:03.000000: Future not completed
#0      _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:883)
#1      _microtaskLoop (dart:async/schedule_microtask.dart:41)
#2      _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#3      _Timer._runTimers (dart:isolate-patch/timer_impl.dart:394)
#4      _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:414)
#5      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

Process terminated with exitCode: 255
exited with code 255
5 items1 processlines/lines.dart35:23
LFUTF-8Dartmaster

Restart needed after upgrading to 0.1.0

I upgraded to the Dartino plug-in 0.1.0. However I had to restart Atom before the plug-in worked. E.g. selecting "Open samples..." had no effect. After restart it worked.

This happened on both Linux and Mac.

I am pointing to a Dartino SDK version 0.5.0-dev.1.5 in /Users/sgjesse/dartino-sdk, and the dartlang plug-in is pointing to the Dart SDK inside the Dartino SDK in /Users/sgjesse/dartino-sdk/internal/dart-sdk.

Run-app command should save the current editor before building

The run-app-in-device command compiles the file in the current editor tab into a flashable image. If the user forgets to save first, it will compile whatever file is on disk. To be consistent with IDE expectations, we should auto-save the current editor before we compile, i.e., run something like these commands:

  editor = atom.workspace.getActiveTextEditor()
  editor.save()

restart dartino CLI if different SDK

When running an app, the current SDK can be different than the running CLI.
Detect this situation prior to launch and call dartino quit first.

Command failed because the running compiler and the Dartino Command Line Interface (CLI) have different versions.
Compiler version: '0.3.0-edge.dbc5e53e76b200818af4d370a797ffdc3919fca0'
CLI version: '0.3.0-dev.2.0'.
This can happen if you have recently updated you Dartino SDK. Try running 'dartino quit' and retry the command.
Compiling snapshot of /usr/local/google/home/danrubel/work/git/dartino/dartino-sdk/samples/lights_out/lights_out.dart

Feature request: Toolbar for Dartino apps

To give Atom more of a traditional IDE feel, would be great to add a Toolbar at the top with common actions. We can use the tool-bar package for this:
https://atom.io/packages/tool-bar

To "prototype" this, I configured a tool-bar using the flex-tool-bar:
https://atom.io/packages/flex-tool-bar

and this toolbar.cson file:
https://gist.github.com/mit-mit/320e21be84be7537e45a

It would be great to integrate this into the dartino atom package (i.e., we should use tool-bar but not the flex-tool-bar).

warn user if missing dartino.yaml file

If a Dartino project is opened in Atom, but it is missing a dartino.yaml file, then

  • suggest that the user open the parent directory if it contains a dartino.yaml file,
  • or just warn the user that the dartino.yaml file is missing

consolidate and auto-close build/deploy/launch dialog(s)

When you launch a Dartino or SoD app, you see several dialogs and they "build up" over time as you repeatedly write code - launch - repeat. Dialogs from prior launches should auto-close during a new launch and the separate build, deploy, and launch dialogs should be consolidated.

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.