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

CLI helper improvements #776

Merged
merged 17 commits into from
Jan 23, 2023
Merged

CLI helper improvements #776

merged 17 commits into from
Jan 23, 2023

Commits on Jan 16, 2023

  1. Configuration menu
    Copy the full SHA
    9c1879b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c404828 View commit details
    Browse the repository at this point in the history
  3. Increase buffer size 10x

    olsen232 committed Jan 16, 2023
    Configuration menu
    Copy the full SHA
    41c6725 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cd4974c View commit details
    Browse the repository at this point in the history
  5. cmake: better support cli-helper

    * set C standard to C11
    * create kart/kart_cli symlinks in dev, not just bundle
    * enable debug via `-DCMAKE_BUILD_TYPE=Debug`
    rcoup committed Jan 16, 2023
    Configuration menu
    Copy the full SHA
    073cd99 View commit details
    Browse the repository at this point in the history
  6. helper: add debug() logging

    Enable via -DCMAKE_BUILD_TYPE=Debug at build-time and setting
    KART_HELPER_DEBUG=1 in the environment.
    rcoup committed Jan 16, 2023
    Configuration menu
    Copy the full SHA
    cefa071 View commit details
    Browse the repository at this point in the history
  7. helper: reorganise kart app finding.

    Search for the kart executable via OS-specific methods if possible,
    falling back to argv[0]. Then look for sibling kart_cli. Then try again
    after re-resolving symlinks.
    rcoup committed Jan 16, 2023
    Configuration menu
    Copy the full SHA
    1e941f8 View commit details
    Browse the repository at this point in the history
  8. helper: always enable unless KART_USE_HELPER=0

    If Kart is built with -DCLI_HELPER=ON then make it on by default.
    rcoup committed Jan 16, 2023
    Configuration menu
    Copy the full SHA
    934b87c View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    2000d7c View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2023

  1. e2e tests: improve helper mode

    * enable test-run helper logging and dump log file after e2e tests
    * turn off/on explicitly to deal with helper mode being default enabled
    rcoup committed Jan 22, 2023
    Configuration menu
    Copy the full SHA
    5e8ec12 View commit details
    Browse the repository at this point in the history
  2. cli_helper: per-os tidyups; improved logging

    * handle semget() flags correctly per-OS
    * add pid to log messages
    * make semnum a constant
    * build with -Wall & -Werror
    rcoup committed Jan 22, 2023
    Configuration menu
    Copy the full SHA
    f631526 View commit details
    Browse the repository at this point in the history
  3. helper: improve logging; per-OS semaphore fixes

    * write to helper log from helper & children, resolve to absolute path so that cwd changes don't break
    * more detailed logging around forks/pids, and exit/semaphore messaging
    * `union semun` is defined differently on Linux & macOS... even though they're effectively the same, reflect accurately
    
    On macOS/arm64, it's critical to define the final argument to semctl()
    as variadic via ctypes (ie: don't define it), because the calling
    convention differs between fixed and variadic arguments.
    python/cpython#92892
    rcoup committed Jan 22, 2023
    Configuration menu
    Copy the full SHA
    369c6eb View commit details
    Browse the repository at this point in the history
  4. helper: reset sigchld handler in execution process

    we set it to ignore in the helper itself, but if the execution
    kart process invokes a subprocess (eg: git) and interacts via
    asyncio, then the subprocess exit code is lost on Linux.
    
    Reset it to the default after the fork happens.
    rcoup committed Jan 22, 2023
    Configuration menu
    Copy the full SHA
    8bbe034 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e8e8316 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9e97ff5 View commit details
    Browse the repository at this point in the history
  7. helper: disable by default, but enable in CI

    Means local development builds don't have gotchas wrt code-reloading,
    but CI & release builds include it. Add a note to the contributing docs.
    rcoup committed Jan 22, 2023
    Configuration menu
    Copy the full SHA
    11996e6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    57d106c View commit details
    Browse the repository at this point in the history