diff --git a/docs/project/contributing.md b/docs/project/contributing.md index 8316e2219..a5bf1175e 100644 --- a/docs/project/contributing.md +++ b/docs/project/contributing.md @@ -46,6 +46,10 @@ Internal symbolic links use the target's path and line-ending policy in the repa ### Fast C# Feedback +The iterate tier reuses the Roslyn compiler server for runtime source edits. Each edit still +runs the compiler and source generators. To compare with a fresh compiler process, use +`npm run typecheck:iterate -- runtime`. + Use fixture-scoped builds while editing runtime or Editor tests. The npm command runs the locked Python tool through uv and uses the installed .NET SDK: diff --git a/scripts/agent_check.py b/scripts/agent_check.py index 7dea6dca9..5f83b09a9 100644 --- a/scripts/agent_check.py +++ b/scripts/agent_check.py @@ -197,6 +197,8 @@ def tooling(file: str) -> bool: ) for scope in scopes: command = ["npm", "run", "typecheck:iterate", "--", scope] + if scope == "runtime": + command.append("--server") prefix = "Tests/Runtime/" if scope == "tests" else "Tests/Editor/" scoped = ( [file for file in fixtures if file.startswith(prefix)] diff --git a/scripts/tests/test_agent_check.py b/scripts/tests/test_agent_check.py index 29585a725..9eb3d4fb3 100644 --- a/scripts/tests/test_agent_check.py +++ b/scripts/tests/test_agent_check.py @@ -35,7 +35,13 @@ def test_original_plan(case: dict[str, object]) -> None: tier = case["tier"] assert isinstance(tier, str) - assert agent_check.select(strings(case["files"]), tier) == case["expected"] + plan = agent_check.select(strings(case["files"]), tier) + # Preserve the frozen source and verify the single intentional change to its plans. + for command in plan["commands"]: + if command[:5] == ["npm", "run", "typecheck:iterate", "--", "runtime"]: + assert command[5:] == ["--server"] + command.pop() + assert plan == case["expected"] @pytest.mark.parametrize("file", ["../outside", "/outside", "C:/outside", "a/./b", "", "a\0b"])