You are not logged in.

#1 2013-11-04 07:55:46

xyproto
Trusted User (TU)
From: Oslo
Registered: 2011-01-11
Posts: 14
Website

dart is now in [community]

Hi,

Dart is a programming language by Google that is increasing in popularity. Some say it's Google's attempt at making a user friendly programming language and environment that is accessible for "everyone". Others prefer it over JavaScript for making web applications. In any case, it has now been made an official Arch Linux package and is readily available as "dart".

However, the default download (big blue "Download Dart" button on the front page of http://dartlang.org) not only comes with the dart-sdk and dart-editor, but also dartium, a modified version of chromium that can be used for debugging dart applications and for running the dart language directly (and faster) instead of translating it to JavaScript first. As I understand, Google wish that dart was the preferred language of programming web-applications, instead of JavaScript, and has hopes that it one day may be included in all the most widespread browsers.

Dartium takes 391 MB, while the rest (sdk+editor) only takes 83 MB. The SDK and Editor is still fully usable and when clicking "run", the dart applications start just fine in Firefox, Chrome or whichever browser that has a sufficient amount of JavaScript support.

While the Arch Linux policy is normally to package the defaults provided by upstream, it seems somewhat excessive (and bloated) to include the 309 MB large dartium browser together with the sdk+editor. Only packaging the sdk was also a possiblity, but I think 83 MB is an acceptable size and there's also the consideration that upstream provides all this in the default download.

Unfortunately, dartlang.org provides no source releases, only binary releases and access to various source repositories. They, as many other google projects, depends on gclient in order to fetch the right source code from various repositories. It's currently not a tempting prospect to package dart from source (but by all means, if someone wants to do this, submit an AUR package an get in touch! smile ).

The comments on the page for the dart-sdk package in AUR gradually came to be more about dart as a whole, rather than about the dart-sdk package, which is why I post this here.

Splitting dart into dart-sdk and dart-editor would also be a possibility, but they are provided as one package by upstream and I imagine that most users would want to use them together. I would also imagine that 83 MB is an acceptable size, but not 391 MB.

My main question is this: Should dartium be included in the dart package, making it a whopping 391 MB? (or should we instead nag upstream to provide both source releases and downloads that are split into the respective components?)

Moving dart back from [community] to AUR, while waiting for the whole thing to mature, is also a possibility. But that wouldn't be any fun.

Last edited by xyproto (2013-11-04 08:55:38)

Offline

#2 2013-11-04 18:08:03

beatgammit
Member
Registered: 2012-04-25
Posts: 18

Re: dart is now in [community]

Maintainer of dart-sdk and dartium in AUR here (used to maintain dart-editor, can continue if this leaves [community]).

I only use dart-sdk (well, actually only the dart binary and pub) and dartium, and I feel there are many others like me that don't want/need a full IDE. There are also others that only need to run Dart in the browser, and don't need the sdk at all, but do need dartium. I feel there should be a logical disconnect between dart binaries (for running servers and whatnot), dart-editor (for those that develop using IDEs) and dartium (for running/testing code), so there should be distinct packages for each. Dartium would go away if/when Chromium ships with the Dart VM.

In short, my preferred solution is to nag upstream to offer source packages for each component (dart-sdk, dart-editor, dartium) with as close to a

./configure && make && make install

-esque build as possible. If there were three packages, I would switch over to using [community] packages, and "dart-sdk" and "dartium" would be obsolete. I consider this to be a net gain, since building dart-editor/dartium takes forever (mostly in compressing, which I imagine many users don't want to turn-off), and I don't even want to think about recompiling dartium from source every week or so to stay up-to-date...

Last edited by beatgammit (2013-11-04 18:09:41)

Offline

#3 2013-11-04 18:46:48

xyproto
Trusted User (TU)
From: Oslo
Registered: 2011-01-11
Posts: 14
Website

Re: dart is now in [community]

Nice insights, thank you! Perhaps the next logical step would be to split the dart package into dart-sdk and dart-editor and keep it that way after all, then. One possible twist would be that the package for dart-sdk is just named "dart" while the package for the dart editor is uploaded as "dart-editor"?

Not entirely sure what to do with dartium, because of the size (in combination with a rapid update frequency). Perhaps I should get in touch with upstream and hear what they have planned.

Offline

#4 2013-11-04 22:24:43

beatgammit
Member
Registered: 2012-04-25
Posts: 18

Re: dart is now in [community]

xyproto wrote:

One possible twist would be that the package for dart-sdk is just named "dart" while the package for the dart editor is uploaded as "dart-editor"?

Yes, that seems logical to me.  Most (all?) other language packages only install the compiler/runtime, and the IDE is a separate package.

xyproto wrote:

Not entirely sure what to do with dartium, because of the size (in combination with a rapid update frequency). Perhaps I should get in touch with upstream and hear what they have planned.

I just checked my install, and it's more than twice (!!) the size of the chromium package (much more than just dart-sdk + chromium), so there's got to be something going on there. Getting an ETA on when/if the DartVM will be packaged with chromium would be very helpful.

As for the update frequency, I've been updating it only when an official release of Dart comes out (once a week or so). Dartium warns (or at least it used to) if you don't update frequently enough (I think it's every 3 weeks); so it could be delayed a bit, but it would probably be best to keep it close to the Dart releases so bugs/features aren't missed.

Offline

#5 2013-11-05 06:41:51

hachre
Member
From: Munich, Germany
Registered: 2013-03-14
Posts: 16
Website

Re: dart is now in [community]

I have been packaging Dart for Ubuntu in my PPA for a while now. Through user feedback and the like I have come to the conclusion that the best split-up (as defined by making most people happy) was like this:

  • dart: meta package, pulls all others in

  • dartvm: includes only the 'dart' executable, nothing else

  • dartsdk: includes the entire dart folder of the upstream zip file

  • darteditor: includes only the editor but nothing else

  • dartium: includes only the chromium directory of the upstream zip file

I am then installing the things and symlinking around in such a way that nothing in the packages is installed (or downloaded) twice and all components find each other automatically. Basically you simply have to recreate the structure that the contents of the original zip file have for things to be happy.

This way people can install as much or as little of Dart as they want. For example the DartVM package is only about 8MB and is all you need to run command line Dart scripts.

About Dartium: AFAIK it is planned that Dart will eventually be included in standard Chromium Builds but this won't happen before 1.0 and might not happen for quite a while after. It is also possible that the Chrome team will decide that Dart hurts the web more than it benefits in which case it will never happen. All those things are not yet decided. Therefore I think it would be best to simply rip the Dartium out of their binary release and use that for the time being. It is nothing more than a debugging tool for Dart programmers for now anyway.

Also Dartium is not recommended to be used as your standard browser but rather just for Dart coding. I have made some changes in my packaging to the included chromium start scripts to make it use its own profile rather than the normal chromium profile because of this. I know that Arch has a as-close-to-upstream-as-possible mantra but I think in this case it makes sense to not mix up a release browser's profile with a experimental debugging browser that might mess things up in there.

Last edited by hachre (2013-11-05 06:56:30)

Offline

#6 2013-11-05 07:41:58

progandy
Member
Registered: 2012-05-17
Posts: 2,152

Re: dart is now in [community]

makepkg can create split packages, so use it when it makes sense. If upstream bundles everything in one archive, we are allowed to split it in reasonable chunks. I believe hachre's packaging is a good way, just use dart as a group instead of a meta-package.

Offline

#7 2013-11-07 23:00:00

drevilt
Member
Registered: 2013-03-17
Posts: 4

Re: dart is now in [community]

may i please redirect your attention to this bug https://bugs.archlinux.org/task/37685 ? i have reported this one as i think this is one reason why this package should be built from source.

Edit: to summarize this bug , when you try to close "pubspec.yaml" document in darteditor , it crashes with a callstack like this:

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.eclipse.swt.internal.gtk.OS._g_object_get_qdata(JI)J+0
j  org.eclipse.swt.internal.gtk.OS.g_object_get_qdata(JI)J+9
j  org.eclipse.swt.widgets.Display.removeWidget(J)Lorg/eclipse/swt/widgets/Widget;+19
j  org.eclipse.swt.widgets.Combo.deregister()V+21

to me, this looks like an incompatible ABI which might come from the fact that this package in only installing binaries. Those binaries might be built for ubuntu only.

Last edited by drevilt (2013-11-07 23:02:06)

Offline

#8 2013-11-09 00:50:55

beatgammit
Member
Registered: 2012-04-25
Posts: 18

Re: dart is now in [community]

drevilt wrote:

may i please redirect your attention to this bug https://bugs.archlinux.org/task/37685 ? i have reported this one as i think this is one reason why this package should be built from source.

Edit: to summarize this bug , when you try to close "pubspec.yaml" document in darteditor , it crashes with a callstack like this:
...snip

Ugh, I thought Java was supposed to be "write once, run everywhere..."

Anyway, it doesn't crash for me (v0.8.7.0; built from old AUR package). Are you using OpenJDK or Oracle's JRE? I'm on OpenJDK:

$ pacman -Q jre7-openjdk
jre7-openjdk 7.u45_2.4.3-1

I do agree though, that it should be built from source. But it would be significantly easier if upstream released source tarballs (they don't currently AFAICT).

Offline

#9 2013-11-10 23:05:03

drevilt
Member
Registered: 2013-03-17
Posts: 4

Re: dart is now in [community]

well, java is accessing native code from the libgobject_2.0.so file using JNI or JNA.  and if it does this wrong then the jvm will crash. If it would be written in pure java it would just throw an exception.
For me it crashes with all 4 combinations of { AUR-"jdk" , openjdk } * { dart-0.8.7.0 ,  dart-0.8.10.3 } . Something must be different on my machine then.
According to the stacktrace it does something with a widget. maybe it is because i have a different style installed then you.

I have flagged the dart package out of date because 0.8.10.3 is out. after it arrives in the repo can you test that too please?

Offline

#10 2013-11-12 21:29:47

xyproto
Trusted User (TU)
From: Oslo
Registered: 2011-01-11
Posts: 14
Website

Re: dart is now in [community]

Updating dart to 0.8.10 and making it so that only dart-sdk is in the "dart" package, like suggested above. I agree that it's better to keep the dart-related packages separated.

beatgammit, sorry for the extra work, but do you have the occation to re-upload dart-editor to AUR? And, if the dart package now looks fine, are you okay with me removing the dart-sdk package from AUR?

Hopefully, dart will mature and upstream will provide split source packages per release in the future. If dart-editor could use system-wide libraries instead of custom ones, that would be grand too.

Thanks for your help, bug reports and insights, people.

Last edited by xyproto (2013-11-12 22:07:16)

Offline

#11 2013-11-13 03:15:41

beatgammit
Member
Registered: 2012-04-25
Posts: 18

Re: dart is now in [community]

No problem, it's uploaded. I have everything scripted, so it's on biggie.

Go ahead and remove dart-sdk, and thanks for taking it over!

Offline

#12 2013-11-14 15:21:16

xyproto
Trusted User (TU)
From: Oslo
Registered: 2011-01-11
Posts: 14
Website

Re: dart is now in [community]

Removed dart-sdk from AUR. Looking forward to moving dart-editor in the future, once it's less problematic to package (and does not have the problem of not using the system-wide libraries).

Offline

Board footer

Powered by FluxBB