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

Update status periodically in smart terminals #2516

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Nov 11, 2024

  1. Add Subprocess::DoWork(int64_t timeout_ms) method.

    Allow the DoWork() method to return after a given timeout
    has expired. The new method returns a WorkResult value which
    is an enum that can take three values to indicate process
    completion, user interruption or that the timeout has
    expired.
    digit-google committed Nov 11, 2024
    Configuration menu
    Copy the full SHA
    f797e92 View commit details
    Browse the repository at this point in the history
  2. Add Status::Refresh(int64_t cur_time_millis) method.

    Add a method to the abstract Status interface to refresh
    the status after some time has passed. Implement it properly
    in StatusPrinter.
    
    + Fix a bug in FormatProgressMessage() which ignored the
      value pass as argument (time_millis), and was using
      a member value instead (time_millis_). In practice, they
      were the same, but this is no longer true after this
      change.
    digit-google committed Nov 11, 2024
    Configuration menu
    Copy the full SHA
    ab4cd1d View commit details
    Browse the repository at this point in the history
  3. RealCommandRunner: allow periodic status updates during builds.

    Use the new Subprocess::DoWork(int64_t) method to wait for at
    most one second before updating the status in the Ninja terminal.
    
    NOTE: A new output_test.py is added to check this feature, but
          since it is time-dependent, it tends to fail on Github CI
          so is disabled by default. It is possible to run it manually
          though on a lightly-loaded machine.
    digit-google committed Nov 11, 2024
    Configuration menu
    Copy the full SHA
    c36bdc2 View commit details
    Browse the repository at this point in the history