Repository navigation
Infrastructure to filter commandline arguments - #5237
Conversation
…grams from the new-build hash input to reduce redundant recompilation. See haskell#4247.
|
Some example usage code: merijn@b3e55d9 Probably the filters should be written in program specific modules, but moving them into the |
| -- | A function that filters any arguments that don't impact the output | ||
| -- from a commandline. Used to limit the volatility of dependency hashes | ||
| -- when using new-build. | ||
| programFilterArgs :: Maybe Version -> [String] -> [String] |
There was a problem hiding this comment.
name bikeshedding: I'd rather call this something like programNormalizeArgs to emphasize this is about normalizing; "filter" would imply that we're only ever going to remove args (i.e. in the sense that the output [String] would only be a sub-sequence of the original [String]); but it's conceivable we may at some point do a bit more.
There was a problem hiding this comment.
I don't have a strong preference for the name, but I hate trying to come up with them, so I'm fine with whatever the majority wants.
There was a problem hiding this comment.
I am with Herbert regarding the name.
Changed the name of the `Program` field to hvr's suggestion. Added a `PackageDescription` argument so we have access to all the options specified in .cabal files and revisions.
|
Updated to deal with |
|
Updated this to match the naming issue and deal with |
|
Now updated so that is actually looks at the list of builtin programs Cabal knows about... |
|
Last call for comments or I'm merging this! |
This piggybacks any filters on Cabal's support for known programs, it allows us to specify a version specific argument filtering function for each program Cabal knows about.
See #4247.