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

Lint rule request - deprecated_member_use_same_package #57867

Closed
srawlins opened this issue Jan 4, 2019 · 2 comments · Fixed by flutter/engine#7490
Closed

Lint rule request - deprecated_member_use_same_package #57867

srawlins opened this issue Jan 4, 2019 · 2 comments · Fixed by flutter/engine#7490
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. linter-lint-request type-enhancement A request for a change that isn't a bug

Comments

@srawlins
Copy link
Member

srawlins commented Jan 4, 2019

As per #35556 and #30084, we are going to split the analyzer Hint, DEPRECATED_MEMBER_USE into a Hint and a Lint:

  • Analyzer's DEPRECATED_MEMBER_USE will be altered to not report deprecated member use from within the package where the deprecated member is declared.
  • Linter will get a new Lint, something like deprecated_member_use_same_package, which will report on deprecated member usage from the same package where the deprecated member was declared.

This maybe quite difficult to implement, it's a very meaty chunk of the BestPracticesVerifier in analyzer.

(The name could be deprecated_member_use_same_package or same_package_deprecated_member_use; the latter reads nicely, but I like that the former starts with the same string as the Hint, deprecated_member_use; I dunno what naming policies apply...)

@pq pq added linter-lint-request type-enhancement A request for a change that isn't a bug labels Jan 4, 2019
@srawlins
Copy link
Member Author

srawlins commented Jan 8, 2019

@bwilkerson after thinking about the implementation; I think that DEPRECATED_MEMBER_USE is complicated enough, and bug-prone enough (the implementation runs through so many visit methods in BestPracticesVisitor) that I think DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE should be a Hint now.

This would effectively not change the strictness of the analyzer; it would just break up the existing Hint into two, so that users can ignore the _FROM_SAME_PACKAGE variant via analysis options. WDYT?

@bwilkerson
Copy link
Member

It would mean that I wouldn't have to add a lint to all of the packages I work on, so sgtm. :-)

More seriously, though, I think that's a reasonable approach to meeting the original request.

dart-bot referenced this issue Jan 15, 2019
fixes https://github.com/dart-lang/linter/issues/1349

