Currently, the configured subprojects and environments are essentially baked into the command parser:
|
pSubproject = P.choice (fmap P.string subprojects) |
|
pDeployEnvironments = map (fmap DeployEnvironment . P.string) environments |
If the subprojects to deploy are instead parsed as arbitrary identifiers, and then checked later, we can do much better error reporting, i.e. including the list of configured subprojects. And that makes the parser more pure in a sense, because it now no longer has to depend on the project config.
Currently, the configured subprojects and environments are essentially baked into the command parser:
hoff/src/Parser.hs
Line 248 in e9d0cb2
hoff/src/Parser.hs
Line 286 in e9d0cb2
If the subprojects to deploy are instead parsed as arbitrary identifiers, and then checked later, we can do much better error reporting, i.e. including the list of configured subprojects. And that makes the parser more pure in a sense, because it now no longer has to depend on the project config.