Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

The tutorial gives a step that results in an error, hindering the reader from completion. #595

Closed
nicolasgarnier opened this issue Aug 26, 2014 · 5 comments

Comments

@nicolasgarnier
Copy link
Contributor

From [email protected] on February 28, 2013 06:44:00

Target Num: No idea what this means.

Page Title: Get Started With Web UI

Subtitle: Set up background compilation in Dart Editor Issue/feedback: This code does not compile. The first step results in this error, when trying to run:

Error setting breakpoint at 'main': 'package:logging/logging.dart': Error: line 250 pos 24: wrong number of type arguments in type 'Comparable'
class Level implements Comparable {
^

I suggest redoing step #1 such that you explain how you added the build.dart file. Perhaps you did it in a special way I do not know? The way I did it was to right-click and select "New File".

Original issue: http://code.google.com/p/dart/issues/detail?id=8845

@nicolasgarnier
Copy link
Contributor Author

From [email protected] on February 28, 2013 07:59:28

Is this a problem in the logging package? Anyway, it's stopping people from using Web UI. We have a meetup tonight where a bunch of non-Dart people are going to be introduced to Dart and web components, so the faster you fix this, the better... http://stackoverflow.com/questions/15128391/why-does-the-first-step-in-the-get-started-with-web-ui-tutorial-cause-an-error

Status: New
Owner: [email protected]
Cc: [email protected] [email protected] [email protected]
Labels: Priority-Critical

@nicolasgarnier
Copy link
Contributor Author

From [email protected] on February 28, 2013 09:38:57

Can you please paste in your pubspec.lock and also the contents of Editor | About (we're curious what version of the editor you are using)

Thanks!

Status: Triaged

@nicolasgarnier
Copy link
Contributor Author

From [email protected] on February 28, 2013 09:55:43

Hi

It seems that the issue comes from a mismatched version of the logging package and the editor.

We actually use SDK constraints in the web-ui package to avoid mismatches, but I think this happened because the packages that live dart/pkg (such as 'logging') don't have these constraints.

In this last release of web-ui we actually didn't change the sdk constraint because it turns out that web-ui works with the old SDK too. More specifically, using web-ui 0.3.3+4 and 0.4.0 will work with (sdk 0.3.7+6, logging 0.3.7+6) and with (sdk 0.4.0, logging 0.4.0). However any combination of (sdk 0.4.0 and logging 0.3.7+6) or (sdk 0.3.7+6 and logging 0.4.0) will fail with the error you have above.

There are two ways to solve this issue: pin the old version of logging in your pubspec.yaml, or update your SDK to the latest.

@nicolasgarnier
Copy link
Contributor Author

From [email protected] on February 28, 2013 10:08:13

Here are the contents of my pubspec.lock.

    # Generated by pub. See: http://pub.dartlang.org/doc/glossary.html#lockfile {"packages":{"web_ui":{"version":"0.4.0","source":"hosted","description":"web_ui"},"browser":{"version":"0.4.0","source":"hosted","description":"browser"},"benchmark_harness":{"version":"1.0.2","source":"hosted","description":"benchmark_harness"},"html5lib":{"version":"0.3.3+2","source":"hosted","description":"html5lib"},"args":{"version":"0.4.0","source":"hosted","description":"args"},"logging":{"version":"0.4.0","source":"hosted","description":"logging"},"csslib":{"version":"0.3.4+4","source":"hosted","description":"csslib"},"js":{"version":"0.0.16","source":"hosted","description":"js"},"source_maps":{"version":"0.3.2","source":"hosted","description":"source_maps"},"unittest":{"version":"0.4.0","source":"hosted","description":"unittest"},"analyzer_experimental":{"version":"0.4.0","source":"hosted","description":"analyzer_experimental"},"meta":{"version":"0.4.0","source":"hosted","description":"meta"},"pathos":{"version":"0.4.0","source":"hosted","description":"pathos"}}}

As a dart newbie, I don't know how to pin the old version of logging in my pubspec.yaml nor how to update my SDK to the latest. Perhaps a Google search will yield instructions for me tomorrow night, but it'd be nice to see any required steps in the tutorial itself.

@nicolasgarnier
Copy link
Contributor Author

From [email protected] on February 28, 2013 10:19:25

Thanks!

No worries. I agree we should have some of these instructions in the tutorial.

Here are some quick tricks:

  • To update your SDK:
    -- open the editor's about page (Help -> About Dart Editor).
    -- it will check if there are any new version available, if they are, you can click an update button at the bottom to get the latest editor.
    I believe that in your particular case there should be an update available to move to 0.4.0 (let us knows if you don't have one, because there might be something else going wrong in that case).
  • To pin a version of logging:
    -- open 'pubspec.yaml' and add an entry under dependencies that says:
    logging: "0.3.7+6"
    Note that I selected 0.3.7+6 assuming that's the version number that matches your editor's version.

I'm going to close this bug assuming this was the reason behind the problem, but let us know if for some reason it still doesn't work for you.

Status: Done

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants