autofix-gn-scope
Fixes scope and variable errors in BUILD.gn files.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Fixes scope and variable errors in BUILD.gn files.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Comprehensive build error repair tool for C++, Rust, and Java projects using Soong, GN, Make, or CMake. Automatically fixes 30+ types of errors including headers, linking, APIs, and config.
Fixes function call errors with wrong number or type of arguments.
Fixes type mismatch errors by adding appropriate casts or conversions.
Fixes syntax errors in Android.bp files.
Removes unsupported or unknown compiler flags from build configurations.
Fixes script permission errors by making files executable.
SOC 직업 분류 기준
| name | autofix-gn-scope |
| description | Fixes scope and variable errors in BUILD.gn files. |
Fixes GN build file errors related to undefined variables or scope issues.
Undefined identifierAssignment had no effectCan't load buildconfigUnknown variableFrom: Undefined identifier: my_sources
Variable: my_sources
Undefined variable - add declaration:
# Before
sources = my_sources # ERROR: undefined
# After
my_sources = [ "main.cpp" ]
sources = my_sources
Using variable before definition:
# Before (error)
executable("app") {
sources = common_sources # ERROR
}
common_sources = [ "util.cpp" ]
# After (move declaration up)
common_sources = [ "util.cpp" ]
executable("app") {
sources = common_sources
}
Scope issue with inner blocks:
# Variables defined in if blocks may not be visible outside
if (is_debug) {
debug_flags = [ "-g" ]
}
# debug_flags might be undefined here if is_debug is false
defined() to check optional variablesimport("path")