A compound of formula: or a pharmaceutically acceptable salt thereof: wherein: X is a 4-12 membered saturated or partially saturated monocyclic, bridged or spirocyclic ring, wherein the saturated or partially saturated monocyclic ring is optionally substituted with one or more R 8; Y is a bond, O, S or NR 5; R 1 is -C C(R A) C(R B) p or -SO 2 C(R A) C(R B) p; R 2 is hydrogen, alkyl, hydroxyalkyl, dihydroxyalkyl, alkylaminylalkyl, dialkylaminylalkyl, -Z-NR 5 R 10, heterocyclyl, heterocyclylalkyl, aryl, heteroaryl, or heteroarylalkyl, wherein each of the Z, heterocyclyl, heterocyclylalkyl, aryl, heteroaryl, and heteroarylalkyl may be optionally substituted with one or more R 9; Z is C1 - C4 alkylene; each R 3 is independently C1 - C3 alkyl, oxo, or haloalkyl; L is a bond, -C -, or C1 - C3 alkylene; R 4 is hydrogen, cycloalkyl, heterocyclyl, aryl, aralkyl or heteroaryl, wherein each of the cycloalkyl, heterocyclyl, aryl, aralkyl and heteroaryl may be optionally substituted with one or more R 6 or R 7; each R 5 is independently hydrogen or C1 - C3 alkyl; R 6 is cycloalkyl, heterocyclyl, heterocyclylalkyl, aryl, or heteroaryl, wherein each of the cycloalkyl, heterocyclyl, aryl, or heteroaryl may be optionally substituted with one or more R 7; each R 7 is independently halogen, hydroxyl, C1 - C6 alkyl, cycloalkyl, alkoxy, haloalkyl, amino, cyano, heteroalkyl, hydroxyalkyl or Q-haloalkyl, wherein Q is O or S; R 8 is oxo, C1 - C3 alkyl, C2 - C4 alkynyl, heteroalkyl, cyano, -C OR 5, -C N(R 5) 2, -N(R 5) 2, wherein the C1 - C3 alkyl may be optionally substituted with cyano, halogen, -OR 5, -N(R 5) 2, or heteroaryl; each R 9 is independently hydrogen, oxo, acyl, hydroxyl, hydroxyalkyl, cyano, halogen, C1 - C6 alkyl, aralkyl, haloalkyl, heteroalkyl, cycloalkyl, heterocyclylalkyl, alkoxy, dialkylaminyl, dialkylamidoalkyl, or dialkylaminylalkyl, wherein the C1 - C6 alkyl may be optionally substituted with cycloalkyl; each R 10 is independently hydrogen, acyl, C1 - C3 alkyl, heteroalkyl or hydroxyalkyl; R A is absent, hydrogen, or C1 - C3 alkyl; each R B is independently hydrogen, C1 - C3 alkyl, alkylaminylalkyl, dialkylaminylalkyl or heterocyclylalkyl; m is zero or an integer between 1 and 2; p is one or two; and wherein, when is a triple bond then R A is absent, R B is present and p equals one, or when is a double bond then R A is present, R B is present and p equals two, or R A, R B and the carbon atoms to which they are attached form a 5-8 membered partially saturated cycloalkyl optionally substituted with one or more R 7. X is a 4-12 membered saturated or partially saturated monocyclic, bridged or spirocyclic ring, wherein the saturated or partially saturated monocyclic ring is optionally substituted with one or more R 8; Y is a bond, O, S or NR 5; R 1 is -C C(R A) C(R B) p or -SO 2 C(R A) C(R B) p; R 2 is hydrogen, alkyl, hydroxyalkyl, dihydroxyalkyl, alkylaminylalkyl, dialkylaminylalkyl, -Z-NR 5 R 10, heterocyclyl, heterocyclylalkyl, aryl, heteroaryl, or heteroarylalkyl, wherein each of the Z, heterocyclyl, heterocyclylalkyl, aryl, heteroaryl, and heteroarylalkyl may be optionally substituted with one or more R 9; Z is C1 - C4 alkylene; each R 3 is independently C1 - C3 alkyl, oxo, or haloalkyl; L is a bond, -C -, or C1 - C3 alkylene; R 4 is hydrogen, cycloalkyl, heterocyclyl, aryl, aralkyl or heteroaryl, wherein each of the cycloalkyl, heterocyclyl, aryl, aralkyl and heteroaryl may be optionally substituted with one or more R 6 or R 7; each R 5 is independently hydrogen or C1 - C3 alkyl; R 6 is cycloalkyl, heterocyclyl, heterocyclylalkyl, aryl, or heteroaryl, wherein each of the cycloalkyl, heterocyclyl, aryl, or heteroaryl may be optionally substituted with one or more R 7; each R 7 is independently halogen, hydroxyl, C1 - C6 alkyl, cycloalkyl, alkoxy, haloalkyl, amino, cyano, heteroalkyl, hydroxyalkyl or Q-haloalkyl, wherein Q is O or S; R 8 is oxo, C1 - C3 alkyl, C2 - C4 alkynyl, heteroalkyl, cyano, -C OR 5, -C N(R 5) 2, -N(R 5) 2, wherein the C1 - C3 alkyl may be optionally substituted with cyano, halogen, -OR 5, -N(R 5) 2, or heteroaryl; each R 9 is independently hydrogen, oxo, acyl, hydroxyl, hydroxyalkyl, cyano, halogen, C1 - C6 alkyl, aralkyl, haloalkyl, heteroalkyl, cycloalkyl, heterocyclylalkyl, alkoxy, dialkylaminyl, dialkylamidoalkyl, or dialkylaminylalkyl, wherein the C1 - C6 alkyl may be optionally substituted with cycloalkyl; each R 10 is independently hydrogen, acyl, C1 - C3 alkyl, heteroalkyl or hydroxyalkyl; R A is absent, hydrogen, or C1 - C3 alkyl; each R B is independently hydrogen, C1 - C3 alkyl, alkylaminylalkyl, dialkylaminylalkyl or heterocyclylalkyl; m is zero or an integer between 1 and 2; p is one or two; and wherein, when is a triple bond then R A is absent, R B is present and p equals one, or when is a double bond then R A is present, R B is present and p equals two, or R A, R B and the carbon atoms to which they are attached form a 5-8 membered partially saturated cycloalkyl optionally substituted with one or more R 7.