dart-tools icon indicating copy to clipboard operation
dart-tools copied to clipboard

What would it take to write this plugin in Dart?

Open sethladd opened this issue 10 years ago • 9 comments

Just curious what we'd have to do, if we wanted to.

(not being dogmatic... a working plugin is more important than writing everything in Dart. But, if it's not a lot of work, would be cool!)

sethladd avatar May 23 '15 03:05 sethladd

@kaendfinger started a Dart package (https://github.com/DirectMyFile/atom.dart) for building Atom plugins.

tosh avatar May 23 '15 04:05 tosh

@sethladd

A more fluent dart:js package or someone else doing all the heavy lifting of wrapping all of Atom's APIs in Dart + all of the relevant Node APIs for file access like process, spawn, etc.

When I started like a year ago I considered using Dart for developing this package and decided that it just wasn't happening: interoping Atom/Node and Dart seems like an involved project all by itself, and I wasn't interested in doing both at the same time.

Atom's API was in heavy flux at that moment, too. It's settled down now, but someone would still have to wrap the entire thing.

radicaled avatar May 23 '15 04:05 radicaled

@radicaled I've done the work, it's pretty much 100% usable for this project... There is nothing stopping you from porting it at this point.

azenla avatar May 23 '15 04:05 azenla

See https://github.com/DirectMyFile/atom.dart

azenla avatar May 23 '15 04:05 azenla

I've even done the full analysis server API for you....https://github.com/DirectMyFile/scraps/blob/master/io/analysis.dart

azenla avatar May 23 '15 04:05 azenla

@kaendfinger

I've had a cursory look over atom.dart. It looks like it's missing some classes (Marker, Range), some functions (markBufferRange, decorateMarker), and I'm not sure how I'd be able to run Atom tests with it (see #46 for example).

How does it integrate with apm publish and apm install? How does passing HTMLElement-derived classes to Atom work for custom views like the ugly but working "Problem View", or the toolbar, etc?

radicaled avatar May 23 '15 05:05 radicaled

@radicaled I'm busy a lot this summer, but I'll get around to making it even better. For now, I am relying on the community.

Atom tests, I'll look and see what I can do.

apm publish: The idea is that when you publish, it has a pre-hook which compiles the code and then publishes.

azenla avatar May 23 '15 05:05 azenla

I dig that. Don't rush on my account:

I'll put some thought into whether going to JS -> Dart is a safe route. Until dev_compiler lands in Dart proper, there would be issues with debugging the packages, and the stacktraces provided by Atom when someone clicks 'Report Issue' would be completely unreadable.

radicaled avatar May 23 '15 05:05 radicaled

@radicaled You make a valid point. We do have source maps though, provided you bundle it, it will help.

azenla avatar May 23 '15 05:05 azenla