Skip to content

Flutter and Angular Dart should adopt optional new and const #32596

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

Closed
1 task done
JekCharlsonYu opened this issue Mar 19, 2018 · 21 comments
Closed
1 task done

Flutter and Angular Dart should adopt optional new and const #32596

JekCharlsonYu opened this issue Mar 19, 2018 · 21 comments
Assignees
Labels
area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...).
Milestone

Comments

@JekCharlsonYu
Copy link
Contributor

JekCharlsonYu commented Mar 19, 2018

@JekCharlsonYu JekCharlsonYu modified the milestones: Dart2 Beta 3, Dart2 Beta 4 Mar 19, 2018
@mit-mit
Copy link
Member

mit-mit commented Mar 20, 2018

From discussion with @Hixie, the preferred approach is to have a lint for this (opened #32602 to track)

@Hixie
Copy link
Contributor

Hixie commented Mar 20, 2018

A lint would be great! cc @a14n who likes lints. :-)

@matanlurey
Copy link
Contributor

matanlurey commented Mar 20, 2018

We'd prefer to have a single collection of lints that best represents the style guide, and not to have to enable individual lints. As such we are not conforming to this new optional new/const until that is a possibility (and is vetted by the style guide team for both correctness and performance - we've had lints that literally caused IDE crashes due to leaks/memory usage).

@mit-mit
Copy link
Member

mit-mit commented Mar 20, 2018

We are asking for a lint that individual teams / repos / apps / package can opt-in to enforcing at their own schedule.

@Hixie
Copy link
Contributor

Hixie commented Mar 20, 2018

FWIW, Flutter has a pair of "recommended" analysis options files, one for people who want an easy-go-lucky style (the default for flutter analyze), and one for people who want a super-strict style (the default for the Flutter repository itself). I could totally see the Effective Dart style guide having a recommended set of lints in the same way.

@dgrove
Copy link
Contributor

dgrove commented Apr 28, 2018

@JekCharlsonYu this looks unlikely to happen by Beta 4.

@a14n are you taking on the lint?

@a14n
Copy link
Contributor

a14n commented Apr 28, 2018

@dgrove there's a pending PR for that dart-archive/linter#936. But as the rules have evolved it needs perhaps some changes. On vacation I will not work on it before a week.

@JekCharlsonYu
Copy link
Contributor Author

@dgrove moving it to Dart2 Stable at least.

@JekCharlsonYu JekCharlsonYu modified the milestones: Dart2Beta4, Dart2Stable Apr 30, 2018
@dgrove
Copy link
Contributor

dgrove commented Jun 15, 2018

Is there more work to do here? Angular has adopted this, and I don't think there's any more work in this repo. @mit-mit your thoughts?

@mit-mit
Copy link
Member

mit-mit commented Jun 19, 2018

Flutter list moved to flutter/flutter#18604

@mit-mit mit-mit closed this as completed Jun 19, 2018
@mit-mit
Copy link
Member

mit-mit commented Jun 20, 2018

Re-activating, was told that this is still blocked on resolutions to #57706 and #57712

@dgrove
Copy link
Contributor

dgrove commented Jun 20, 2018

@pq - sending your way, as this is blocked on linter.

@pq
Copy link
Member

pq commented Jun 20, 2018

#57706 hinges on an analyzer fix. @bwilkerson, @scheglov : any thoughts?

@bwilkerson
Copy link
Member

At least one of the analyzer issues is being fixed here: https://dart-review.googlesource.com/61220. I don't know whether there are other issues that need to be fixed.

@munificent munificent added area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). and removed area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). area-multi labels Jun 22, 2018
@dgrove
Copy link
Contributor

dgrove commented Jun 23, 2018

@pq - that analyzer issue https://dart-review.googlesource.com/61220 has landed. Is anything else needed to address #57706 ?

@pq
Copy link
Member

pq commented Jun 25, 2018

The issue here is that we need to land a new analyzer package.

/cc @devoncarew @bwilkerson

@pq
Copy link
Member

pq commented Jun 26, 2018

#57706

Analyzer published; now fixed.

@dgrove
Copy link
Contributor

dgrove commented Jul 9, 2018

@mit-mit #57706 is fixed and #57712 has been worked around (although there is an underlying fix for #57712 that will need to come in for things outside Flutter). Can this be closed?

@a-siva a-siva added the area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). label Jul 9, 2018
@mit-mit
Copy link
Member

mit-mit commented Jul 11, 2018

We cannot close this before we resolve all mentioned issues from #57712 (specifically #33647 is unresolved), but based on comments in those we can get those fixes from 2.1 top of tree, so moving this to 2.1

@mit-mit mit-mit modified the milestones: Dart2Stable, Dart2.1 Jul 11, 2018
@munificent munificent changed the title Meta Issue for Flutter and Angular Dart code in repos/sites to adopt optional new and cons Flutter and Angular Dart should adopt optional new and const Jul 11, 2018
@munificent munificent removed the area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). label Jul 11, 2018
@dgrove
Copy link
Contributor

dgrove commented Oct 9, 2018

#33647 is closed, and I can't tell if #57712 has anything remaining. Can this be closed?

@pq
Copy link
Member

pq commented Oct 9, 2018

I believe so!

@dgrove dgrove closed this as completed Oct 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...).
Projects
None yet
Development

No branches or pull requests