apply_patches CMakeFunction shouldn't checkout existing branch
- Dominant language
- C
- Stars
- 140
- Forks
- 92
- Avg merge
- 8h 2m
- Merged PRs (30d)
- 7
Description
Function "apply_patches" checks out the branch, where patches are applied if it already exists:
https://github.com/intel/opencl-clang/blob/51fd5b94830ebdc2c618da24217d08a27de9ca36/cmake/modules/CMakeFunctions.cmake#L71
I think the logic here might lead to unexpected issues, e.g. if you download new opencl-clang commit, where a new patch is introduced, it won't be applied if the branch is not manually deleted.
Maybe the function should delete the branch at first step?
Contributor guide
Research direction
Start at apply_patches in cmake/modules/CMakeFunctions.cmake around line 71 and inspect how an existing branch is handled before patches are applied. Confirm the behavior when a new opencl-clang commit adds a patch, then ensure the function does not leave that patch unapplied when the branch already exists.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100