Bug: #30084
Change-Id: I4954b883c1baf019a62776fec108eac60960b22e
Reviewed-on: https://dart-review.googlesource.com/c/88881
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
bkonyi referenced this issue in flutter/engine Jan 15, 2019
d994443 [Kernel] Clean up error reporting in constant evaluation
5930016 Remove test flakiness records with misspelled field
04131e7 Implement some more LSP rename tests
9d9f467 Revert "[infra] Blacklist android device id in attempt to make buildbot builder more stable"
c54bc11 Split DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE off; fixes #30084 and fixes https://github.com/dart-lang/linter/issues/1349
3a42949 Resolve type names and set nullability for other types.
e4b26e7 [ VM / dart:io ] Update documentation for  to warn '--pause-isolates-on-exit' is not respected when `exit` is called
df0671d [VM] Experimental flags in the dart CLI
3e5e05d [infra] Trigger bots after outage.
7e1aa67 Restore TLABs.
387a644 Issue 33930. Fix resynthesizing function typed field formal parameter types.
b58aa3b Add PubWorkspace, integrate it into ContextBuilder, and therefore fix sealed test
a60a06f Update pkg:expect to use @alwaysThrows annotation on fail functions
fafd3d0 Make bottom, dynamic, void types nullable. Add withNullability() method. Apply proposed substitution rules for type parameters.
7bac8e6 Issue 35551. Log more information to debug the issue.
957f3e2 Restore including transitive files into exception dumps.
9df4f42 [dartdevc] handle a null stack trace passed to async errors
4d77c7b [vm] Remove redundant type-checks from core libraries.
6c76fe2 Issue 25860. Fix for changeFile() directly after removeFile().
02b1658 Revert "[VM/Compiler] Revoke definition status of certain instructions."
8cddcd2 Handle deserialising sub-classes in the super-classes fromJson
19dbf07 [infra] Update checked in SDKs to 2.1.1-dev.1.0
0d6402c Remove faststartup from the test matrix
28fe86d Add implementation/tests for LSP rename
f5c6907 Minor LSP refactors/tidy up
3104aea [release] Add changelog entry for breaking mirrors change
37fba56 [release] Update changelog with changes from dev branch
a877714 [VM/Compiler] Revoke definition status of certain instructions.
32eea54 Extract rename element logic to allow sharing with LSP server
4f16055 Extract inline interfaces from `results` definitions in LSP spec
085f31a Library import quick-fix: support calls to top-level function variables
eac2e0f [gardening] mark standalone_2/io/http_bind_test as flaky
1c83d8d [Kernel] Allow invalid expressions in constant contexts
950b921 Extract method reportInheritanceConflict
6e13f33 Abstract noSuchMethod might not be an error.
b2224db API documentation update to address #35399
bkonyi referenced this issue in flutter/engine Jan 15, 2019
d994443 [Kernel] Clean up error reporting in constant evaluation
5930016 Remove test flakiness records with misspelled field
04131e7 Implement some more LSP rename tests
9d9f467 Revert "[infra] Blacklist android device id in attempt to make buildbot builder more stable"
c54bc11 Split DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE off; fixes #30084 and fixes https://github.com/dart-lang/linter/issues/1349
3a42949 Resolve type names and set nullability for other types.
e4b26e7 [ VM / dart:io ] Update documentation for  to warn '--pause-isolates-on-exit' is not respected when `exit` is called
df0671d [VM] Experimental flags in the dart CLI
3e5e05d [infra] Trigger bots after outage.
7e1aa67 Restore TLABs.
387a644 Issue 33930. Fix resynthesizing function typed field formal parameter types.
b58aa3b Add PubWorkspace, integrate it into ContextBuilder, and therefore fix sealed test
a60a06f Update pkg:expect to use @alwaysThrows annotation on fail functions
fafd3d0 Make bottom, dynamic, void types nullable. Add withNullability() method. Apply proposed substitution rules for type parameters.
7bac8e6 Issue 35551. Log more information to debug the issue.
957f3e2 Restore including transitive files into exception dumps.
9df4f42 [dartdevc] handle a null stack trace passed to async errors
4d77c7b [vm] Remove redundant type-checks from core libraries.
6c76fe2 Issue 25860. Fix for changeFile() directly after removeFile().
02b1658 Revert "[VM/Compiler] Revoke definition status of certain instructions."
8cddcd2 Handle deserialising sub-classes in the super-classes fromJson
19dbf07 [infra] Update checked in SDKs to 2.1.1-dev.1.0
0d6402c Remove faststartup from the test matrix
28fe86d Add implementation/tests for LSP rename
f5c6907 Minor LSP refactors/tidy up
3104aea [release] Add changelog entry for breaking mirrors change
37fba56 [release] Update changelog with changes from dev branch
a877714 [VM/Compiler] Revoke definition status of certain instructions.
32eea54 Extract rename element logic to allow sharing with LSP server
4f16055 Extract inline interfaces from `results` definitions in LSP spec
085f31a Library import quick-fix: support calls to top-level function variables
eac2e0f [gardening] mark standalone_2/io/http_bind_test as flaky
1c83d8d [Kernel] Allow invalid expressions in constant contexts
950b921 Extract method reportInheritanceConflict
6e13f33 Abstract noSuchMethod might not be an error.
b2224db API documentation update to address #35399
bkonyi referenced this issue in flutter/engine Jan 15, 2019
d994443 [Kernel] Clean up error reporting in constant evaluation
5930016 Remove test flakiness records with misspelled field
04131e7 Implement some more LSP rename tests
9d9f467 Revert "[infra] Blacklist android device id in attempt to make buildbot builder more stable"
c54bc11 Split DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE off; fixes #30084 and fixes https://github.com/dart-lang/linter/issues/1349
3a42949 Resolve type names and set nullability for other types.
e4b26e7 [ VM / dart:io ] Update documentation for  to warn '--pause-isolates-on-exit' is not respected when `exit` is called
df0671d [VM] Experimental flags in the dart CLI
3e5e05d [infra] Trigger bots after outage.
7e1aa67 Restore TLABs.
387a644 Issue 33930. Fix resynthesizing function typed field formal parameter types.
b58aa3b Add PubWorkspace, integrate it into ContextBuilder, and therefore fix sealed test
a60a06f Update pkg:expect to use @alwaysThrows annotation on fail functions
fafd3d0 Make bottom, dynamic, void types nullable. Add withNullability() method. Apply proposed substitution rules for type parameters.
7bac8e6 Issue 35551. Log more information to debug the issue.
957f3e2 Restore including transitive files into exception dumps.
9df4f42 [dartdevc] handle a null stack trace passed to async errors
4d77c7b [vm] Remove redundant type-checks from core libraries.
6c76fe2 Issue 25860. Fix for changeFile() directly after removeFile().
02b1658 Revert "[VM/Compiler] Revoke definition status of certain instructions."
8cddcd2 Handle deserialising sub-classes in the super-classes fromJson
19dbf07 [infra] Update checked in SDKs to 2.1.1-dev.1.0
0d6402c Remove faststartup from the test matrix
28fe86d Add implementation/tests for LSP rename
f5c6907 Minor LSP refactors/tidy up
3104aea [release] Add changelog entry for breaking mirrors change
37fba56 [release] Update changelog with changes from dev branch
a877714 [VM/Compiler] Revoke definition status of certain instructions.
32eea54 Extract rename element logic to allow sharing with LSP server
4f16055 Extract inline interfaces from `results` definitions in LSP spec
085f31a Library import quick-fix: support calls to top-level function variables
eac2e0f [gardening] mark standalone_2/io/http_bind_test as flaky
1c83d8d [Kernel] Allow invalid expressions in constant contexts
950b921 Extract method reportInheritanceConflict
6e13f33 Abstract noSuchMethod might not be an error.
b2224db API documentation update to address #35399
bkonyi referenced this issue in flutter/engine Jan 15, 2019
d994443 [Kernel] Clean up error reporting in constant evaluation
5930016 Remove test flakiness records with misspelled field
04131e7 Implement some more LSP rename tests
9d9f467 Revert "[infra] Blacklist android device id in attempt to make buildbot builder more stable"
c54bc11 Split DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE off; fixes #30084 and fixes https://github.com/dart-lang/linter/issues/1349
3a42949 Resolve type names and set nullability for other types.
e4b26e7 [ VM / dart:io ] Update documentation for  to warn '--pause-isolates-on-exit' is not respected when `exit` is called
df0671d [VM] Experimental flags in the dart CLI
3e5e05d [infra] Trigger bots after outage.
7e1aa67 Restore TLABs.
387a644 Issue 33930. Fix resynthesizing function typed field formal parameter types.
b58aa3b Add PubWorkspace, integrate it into ContextBuilder, and therefore fix sealed test
a60a06f Update pkg:expect to use @alwaysThrows annotation on fail functions
fafd3d0 Make bottom, dynamic, void types nullable. Add withNullability() method. Apply proposed substitution rules for type parameters.
7bac8e6 Issue 35551. Log more information to debug the issue.
957f3e2 Restore including transitive files into exception dumps.
9df4f42 [dartdevc] handle a null stack trace passed to async errors
4d77c7b [vm] Remove redundant type-checks from core libraries.
6c76fe2 Issue 25860. Fix for changeFile() directly after removeFile().
02b1658 Revert "[VM/Compiler] Revoke definition status of certain instructions."
8cddcd2 Handle deserialising sub-classes in the super-classes fromJson
19dbf07 [infra] Update checked in SDKs to 2.1.1-dev.1.0
0d6402c Remove faststartup from the test matrix
28fe86d Add implementation/tests for LSP rename
f5c6907 Minor LSP refactors/tidy up
3104aea [release] Add changelog entry for breaking mirrors change
37fba56 [release] Update changelog with changes from dev branch
a877714 [VM/Compiler] Revoke definition status of certain instructions.
32eea54 Extract rename element logic to allow sharing with LSP server
4f16055 Extract inline interfaces from `results` definitions in LSP spec
085f31a Library import quick-fix: support calls to top-level function variables
eac2e0f [gardening] mark standalone_2/io/http_bind_test as flaky
1c83d8d [Kernel] Allow invalid expressions in constant contexts
950b921 Extract method reportInheritanceConflict
6e13f33 Abstract noSuchMethod might not be an error.
b2224db API documentation update to address #35399
engine-flutter-autoroll referenced this issue in engine-flutter-autoroll/flutter Jan 16, 2019
… d9944433af [Kernel] Clean up error reporting in constant evaluation 59300164af Remove test flakiness records with misspelled field 04131e7fa0 Implement some more LSP rename tests 9d9f467195 Revert "[infra] Blacklist android device id in attempt to make buildbot builder more stable" c54bc11770 Split DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE off; fixes flutter#30084 and fixes https://github.com/dart-lang/linter/issues/1349 3a4294963c Resolve type names and set nullability for other types. e4b26e7978 [ VM / dart:io ] Update documentation for  to warn '--pause-isolates-on-exit' is not respected when `exit` is called df0671d664 [VM] Experimental flags in the dart CLI 3e5e05d14f [infra] Trigger bots after outage. 7e1aa67855 Restore TLABs. 387a644008 Issue 33930. Fix resynthesizing function typed field formal parameter types. b58aa3bcb2 Add PubWorkspace, integrate it into ContextBuilder, and therefore fix sealed test a60a06ff7d Update pkg:expect to use @alwaysThrows annotation on fail functions fafd3d0f18 Make bottom, dynamic, void types nullable. Add withNullability() method. Apply proposed substitution rules for type parameters. 7bac8e631f Issue 35551. Log more information to debug the issue. 957f3e239e Restore including transitive files into exception dumps. 9df4f42a2f [dartdevc] handle a null stack trace passed to async errors 4d77c7b3a6 [vm] Remove redundant type-checks from core libraries. 6c76fe21b5 Issue 25860. Fix for changeFile() directly after removeFile(). 02b1658f59 Revert "[VM/Compiler] Revoke definition status of certain instructions." 8cddcd20cd Handle deserialising sub-classes in the super-classes fromJson 19dbf07ea2 [infra] Update checked in SDKs to 2.1.1-dev.1.0 0d6402c1ec Remove faststartup from the test matrix 28fe86d70f Add implementation/tests for LSP rename f5c69070af Minor LSP refactors/tidy up 3104aea6f7 [release] Add changelog entry for breaking mirrors change 37fba56cdc [release] Update changelog with changes from dev branch a8777149a7 [VM/Compiler] Revoke definition status of certain instructions. 32eea54390 Extract rename element logic to allow sharing with LSP server 4f160558b3 Extract inline interfaces from `results` definitions in LSP spec 085f31ac5f Library import quick-fix: support calls to top-level function variables eac2e0f012 [gardening] mark standalone_2/io/http_bind_test as flaky 1c83d8d096 [Kernel] Allow invalid expressions in constant contexts 950b92104d Extract method reportInheritanceConflict 6e13f3334d Abstract noSuchMethod might not be an error. b2224dbec6 API documentation update to address flutter#35399
@devoncarew devoncarew added analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Nov 18, 2024
@devoncarew devoncarew transferred this issue from dart-lang/linter Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. linter-lint-request type-enhancement A request for a change that isn't a bug
Projects
None yet
4 participants