Naphthyridine compounds of formula (I):,variations thereof, and their use as inhibitors of HPK1 (hematopoietic kinase 1) are described. The compounds are useful in treating HPK1-dependent disorders and enhancing an immune response. Also described are methods of inhibiting HPK1, methods of treating HPK1-dependent disorders, methods for enhancing an immune response, and methods for preparing the naphthyridine compounds.本發明描述式(I)之萘啶化合物:,其變化形式,及其作為HPK1 (造血激酶1)之抑制劑之用途。該等化合物適用於治療HPK1依賴性病症及增強免疫反應。本發明亦描述抑制HPK1之方法、治療HPK1依賴性病症之方法、增強免疫反應之方法及製備萘啶化合物之方法。