Skip to content

Build notification is late #1322

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

Closed
MahdiBM opened this issue Jan 21, 2025 · 2 comments
Closed

Build notification is late #1322

MahdiBM opened this issue Jan 21, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@MahdiBM
Copy link
Contributor

MahdiBM commented Jan 21, 2025

Describe the bug
It appears the notification for building stuff does not appear before the build logs contain "Building for debugging/release..." which is when the [num/num] progress indicator starts to show up. That can take a bit to show up so makes the notification a bit inaccurate.

To Reproduce

  • Open vapor/penny-bot.
  • Set Swift: Show Build Status to notification.
  • Build.

Expected behavior
show something like "starting build" instead of not showing the notification at all.

Environment

  • OS: [e.g. Ubuntu 20.04] macOS 15.2
  • Swift version (output of swift --version): 6.0.3 release
  • Visual Studio Code version: -
  • vscode-swift version: 1.11.4

Additional context

@MahdiBM
Copy link
Contributor Author

MahdiBM commented Jan 21, 2025

Reading the extension code, I think it's important to mention what was being logged when the build notification was late:

Executing task: swift: Building and Running Tests 

> /Applications/Xcode 16.2 beta 3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift test --enable-swift-testing --event-stream-version 0 --event-stream-output-path /var/folders/rr/9nl0rwsx2dlcwd49g83wp_jr0000gn/T/vscodemkfifo-1737444536945 --disable-xctest --filter PennyTests\.GHHooksTests\/handlePREvent14\(\)\/ -Xswiftc -diagnostic-style=llvm --force-resolved-versions --disable-xctest

warning: 'swift-evolution-metadata-extractor': 'swift-evolution-metadata-extractor' dependency on 'https://github.com/swiftlang/swift-markdown' conflicts with dependency on 'https://github.com/apple/swift-markdown.git' which has the same identity 'swift-markdown'. this will be escalated to an error in future versions of SwiftPM.
warning: 'leaf-kit': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
    /Users/mahdibm/Github/penny-bot/.build/checkouts/leaf-kit/Sources/LeafKit/Docs.docc
warning: 'swift-algorithms': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
    /Users/mahdibm/Github/penny-bot/.build/checkouts/swift-algorithms/Sources/Algorithms/Documentation.docc
Building for debugging...
[68/68] Linking PennyPackageTests
Build complete! (61.36s)
◇ Test run started.
↳ Testing Library Version: 102 (arm64e-apple-macos13.0)
◇ Suite GHHooksTests started.
◇ Test "PR with [DNM] prefix where author_association is CONTRIBUTOR should not be posted to Discord" started.
✔ Test "PR with [DNM] prefix where author_association is CONTRIBUTOR should not be posted to Discord" passed after 1.081 seconds.
✔ Suite GHHooksTests passed after 1.083 seconds.
✔ Test run with 1 test passed after 1.087 seconds.

plemarquand added a commit to plemarquand/vscode-swift that referenced this issue Jan 21, 2025
The build progress notification would only appear once the progress
values were shown in the output, i.e. [12/122]. Until progress values
appear, show a "Preparing <task>" notification. This only needs to apply
when the `showBuildStatus` value is `notification` or `progress`, since
`swiftStatus` already shows a message in the bar immediately.

This patch also only sets the `showBuildStatus` setting on a Task if it
is coming from a user defined task. Previously it was being set on
synthetic tasks which were being cached, so when the user updated the
`showBuildStatus` setting it wouldn't take effect until they restarted
the extension.

Issue: swiftlang#1322
@award999 award999 moved this from Unscreened to In Progress in Swift Extension for Visual Studio Code Jan 21, 2025
plemarquand added a commit that referenced this issue Jan 21, 2025
* Notify build is preparing before progress starts

The build progress notification would only appear once the progress
values were shown in the output, i.e. [12/122]. Until progress values
appear, show a "Preparing <task>" notification. This only needs to apply
when the `showBuildStatus` value is `notification` or `progress`, since
`swiftStatus` already shows a message in the bar immediately.

This patch also only sets the `showBuildStatus` setting on a Task if it
is coming from a user defined task. Previously it was being set on
synthetic tasks which were being cached, so when the user updated the
`showBuildStatus` setting it wouldn't take effect until they restarted
the extension.

Issue: #1322
@plemarquand plemarquand added the needs verification Issue has been fixed, but requires verification before closing label Jan 21, 2025
@award999 award999 moved this from In Progress to Needs Verification in Swift Extension for Visual Studio Code Jan 21, 2025
@award999 award999 assigned award999 and unassigned plemarquand Jan 21, 2025
@award999
Copy link
Contributor

Verified with fa4d12c

@award999 award999 removed the needs verification Issue has been fixed, but requires verification before closing label Jan 23, 2025
@award999 award999 removed their assignment Jan 23, 2025
@award999 award999 moved this from Needs Verification to Done in Swift Extension for Visual Studio Code Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

3 participants