A compound of formula I, or a pharmaceutically acceptable salt thereof, wherein: X is N or CR 2; X 1 is N or CR 2; X 2 is N or CR 2; each R 2 is independently selected from -R, halogen, -haloalkyl, -OR, -SR, -CN, -NO 2, -SO 2 R, -SOR, -C R, -CO 2 R, -C N 2, -NRC R, -NRC N 2, -NRSO 2 R, or -N 2; each R is independently hydrogen, C 1-6 aliphatic, C 3-10 aryl, a 3-8 membered saturated or partially unsaturated carbocyclic ring, a 3-7 membered heterocylic ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, or a 5-6 membered monocyclic heteroaryl ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; each of which is optionally substituted; or two R groups on the same atom are taken together with the atom to which they are attached to form a C 3-10 aryl, a 3-8 membered saturated or partially unsaturated carbocyclic ring, a 3-7 membered heterocylic ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, or a 5-6 membered monocyclic heteroaryl ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; each of which is optionally substituted; L is a divalent group selected from C 3-10 aryl, a 3-8 membered saturated or partially unsaturated carbocyclic ring, a 3-7 membered heterocylic ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, and a 5-6 membered monocyclic heteroaryl ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; each of which is optionally substituted; or L is a divalent group selected from C 1-6 aliphatic-C 3-10 aryl, C 1-6 aliphatic-3-8 membered saturated or partially unsaturated carbocyclic ring, C 1-6 aliphatic-3-7 membered heterocylic ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, and a C 1-6 aliphatic-5-6 membered monocyclic heteroaryl ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; each of which is optionally substituted; Y is O, S, SO 2, SO, C, CO 2, C N, -NRC, -NRC N, -NRSO 2, or N; or Y is absent; R 1 is C 2-6 alkenyl or C 2-6 alkynyl, which is optionally substituted; or R 1 is CN. X is N or CR 2; X 1 is N or CR 2; X 2 is N or CR 2; each R 2 is independently selected from -R, halogen, -haloalkyl, -OR, -SR, -CN, -NO 2, -SO 2 R, -SOR, -C R, -CO 2 R, -C N 2, -NRC R, -NRC N 2, -NRSO 2 R, or -N 2; each R is independently hydrogen, C 1-6 aliphatic, C 3-10 aryl, a 3-8 membered saturated or partially unsaturated carbocyclic ring, a 3-7 membered heterocylic ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, or a 5-6 membered monocyclic heteroaryl ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; each of which is optionally substituted; or two R groups on the same atom are taken together with the atom to which they are attached to form a C 3-10 aryl, a 3-8 membered saturated or partially unsaturated carbocyclic ring, a 3-7 membered heterocylic ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, or a 5-6 membered monocyclic heteroaryl ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; each of which is optionally substituted; L is a divalent group selected from C 3-10 aryl, a 3-8 membered saturated or partially unsaturated carbocyclic ring, a 3-7 membered heterocylic ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, and a 5-6 membered monocyclic heteroaryl ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; each of which is optionally substituted; or L is a divalent group selected from C 1-6 aliphatic-C 3-10 aryl, C 1-6 aliphatic-3-8 membered saturated or partially unsaturated carbocyclic ring, C 1-6 aliphatic-3-7 membered heterocylic ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, and a C 1-6 aliphatic-5-6 membered monocyclic heteroaryl ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; each of which is optionally substituted; Y is O, S, SO 2, SO, C, CO 2, C N, -NRC, -NRC N, -NRSO 2, or N; or Y is absent; R 1 is C 2-6 alkenyl or C 2-6 alkynyl, which is optionally substituted; or R 1 is CN.