Code Monkey home page Code Monkey logo

Comments (7)

DanTup avatar DanTup commented on June 18, 2024

@Coin-ai I haven't been able to reproduce this following your steps. Is it possible you could try to capture a log while reproducing the issue?

  • Press F1 to open the command palette
  • Run the Preferences: Open Workspace Settings (JSON) command
  • Add "dart.analyzerInstrumentationLogFile": "logs/analyzer.txt", to the JSON and press save
  • Wait for the analyzer to restart
  • Reproduce the issue
  • Take a copy of the logs/analyzer.txt file and attach it here

Thanks!

from dart-code.

Coin-ai avatar Coin-ai commented on June 18, 2024

analyzer.txt
stay in console: main copy 4.dart, main copy 2.dart ...

from dart-code.

DanTup avatar DanTup commented on June 18, 2024

@Coin-ai when you captured this log, which error remained in the Problems list for main copy 4? Was it a compile error, or "The file name 'main copy 4.dart' isn't a lower_case_with_underscores identifier"?

In the log, I can only see that error, but no other - I'm trying to understand if that's the issue of there's something else going on?

It would be very useful if you could capture a video/GIF at the same time as the log file, so I can match the log file to what's seen on screen.

from dart-code.

DanTup avatar DanTup commented on June 18, 2024

Also - do you know if DCM is required to reproduce the issue, or can you reproduce without it? (if it reproduces without DCM, that will make a much simpler log file).

from dart-code.

DanTup avatar DanTup commented on June 18, 2024

Looking at the code, my theory is that when a file is removed, we directly flush the diagnostics on the server, but we don't go through recordAnalysisErrors, which means we don't call notificationManager.recordAnalysisErrors which means we don't clear the servers diagnostics from the ResultCollector. Thjis means if the plugin subsequently sends us errors, we may merge them with the last set of errors from the server and then send them to the client.

If this is the case, the server should be recording an empty set of errors for the server instead of only flushing the errors on the client when a file is removed.

I'll try to repro in a test.

from dart-code.

DanTup avatar DanTup commented on June 18, 2024

I could reproduce this as described above. Working on a fix at https://dart-review.googlesource.com/c/sdk/+/367321.

from dart-code.

DanTup avatar DanTup commented on June 18, 2024

This is fixed by dart-lang/sdk@f3be14c. The change is in the Dart SDK so will ship in a future Dart/Flutter SDK release (not a Dart-Code extension release).

Thanks for the report and the log!

from dart-code.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.