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

.DS_Store shows up in import suggestions on Mac #47562

Closed
navaronbracke opened this issue Oct 28, 2021 · 7 comments
Closed

.DS_Store shows up in import suggestions on Mac #47562

navaronbracke opened this issue Oct 28, 2021 · 7 comments
Assignees
Labels
analyzer-completion Issues with the analysis server's code completion feature analyzer-server area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@navaronbracke
Copy link

navaronbracke commented Oct 28, 2021

I have a Flutter project on my machine. Let's say is it called myproject.

When typing an import manually the suggestions include package:myproject/.DS_Store.

.DS_Store is metadata related stuff and should probably not show up in those suggestions?
It is included in the gitignore of the project.

Dart SDK version: 2.14.2 (stable) (Wed Sep 15 12:32:06 2021 +0200) on "macos_x64"
Visual Studio Code version: 1.61.2
Dart Plugin version: v3.27.2
Flutter plugin version: v3.27.0
@devoncarew devoncarew added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-completion Issues with the analysis server's code completion feature labels Oct 28, 2021
@scheglov scheglov added analyzer-server P3 A lower priority bug or feature request labels Oct 28, 2021
@srawlins srawlins added P1 A high priority bug; for example, a single project is unusable or has many test failures and removed P3 A lower priority bug or feature request labels Apr 19, 2023
@srawlins
Copy link
Member

I cannot reproduce this, but I'm unaware of any work done in the analyzer recently that would address this...

@srawlins
Copy link
Member

@scheglov @bwilkerson are you aware of anything that would have fixed this in the last 18 months (It's a big question, haha, just checking).

@navaronbracke does this still occur in a recent version of Dart? Like 2.19?

@srawlins srawlins added the needs-info We need additional information from the issue author (auto-closed after 14 days if no response) label Apr 19, 2023
@navaronbracke
Copy link
Author

I just checked with Dart 2.19.6 and I cannot reproduce it anymore either.

@github-actions github-actions bot removed the needs-info We need additional information from the issue author (auto-closed after 14 days if no response) label Apr 19, 2023
@scheglov
Copy link
Contributor

Well, I don't know why it does not work for you, because I can reproduce it in a unit test.

  Future<void> test_uri_end() async {
    newFile('$testPackageLibPath/.DS_Store', '');

    await _checkDirectives(
      uriContent: '^',
      validator: () {
        assertResponse(r'''
suggestions
  dart:
    kind: import
  dart:async
    kind: import
  dart:async2
    kind: import
  dart:collection
    kind: import
  dart:convert
    kind: import
  dart:core
    kind: import
  dart:ffi
    kind: import
  dart:html
    kind: import
  dart:io
    kind: import
  dart:isolate
    kind: import
  dart:math
    kind: import
  package:
    kind: import
  package:bar/
    kind: import
  package:bar/bar01.dart
    kind: import
  package:foo/
    kind: import
  package:foo/foo01.dart
    kind: import
  package:foo/foo02.dart
    kind: import
  package:foo/foo11.dart
    kind: import
  package:test/
    kind: import
  package:test/.DS_Store
    kind: import
  package:test/test.dart
    kind: import
''');
      },
    );
  }

@srawlins
Copy link
Member

Oh so it's very possible that VS Code does some filtering.

I imagine we should still filter out... any files that don't end in .dart? Any downsides to that?

@scheglov
Copy link
Contributor

Nope, even though it is theoretically possible to import any file, it does not have to be named .dart, it is not reasonable thing to do. So, I think we should apply such filter.

@scheglov scheglov self-assigned this Apr 20, 2023
@scheglov
Copy link
Contributor

copybara-service bot pushed a commit that referenced this issue Apr 20, 2023
Bug: #47562
Change-Id: I4f575bca1377b8f5065d4c4ff95f326b6a2a168b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296442
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-completion Issues with the analysis server's code completion feature analyzer-server area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

4 participants