Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade source_gen dependency to 0.5 #8

Closed
enyo opened this issue Apr 26, 2016 · 14 comments
Closed

Upgrade source_gen dependency to 0.5 #8

enyo opened this issue Apr 26, 2016 · 14 comments

Comments

@enyo
Copy link

enyo commented Apr 26, 2016

This would be great since we aren't able to use google_maps otherwise

@a14n
Copy link
Owner

a14n commented Apr 26, 2016

For google_maps source_gen is only used to generate source files. If you only use google_maps you can ignore the source_gen dependency by using :

dependency_overrides:
  source_gen: 0.5

Let me know if it works or not.

@enyo
Copy link
Author

enyo commented Apr 27, 2016

Great, thanks!

@enyo enyo closed this as completed Apr 27, 2016
@enyo
Copy link
Author

enyo commented Apr 27, 2016

If it's only used to build the library, shouldn't they go to dev_dependencies?

@enyo
Copy link
Author

enyo commented Apr 27, 2016

Oh... unfortunately it only worked in dartium, and not Chrome.

@enyo enyo reopened this Apr 27, 2016
@a14n
Copy link
Owner

a14n commented Apr 27, 2016

Actually, there's a generator that does use source_gen to generate files. Thegenerated files depend on lib/js_wrapping.dart but don't need source_gen to work.
google_maps has been generated with source_gen but the package can be used without this source_gen dependency.

@a14n
Copy link
Owner

a14n commented Apr 27, 2016

I just tried https://github.com/a14n/dart-google-maps/tree/master/example/01-basics/map-simple and removing the packages/source_gen directory. It works with Dart 1.15.0 in Dartium and dart2js.

@enyo
Copy link
Author

enyo commented Apr 27, 2016

When I try to compile to js I get

[Error from Dart2JS on exitlive|web/default.bootstrap.initialize.dart]:
packages/google_maps/src/core/map/map.dart:19:3:
External method without an implementation.
  external factory _GMap(Node mapDiv, [MapOptions opts]);
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Error from Dart2JS on exitlive|web/default.bootstrap.initialize.dart]:
packages/google_maps/src/core/map/map_options.dart:19:3:
External method without an implementation.
  external factory _MapOptions();
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Error from Dart2JS on exitlive|web/default.bootstrap.initialize.dart]:
packages/google_maps/src/core/controls/map_type_control_options.dart:19:3:
External method without an implementation.
  external factory _MapTypeControlOptions();
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@a14n
Copy link
Owner

a14n commented Apr 27, 2016

What Dart version are you using ?

@enyo
Copy link
Author

enyo commented Apr 27, 2016

Actually, there's a generator that does use source_gen to generate files. Thegenerated files depend on lib/js_wrapping.dart but don't need source_gen to work.
google_maps has been generated with source_gen but the package can be used without this source_gen dependency.

So the correct way would be to add js_wrapping as a dependency, and source_gen as a dev_dependency?

I'm using dart 1.15.

EDIT:

source_gen 0.4.8
js_wrapping 0.2.0+1
google_maps 3.1.0

@a14n
Copy link
Owner

a14n commented Apr 27, 2016

Not really because the generator (used in google_maps) need this transitionnal dependency. dev_dependency would make the generator only usable inside js_wrapping which is not what is needed.

@enyo
Copy link
Author

enyo commented Apr 27, 2016

Do you have any idea why it wouldn't work or what I could try?

@a14n
Copy link
Owner

a14n commented Apr 27, 2016

Is your project public ? Do you have a URL ?

@enyo
Copy link
Author

enyo commented Apr 27, 2016

No unfortunately not.

@enyo enyo closed this as completed Apr 27, 2016
@enyo enyo reopened this Apr 27, 2016
@enyo
Copy link
Author

enyo commented Apr 28, 2016

So, the problem was that we imported a server package in the client. :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants