Open rauhul opened 1 month ago
I wonder if it would make sense for items that end up rounded as "0s" to drop down to milliseconds instead? Otherwise 0s doesn't seem believable on its own, and a lot of "0s" can accumulate to a substantial number, which also would be confusing.
I wonder if it would make sense for items that end up rounded as "0s" to drop down to milliseconds instead? Otherwise 0s doesn't seem believable on its own, and a lot of "0s" can accumulate to a substantial number, which also would be confusing.
Probably! I'd love feedback and suggestions :D
I wouldn't mind some of this now like the number of sources and compile durations. Is it easy to separate into a smaller PR?
Also can we show whether something is compiling as a tool (host) or destination (target)?
(update: never mind, we build the plug-in tools before we do the production build, sigh).
Side note: should the "Write sources" tasks display name be more informational?
Side note: should the "Write sources" tasks display name be more informational?
I'd consider that a "full note"!
Also can we show whether something is compiling as a tool (host) or destination (target)?
(update: never mind, we build the plug-in tools before we do the production build, sigh).
It still useful because we build swift-syntax for the host (for macros) as part of the real build.
@dschaefer2 @MaxDesiatov ms
in the time and a more descriptive task name for some write-aux-file
tasks.
oops I meant to ping @neonichu not Doug 😓
This looks nice. Would it be possible to add some automated tests to validate the expected behaviour? This way, we will ensure the feature does not regress.
This looks nice. Would it be possible to add some automated tests to validate the expected behaviour? This way, we will ensure the feature does not regress.
Rauhul and I chatted about this today. We acknowledged the need but also the difficulty writing tests for it. Maybe we can get some help with that. Do we have tests for the current progress messages?
@rauhul nice! Progress bar for building and progress bar for Swift Testing could/should most likely share implementation - a generic implementation of the CLI based GUI for displaying and updating some progress bars - with the difference being the event stream of updates.
Swift Testing does not have SPM as dependency in Package.swift though, hmm, perhaps a new Swift package for displaying progress in CLI could be created and added as a dependency to both Swift Testing and SPM?
This is very cool! I am a big fan of making progress related output more informative and fun, since I think we all spend a good amount of our time looking at it.
That said, I think there are some use cases and nuances to keep in mind. @stmontgomery and @grynspan raised some interesting comments on @Sajjon's swift-testing progress bar patch that I think apply here as well: https://github.com/swiftlang/swift-testing/pull/19#issuecomment-1735768717 https://github.com/swiftlang/swift-testing/pull/19#issuecomment-1733909628
The relevant bullet points from their comments:
With @plemarquand's notes in mind, I'd love to get this all packaged up somewhere that Swift Testing could link to it and use it too. :)
There are other use cases I know that could use good terminal progress animation in a Swift package such as swift-testing. I'd like to see turning this into that as a long term goal.
Also this is an optional view of progress. I think we still need the old one around for tools that depend on it. vscode-swift currently is one of those tools. But talking with @award999, we'd probably be better off with that interface being a streaming machine interface rather than trying to parse human consumable output. We need to be free to make changes to improve human consumption, like we are here.
I'd definitely also would be interested in consider using it for the Benchmark package if it's broken out to a separate dependency in the future.
this is very much a work in progress. It works enough to be helpful locally for myself.
https://github.com/user-attachments/assets/710d1fcb-4b33-405b-89ff-aff2a992b7cb
TODO:
Larger example output, the new progress bar makes it really easy to see duplicate work: