dotnet/runtime · warning · RuntimeError

No JIT changes found starting with baseline hash

Error message

No JIT changes found starting with baseline hash

What it means

Raised by process_git_hash_arg() in jitrollingbuild.py when the git log command succeeds but returns zero commit hashes — meaning no commits in the last 20 changes from the baseline touched src/coreclr/jit/* or src/coreclr/inc/jiteeversionguid.h. The JIT rolling build only contains builds for commits that change JIT code, so without any JIT changes, no baseline JIT can be found.

Solutions

  1. Pass -git_hash explicitly to download a specific known JIT build.
  2. Verify your branch actually has JIT changes by running 'git log --oneline baseline..HEAD -- src/coreclr/jit/' manually.
  3. Increase the commit range in the git log command (change -20 to a larger number) if JIT changes are further back.
  4. If no JIT changes exist on your branch, you don't need a rolling-build baseline — use a known good hash directly.
  5. Check that the JIT-EE version GUID hasn't changed (which would itself be a 'JIT change').

Example fix

# Not a code fix but a usage fix:

# before (auto-detection finds no JIT changes):
python jitrollingbuild.py download

# after (specify hash explicitly):
python jitrollingbuild.py download -git_hash <known_jit_commit_hash>
Defensive patterns

Strategy: validation

Validate before calling

import subprocess

def count_jit_changes(repo_path: str, baseline_hash: str, count: int = 20) -> int:
    """Count JIT changes from baseline. Returns 0 if none found."""
    result = subprocess.run(
        ['git', 'log', '--pretty=format:%H', baseline_hash, f'-{count}',
         '--', 'src/coreclr/jit/*', 'src/coreclr/inc/jiteeversionguid.h'],
        cwd=repo_path, capture_output=True)
    if result.returncode != 0:
        return -1
    lines = [l for l in result.stdout.decode().strip().splitlines() if l]
    return len(lines)

# Usage:
n = count_jit_changes(repo, baseline)
if n == 0:
    print("No JIT changes found. Pass -git_hash to specify a build directly.")

Type guard

null

Try / catch

try:
    process_git_hash_arg(coreclr_args)
except RuntimeError as e:
    if "No JIT changes" in str(e):
        logging.warning(f"{e}. Your branch may not have JIT changes.")
        logging.warning("Specify -git_hash <hash> to download a specific JIT build.")
    raise

Prevention

When it happens

Trigger: Triggered when change_list_hashes is empty after running 'git log --pretty=format:%H <baseline> -20 -- src/coreclr/jit/* src/coreclr/inc/jiteeversionguid.h'. The command returned 0 (success) but produced no output lines. This means the current branch diverged from main without any JIT changes in the last 20 commits.

Common situations: The current branch contains only non-JIT changes (e.g., library, BCL, or tooling changes). The branch has been rebased or merged in a way that JIT changes are squashed or more than 20 commits back. The developer is working on a feature that doesn't touch the JIT at all. The baseline merge-base is very recent and main hasn't had JIT changes since.

Related errors


AI-assisted analysis of dotnet/runtime@60108ba66e (2026-08-10). Data as JSON: /api/errors/9d48af65e0249065. Report an issue: GitHub.

Appendix: source

Thrown at src/coreclr/scripts/jitrollingbuild.py:224

            raise RuntimeError("Couldn't determine baseline git hash")

        baseline_hash = stdout_git_merge_base.decode('utf-8').strip()
        logging.info("Baseline hash: %s", baseline_hash)

        # 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: {}".format(" ".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")

        # For each hash, see if the rolling build contains the JIT.

        hashnum = 1
        for git_hash in change_list_hashes:
            logging.info("try {}: {}".format(hashnum, git_hash))

            # Set the git hash to look for
            # Note: there's a slight inefficiency here because this code searches for a JIT at this hash value, and
            # then when we go to download, we do the same search again because we don't cache the result and pass it
            # directly on to the downloader.
            coreclr_args.git_hash = git_hash

            if return_first_hash:
                # Just use the first one
                break

            urls = get_jit_urls(coreclr_args)

View on GitHub (pinned to 60108ba66e)