dotnet/runtime · error · RuntimeError

No JIT changes found starting with baseline hash

Error message

No JIT changes found starting with baseline hash

What it means

Raised by get_baseline_jit when `git log` for JIT changes succeeds but returns zero commits. With no JIT-EE GUID change in the last 20 commits back from the baseline, there is no candidate hash to download a baseline JIT for.

Source

Thrown at src/coreclr/scripts/superpmi.py:4913

            logging.info("Baseline hash: %s", baseline_hash)
        else:
            baseline_hash = coreclr_args.base_git_hash

        if coreclr_args.base_git_hash is None:
            # Enumerate the last 20 changes, starting with the baseline, that included JIT and JIT-EE GUID changes.
            command = [ "git", "log", "--pretty=format:%H", baseline_hash, "-20", "--", "src/coreclr/jit/*", "src/coreclr/inc/jiteeversionguid.h" ]
            logging.debug("Invoking: %s", " ".join(command))
            proc = subprocess.Popen(command, stdout=subprocess.PIPE)
            stdout_change_list, _ = proc.communicate()
            return_code = proc.returncode
            change_list_hashes = []
            if return_code == 0:
                change_list_hashes = stdout_change_list.decode('utf-8').strip().splitlines()
            else:
                raise RuntimeError("Couldn't determine list of JIT changes starting with baseline hash")

            if len(change_list_hashes) == 0:
                raise RuntimeError("No JIT changes found starting with baseline hash")
        else:
            # If `-base_git_hash` is specified, then we use exactly that hash and no other for the baseline.
            change_list_hashes = [ coreclr_args.base_git_hash ]

        # For each hash, (1) see if we have the JIT already, and if not (2) try to download the corresponding JIT from the rolling build.

        hashnum = 1
        for git_hash in change_list_hashes:
            logging.debug("%s: %s", hashnum, git_hash)

            jit_name = get_jit_name(coreclr_args)
            basejit_dir = os.path.join(default_basejit_root_dir, "{}.{}.{}.{}".format(git_hash, coreclr_args.host_os, coreclr_args.arch, coreclr_args.build_type))
            basejit_path = os.path.join(basejit_dir, jit_name)
            if os.path.isfile(basejit_path):
                # We found this baseline JIT in our cache; use it!
                coreclr_args.base_jit_path = basejit_path
                logging.info("Using baseline %s", coreclr_args.base_jit_path)
                return

View on GitHub (pinned to 290d5ab72c)

Solutions

  1. If you expect a change, verify `git log --oneline -20 -- src/coreclr/jit/` actually lists commits.
  2. Supply `--base_git_hash <commit>` to force a specific baseline.
  3. Make at least one JIT-EE GUID-affecting commit, or confirm you intentionally have nothing to diff (no-op case).
  4. Ensure the working branch is ahead of the merge-base with real JIT edits.

Example fix

// before
# branch has no JIT changes since main -> raises [184]
// after
python superpmi.py --base_git_hash <older-commit-with-jit-changes> ...
Defensive patterns

Strategy: validation

Validate before calling

import subprocess
out = subprocess.run(['git','log','--pretty=format:%H',baseline_hash,'-20','--','src/coreclr/jit/*','src/coreclr/inc/jiteeversionguid.h'], cwd=runtime_repo_location, capture_output=True, text=True)
if out.returncode == 0 and not out.stdout.strip():
    raise SystemExit('no JIT changes since baseline; nothing to diff — pass --base_git_hash for an older baseline')

Type guard

def has_jit_changes_since(baseline: str, cwd: str) -> bool:
    import subprocess
    out = subprocess.run(['git','log','--pretty=format:%H',baseline,'-20','--','src/coreclr/jit/*'], cwd=cwd, capture_output=True, text=True)
    return out.returncode == 0 and bool(out.stdout.strip())

Try / catch

try:
    main(...)
except RuntimeError as e:
    if 'No JIT changes found' in str(e):
        # pick an older known-JIT baseline explicitly
        main_with(base_git_hash=older_jit_commit)

Prevention

When it happens

Trigger: The current branch is at or near the merge-base with origin/main and the last 20 commits in src/coreclr/jit/* or jiteeversionguid.h all predate the baseline window, or the pathspec matches nothing.

Common situations: Running diffs on a branch with no JIT changes since the last main sync; freshly merged main so baseline==HEAD; running in a worktree where the JIT pathspec was renamed.

Related errors


AI-assisted analysis of dotnet/runtime@290d5ab72c (2026-08-06). Data as JSON: /api/errors/5b5775e06ff518bb. Report an issue: GitHub.