Implementing file globbing in ParseProject alias. #78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please review my changes for file globbing in the parse project alias.
These changes are in support of issue: Project Parser does not support Wildcards. #2183.
Explanation of Changes:
The structure of the project parsing code in Cake.Incubator is considerably different from that which is in the current build of Cake. It seems as though it is moving towards handling most internal functionality as extensions. The changes that i made, I made trying to keep this structure in mind.
To construct a Cake.Core.IO.Globber object, you need to pass in an IFileSystem and an ICakeEnvironment interface. With everything now, being broken down into extension methods (vs. having a ProjectParser object), I went looking for the least disruptive way to get a Globber object down to where I needed it -
ProjectParserExtensions.GetNetFrameworkMSBuildProjects()
. That was to modifyProjectParserExtensions.ParseProjectFile
to accept arguments of IFileSystem and ICakeEnvironment at the end of its argument list. In my opinion it would have been more useful to have some class which retains references to these objects and passed that around. But again, I didn't want to be that disruptive with this change. Or at least, maybe it would be more useful to have aclass ProjectParseParams
that is accepted by these extension methods (and contains 'configuration', 'platform', 'filesystem', etc.) ? Again, I didn't want to disturb the direction of this module too much.That said, I am open to discussion and suggestions around these changes.