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

Incorrect deprecated_member_use_from_same_package in SDK edge #1393

Closed
kevmoo opened this issue Jan 28, 2019 · 12 comments
Closed

Incorrect deprecated_member_use_from_same_package in SDK edge #1393

kevmoo opened this issue Jan 28, 2019 · 12 comments
Assignees
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@kevmoo
Copy link
Member

kevmoo commented Jan 28, 2019

SDK @ dart-lang/sdk@ec5ba8a
Linter DEP @ 0.1.79

Build repo @ dart-lang/build@9a6652e

$ cd build_modules
$ dartanalyzer .
Analyzing build_modules...
  hint • 'analyzer' is deprecated and shouldn't be used at lib/src/errors.dart:8:1 • deprecated_member_use_from_same_package
  hint • 'analyzer' is deprecated and shouldn't be used at lib/src/module_library.dart:8:1 • deprecated_member_use_from_same_package
2 hints found.

These lines are ignored in source with // ignore: deprecated_member_use

pkg:analyzer != pkg:build_modules

@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) Priority-High labels Jan 28, 2019
@bwilkerson
Copy link
Member

The ignore comments need to be updated to use the new lint name.

@srawlins srawlins self-assigned this Jan 28, 2019
@kevmoo
Copy link
Member Author

kevmoo commented Jan 28, 2019

The ignore comments need to be updated to use the new lint name.

But they are ignoring another package. The lint is a false positive!

@srawlins
Copy link
Member

I can't reproduce this on a Dart synced and compiled just a few minutes ago ☹️

$ ~/code/dart-sdk/sdk/xcodebuild/ReleaseX64/dart-sdk/bin/dartanalyzer --version
dartanalyzer version 2.2.0-edge.b34ad87714c9203f998674c86635c2181be9a3da
$ ~/code/dart-sdk/sdk/xcodebuild/ReleaseX64/dart-sdk/bin/dartanalyzer lib/src/errors.dart           
Analyzing lib/src/errors.dart...
No issues found!
# After removing that `// ignore:`:
$ ~/code/dart-sdk/sdk/xcodebuild/ReleaseX64/dart-sdk/bin/dartanalyzer lib/src/errors.dart 
Analyzing lib/src/errors.dart...
  hint • 'analyzer' is deprecated and shouldn't be used at lib/src/errors.dart:7:1 • deprecated_member_use
1 hint found.

@kevmoo
Copy link
Member Author

kevmoo commented Jan 28, 2019 via email

@srawlins
Copy link
Member

Same.

$ ~/code/dart-sdk/sdk/xcodebuild/ReleaseX64/dart-sdk/bin/dartanalyzer .                             
Analyzing build_modules...
  hint • 'analyzer' is deprecated and shouldn't be used at lib/src/errors.dart:7:1 • deprecated_member_use                                    
1 hint found.

I have not run any build stuff in my checkout, so my .dart_tool/ is woefully missing a build/ directory. Is yours?

$ ls .dart_tool/
pub

@kevmoo
Copy link
Member Author

kevmoo commented Jan 28, 2019

Surprise, surprise: if I delete .dart_tool/build it all works as expected.

@srawlins
Copy link
Member

erp, I can reproduce now with that directory. Looking into this...

@srawlins
Copy link
Member

Fix in the mail: https://dart-review.googlesource.com/c/sdk/+/91441

@kevmoo
Copy link
Member Author

kevmoo commented Jan 28, 2019

Thanks!

dart-bot pushed a commit to dart-lang/sdk that referenced this issue Jan 29, 2019
This implementation did not check whether the path was actually contained
in the package:build workspace. It also made an assumption about how a
resource which is a directory would be treated, which was masked by an
unconditional-and-silenced catch.

The existing test which should have caught this had a hidden exception,
caught by the same unconditional-and-silenced catch. :(

Bug: dart-lang/linter#1393
Change-Id: I0a6ecb584e06877463a47681830eed8f6f914030
Reviewed-on: https://dart-review.googlesource.com/c/91441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
@kevmoo
Copy link
Member Author

kevmoo commented May 9, 2019

This was supposed to be fixed, but I'm seeing again in 2.3.1-dev.0.0

Sync and load https://github.com/dart-lang/pubspec_parse/

Analyzing pubspec_parse...
  hint • 'author' is deprecated and shouldn't be used at test/parse_test.dart:19:18 • deprecated_member_use
  hint • 'author' is deprecated and shouldn't be used at test/parse_test.dart:52:18 • deprecated_member_use
  hint • 'author' is deprecated and shouldn't be used at test/parse_test.dart:128:20 • deprecated_member_use
  hint • 'author' is deprecated and shouldn't be used at test/parse_test.dart:138:20 • deprecated_member_use
  hint • 'author' is deprecated and shouldn't be used at test/parse_test.dart:148:20 • deprecated_member_use
  hint • 'author' is deprecated and shouldn't be used at test/parse_test.dart:159:20 • deprecated_member_use
  hint • 'author' is deprecated and shouldn't be used at test/parse_test.dart:170:20 • deprecated_member_use
7 hints found.

CC @srawlins

@srawlins
Copy link
Member

Apologies, @kevmoo . I've found the issue and have a fix in the works; I can mail tomorrow.

@kevmoo
Copy link
Member Author

kevmoo commented May 10, 2019 via email

dart-bot pushed a commit to dart-lang/sdk that referenced this issue May 10, 2019
Fixes dart-lang/linter#1393

Change-Id: I064faad8da50bc1a6c8a80a0412f792914915f8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102200
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
kevmoo added a commit to dart-lang/pubspec_parse that referenced this issue May 10, 2019
Fix is in dart-lang/sdk@dac5a56422
Need it to get into a shipped SDK
kevmoo added a commit to dart-lang/pubspec_parse that referenced this issue May 20, 2019
Fix is in dart-lang/sdk@dac5a56422
Need it to get into a shipped SDK
kevmoo added a commit to dart-lang/pubspec_parse that referenced this issue May 21, 2019
Fix is in dart-lang/sdk@dac5a56422
Need it to get into a shipped SDK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants