Giter Club home page Giter Club logo

Comments (8)

chelcassanova avatar chelcassanova commented on August 23, 2024 1

Fixed in #8623

from llvm-project.

z2oh avatar z2oh commented on August 23, 2024 1

cc @chelcassanova, I'll look into resolving this soon and would love to hear your thoughts before digging in!

from llvm-project.

chelcassanova avatar chelcassanova commented on August 23, 2024

Hey Jeremy, thanks for tagging me in this and also for the patch! The "Setting up Swift reflection" report is indeed missing a total and your patch is correct, if you're able to put that patch up for review and add me as a reviewer that would be great 👍🏾 .

For the "Importing Swift modules" report, we actually have that as an indeterminate report so it doesn't have a total. The multiple reports you're seeing for "Importing Swift modules" is a bug that I'm looking into, thanks again for bringing this up!

from llvm-project.

z2oh avatar z2oh commented on August 23, 2024

I appreciate you looking into this @chelcassanova! PR with the aforementioned patch is up here #8584

(I don't think I have the right repo privileges to manually specify reviewers)

from llvm-project.

z2oh avatar z2oh commented on August 23, 2024

I finally got around to updating my Swift toolchain to a version which includes #8623, but I'm still seeing these persistent notifications when debugging a Swift project in VS Code:
image

If I understand the Progress semantics correctly, completion is only signaled upon one of:

  1. if a total was set in the constructor, when Increment reaches that total
  2. Progress object destructor is run

If we don't know the number of modules up front, is there a way to clean up the Progress object once we've completed?

from llvm-project.

chelcassanova avatar chelcassanova commented on August 23, 2024

Hey Jeremy, so sorry for my late response and thanks for looking into this! The Progress destructor should get run once the object is out of scope due to RAII, and since we create the progress report for Swift imports through a callback we also clear that callback on scope exit.

One of the original reasons that those spurious reports were coming in was because we cleared the callback by creating a new Progress object which will print the message it was initialized with, so the patch I merged just cleared it to an empty function. Just curious, are all of those reports just showing up with a title and no details?

from llvm-project.

z2oh avatar z2oh commented on August 23, 2024

Just curious, are all of those reports just showing up with a title and no details?

Yes, as far as I can tell. Here's a screenshot from just now:

image

swift --version reports compnerd.org Swift version 6.0-dev (LLVM 57177aa1b91540b, Swift 6debc331289f02d), and this includes #8623 (https://github.com/apple/llvm-project/commits/57177aa1b91540b).

I let this spin for quite a bit (10+ minutes) and never saw them go away, so I assume that the std::unique_ptr<Progress> is being kept alive somehow, though I haven't confirmed this.

More than happy to provide as much detail as I can on this!

from llvm-project.

chelcassanova avatar chelcassanova commented on August 23, 2024

The unique_ptr staying alive is also one of the main culprits I can think of, the other being that the reports are getting created but no details are being displayed which would indicate that the message that's supposed to get displayed with progress->Increment isn't being displayed at all, or that these reports are created but progress->Increment itself isn't being called so no details are added to the report. 🤔

from llvm-project.

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.