{"record":{"id":"9d48af65e0249065","repo":"dotnet/runtime","slug":"no-jit-changes-found-starting-with-baseline-hash","errorCode":null,"errorMessage":"No JIT changes found starting with baseline hash","messagePattern":"No JIT changes found starting with baseline hash","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"warning","filePath":"src/coreclr/scripts/jitrollingbuild.py","lineNumber":224,"sourceCode":"            raise RuntimeError(\"Couldn't determine baseline git hash\")\n\n        baseline_hash = stdout_git_merge_base.decode('utf-8').strip()\n        logging.info(\"Baseline hash: %s\", baseline_hash)\n\n        # Enumerate the last 20 changes, starting with the baseline, that included JIT and JIT-EE GUID changes.\n        command = [ \"git\", \"log\", \"--pretty=format:%H\", baseline_hash, \"-20\", \"--\", \"src/coreclr/jit/*\", \"src/coreclr/inc/jiteeversionguid.h\" ]\n        logging.debug(\"Invoking: {}\".format(\" \".join(command)))\n        proc = subprocess.Popen(command, stdout=subprocess.PIPE)\n        stdout_change_list, _ = proc.communicate()\n        return_code = proc.returncode\n        change_list_hashes = []\n        if return_code == 0:\n            change_list_hashes = stdout_change_list.decode('utf-8').strip().splitlines()\n        else:\n            raise RuntimeError(\"Couldn't determine list of JIT changes starting with baseline hash\")\n\n        if len(change_list_hashes) == 0:\n            raise RuntimeError(\"No JIT changes found starting with baseline hash\")\n\n        # For each hash, see if the rolling build contains the JIT.\n\n        hashnum = 1\n        for git_hash in change_list_hashes:\n            logging.info(\"try {}: {}\".format(hashnum, git_hash))\n\n            # Set the git hash to look for\n            # Note: there's a slight inefficiency here because this code searches for a JIT at this hash value, and\n            # then when we go to download, we do the same search again because we don't cache the result and pass it\n            # directly on to the downloader.\n            coreclr_args.git_hash = git_hash\n\n            if return_first_hash:\n                # Just use the first one\n                break\n\n            urls = get_jit_urls(coreclr_args)","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/dotnet/runtime/blob/60108ba66eb7d1d12f595480091b4ad80a24b172/src/coreclr/scripts/jitrollingbuild.py#L206-L242","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Pass -git_hash explicitly to download a specific known JIT build.","Verify your branch actually has JIT changes by running 'git log --oneline baseline..HEAD -- src/coreclr/jit/' manually.","Increase the commit range in the git log command (change -20 to a larger number) if JIT changes are further back.","If no JIT changes exist on your branch, you don't need a rolling-build baseline — use a known good hash directly.","Check that the JIT-EE version GUID hasn't changed (which would itself be a 'JIT change')."],"exampleFix":"# Not a code fix but a usage fix:\n\n# before (auto-detection finds no JIT changes):\npython jitrollingbuild.py download\n\n# after (specify hash explicitly):\npython jitrollingbuild.py download -git_hash <known_jit_commit_hash>","handlingStrategy":"validation","validationCode":"import subprocess\n\ndef count_jit_changes(repo_path: str, baseline_hash: str, count: int = 20) -> int:\n    \"\"\"Count JIT changes from baseline. Returns 0 if none found.\"\"\"\n    result = subprocess.run(\n        ['git', 'log', '--pretty=format:%H', baseline_hash, f'-{count}',\n         '--', 'src/coreclr/jit/*', 'src/coreclr/inc/jiteeversionguid.h'],\n        cwd=repo_path, capture_output=True)\n    if result.returncode != 0:\n        return -1\n    lines = [l for l in result.stdout.decode().strip().splitlines() if l]\n    return len(lines)\n\n# Usage:\nn = count_jit_changes(repo, baseline)\nif n == 0:\n    print(\"No JIT changes found. Pass -git_hash to specify a build directly.\")","typeGuard":"null","tryCatchPattern":"try:\n    process_git_hash_arg(coreclr_args)\nexcept RuntimeError as e:\n    if \"No JIT changes\" in str(e):\n        logging.warning(f\"{e}. Your branch may not have JIT changes.\")\n        logging.warning(\"Specify -git_hash <hash> to download a specific JIT build.\")\n    raise","preventionTips":["Verify your branch actually contains JIT changes before running download.","Pass -git_hash explicitly when you know which JIT build you need.","If your work doesn't touch the JIT, you don't need a rolling-build baseline.","Check 'git log --oneline HEAD~20..HEAD -- src/coreclr/jit/' to see JIT changes on your branch.","Understand that the rolling build store only contains builds for JIT-affecting commits."],"tags":["git","jit","rolling-build","coreclr","superpmi"],"backgroundTag":null,"analyzedSha":"60108ba66eb7d1d12f595480091b4ad80a24b172","analyzedAt":"2026-08-10T18:54:11.478Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}