jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
8.07k stars 211 forks source link

Tasks hang when using globs in `outputs` and/or `sources` #2285

Closed adamdickinson closed 2 weeks ago

adamdickinson commented 2 weeks ago

Describe the bug Tasks that use a glob pattern in outputs and/or sources simply hang; CPU goes to 100% and the task does not complete.

To Reproduce

  1. Create an executable task with an outputs or sources containing a glob pattern. Example: .mise/tasks/test
    #!/usr/bin/env bash
    # mise outputs=["{anything}"]
  2. Run the task, e.g. mise run test.

Observe that it freezes and does not complete.

Expected behavior It should not freeze.

mise doctor output

version: 2024.6.3 macos-arm64 (2024-06-10)
activated: yes
shims_on_path: no

build_info: 
  Target: aarch64-apple-darwin
  Features: DEFAULT, NATIVE_TLS
  Built: Mon, 10 Jun 2024 16:11:51 +0000
  Rust Version: rustc 1.78.0 (9b00956e5 2024-04-29) (Homebrew)
  Profile: release

shell: 
  /bin/zsh
  zsh 5.9 (x86_64-apple-darwin23.0)

dirs: 
  data: ~/.local/share/mise
  config: ~/.config/mise
  cache: ~/Library/Caches/mise
  state: ~/.local/state/mise
  shims: ~/.local/share/mise/shims

config_files: 
  REDACTED

backends: 
  cargo
  core
  go
  npm
  pipx
  spm
  ubi

plugins: 
  REDACTED

toolset: 
  REDACTED

env_vars: 
  (none)

settings: 
  activate_aggressive = false
  all_compile = false
  always_keep_download = false
  always_keep_install = false
  asdf_compat = false
  cargo_binstall = true
  color = true
  disable_default_shorthands = false
  disable_tools = []
  experimental = true
  go_default_packages_file = "~/.default-go-packages"
  go_download_mirror = "https://dl.google.com/go"
  go_repo = "https://github.com/golang/go"
  go_set_gopath = false
  go_set_goroot = true
  go_skip_checksum = false
  http_timeout = 30
  jobs = 4
  legacy_version_file = true
  legacy_version_file_disable_tools = []
  node_compile = false
  not_found_auto_install = true
  paranoid = false
  plugin_autoupdate_last_check_duration = "7d"
  python_compile = true
  python_default_packages_file = "/Users/REDACTED/.default-python-packages"
  python_pyenv_repo = "https://github.com/pyenv/pyenv.git"
  raw = false
  trusted_config_paths = []
  quiet = false
  verbose = false
  yes = false
  ci = false
  debug = false
  trace = false
  log_level = "info"
  python_venv_auto_create = false

  [status]
  missing_tools = "if_other_versions_installed"
  show_env = false
  show_tools = false

No warnings found
No problems found

Additional context I have narrowed the issue down to the globwalk crate. By replacing it with glob, I have been able to get it working just fine. I'll submit a PR shortly with that fix in place.