[PD] detect dependencies from patch