Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

adds Flutter support #62

Merged
merged 5 commits into from
Mar 10, 2016
Merged

Conversation

collinjackson
Copy link
Contributor

No description provided.

@devoncarew
Copy link
Contributor

I'll take a look, but @vsmenon for FYI -


import 'dart:io';

void main() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no action necessary, but this example will get crazy out of date

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to re-do this in markdown, as a few lines diffs to the std flutter hello-world app.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to add a check for the opt-in flag, so it should become more different from the Flutter example

@collinjackson collinjackson changed the title partial Flutter support adds Flutter support Mar 9, 2016

# Measure the size of the compiled JS, for the dart:html version of the library.
dart tool/grind.dart build
#dart tool/grind.dart build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this fail? This should be compiling with dart2js, not DDC.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was failing for me, but maybe I'm doing something wrong.

    dart2js --minify -obuild/example/example.dart.js example/example.dart
    example/example.dart:12:1:
    Error: Library not found 'package:usage/usage_html.dart'.
    import 'package:usage/usage_html.dart';
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    example/example.dart:37:17:
    Warning: Cannot resolve type 'Analytics'.
    void _handleFoo(Analytics analytics) {
                    ^^^^^^^^^
    example/example.dart:26:1:
    Warning: Cannot resolve type 'Analytics'.
    Analytics getAnalytics() {
    ^^^^^^^^^
    example/example.dart:41:17:
    Warning: Cannot resolve type 'Analytics'.
    void _handleBar(Analytics analytics) {
                    ^^^^^^^^^
    example/example.dart:45:18:
    Warning: Cannot resolve type 'Analytics'.
    void _changePage(Analytics analytics) {
                     ^^^^^^^^^
    example/example.dart:14:1:
    Warning: Cannot resolve type 'Analytics'.
    Analytics _analytics;
    ^^^^^^^^^
    example/example.dart:29:22:
    Warning: Cannot resolve 'AnalyticsHtml'.
        _analytics = new AnalyticsHtml(_lastUa, 'Test app', '1.0');
                         ^^^^^^^^^^^^^
    example/example.dart:14:1:
    Warning: Cannot resolve type 'Analytics'.
    Analytics _analytics;
    ^^^^^^^^^
    Error: Compilation failed.

    failed with exit code 1
    #0      run (package:grinder/src/run.dart:48:5)
    #1      Dart2js.compile (package:grinder/grinder_sdk.dart:344:5)
    #2      build (file:///Volumes/skynet/usage/tool/grind.dart:30:11)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likely dart2js is not fully happy with conditional imports, or we've specified something incorrectly here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to add --conditional_directives to the call to dart2js.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Done here: #64

@devoncarew
Copy link
Contributor

lgtm

devoncarew added a commit that referenced this pull request Mar 10, 2016
@devoncarew devoncarew merged commit 6501cc3 into dart-archive:master Mar 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants