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

Notify user when the Dart SDK differs from the one bundled with Flutter #54

Closed
pq opened this issue Aug 23, 2016 · 11 comments
Closed

Notify user when the Dart SDK differs from the one bundled with Flutter #54

pq opened this issue Aug 23, 2016 · 11 comments

Comments

@pq
Copy link
Contributor

pq commented Aug 23, 2016

It may be confusing to users if the default SDK defined in the Dart Plugin and the one bundled with Flutter disagree. An easy mitigation would be to define an inspection that detects this case and notifies the user. They may choose to correct it or ignore it.

Two places where this might make sense:

  • in Flutter SDK configuration
  • as an inspection that generates an editor notification

In both places the warning should be dismissible.

cc @devoncarew

@pq pq added the enhancement label Aug 23, 2016
@pq pq self-assigned this Aug 23, 2016
@pq pq added the usability label Aug 23, 2016
@eseidelGoogle
Copy link

See also flutter/flutter#3449

@sethladd
Copy link

It will definitely be confusing :)

Please override whatever Dart SDK is configured by the user over in the dart plugin, and use whatever Dart SDK is vendored by Flutter when editing a Flutter app.

Also, consider allowing each project to have a Flutter SDK setting. A global setting, for all projects across the IDE, makes it hard to have project A using Flutter 1.2.3 and project B using Flutter 2.1.1.

@pq
Copy link
Contributor Author

pq commented Aug 23, 2016

A global setting, for all projects across the IDE, makes it hard to have project A using Flutter 1.2.3 and project B using Flutter 2.1.1.

Right. This brings up the larger issue which is that the Dart Plugin currently does not support per-project SDKs....

cc @jwren for some background.

@sethladd
Copy link

To be clear, Flutter isn't released in a way that makes this super easy. But, we'll get there before we know it. And as long as we're talking about configurations, I'd like us to think about how to do per-project SDK configurations.

@eseidelGoogle
Copy link

This is a large issue, see flutter/flutter#3770 for more context. Our current focus is internal where this doesn't occur, but as Seth notes, external deployments are going to sneak up on us soon. So we definitely need to design for a world where folks can have multiple flutter projects not all of which use the same versions of flutter (and thus Dart). Not sure what the entire solution looks like, but please do plan for such a world. :)

@pq
Copy link
Contributor Author

pq commented Aug 23, 2016

Added a separate tracking bug for the per-project SDKs ask (#56). Thanks for all the input! :)

@pq
Copy link
Contributor Author

pq commented Aug 25, 2016

An editor notification (in progress), that nags if the SDKs are not the same.

screen shot 2016-08-24 at 5 02 05 pm

@sethladd : wordsmithing appreciated!

@jwren
Copy link
Member

jwren commented Aug 25, 2016

Great progress Phil!

@sethladd
Copy link

Sorry, I'm confused. Why does this check exist?

Shouldn't a Flutter project's Dart SDK be auto-set from the Flutter SDK that they've pointed to.

In other words, shouldn't the Flutter project's settings be decoupled from a Dart project's settings? Why are we (apparently?) forcing our users to have a single Dart SDK configured for all projects in IntelliJ that might be using Dart?

(apologies if I'm not understanding what this message is telling our users...)

stevemessick added a commit that referenced this issue Aug 25, 2016
Mismatched SDK checking and service plumbing (#54,#61).
@pq
Copy link
Contributor Author

pq commented Aug 28, 2016

Shouldn't a Flutter project's Dart SDK be auto-set from the Flutter SDK that they've pointed to.

Absolutely. That's what we're shooting for but the Dart plugin does not support per-module SDKs. I opened #56 to track this at the Flutter plugin level but this is really a deeper issue with Dart support in general.

@jwren feel free to chime in... Otherwise, perhaps we should all VC to discuss?

@mit-mit mit-mit added this to the external alpha launch milestone Oct 5, 2016
@pq
Copy link
Contributor Author

pq commented Oct 6, 2016

I think we're as far as we want to go on this for a first cut. Flutter SDK configuration should set the right SDK and if a user has done something different they'll see an editor notification. Feel free to re-open if you want to continue to iterate. Or maybe better still, open new issues to track specific asks.

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

No branches or pull requests

5 participants