First off, I realize that this might be a highly opinionated subject and don't mind to be told that I'm wrong.
Today, Build-Module reads the BaseName of files matching $PublicFilter to populate FunctionsToExport, which works well enough unless you misspell a file or want to have more than one function per file. My main problem is that this method won't export any aliases for commands, meaning that I will have to either set AliasesToExport to '*' which is bad for performance or parse my aliases in a post-build task.
I would like to add an option to use AST to get all functions and aliases from all files matching $PublicFilter. This option could be enabled by a swich parameter $UseAST. I am aware that this will have an impact on build performance. In my testing on a small module with ~20 public functions, this change takes the build time from ~0.35seconds to ~0.7 seconds, an impact I'm gladly willing to endure to get Aliases parsed for me.
Would a PR for this be of interest?
First off, I realize that this might be a highly opinionated subject and don't mind to be told that I'm wrong.
Today, Build-Module reads the BaseName of files matching $PublicFilter to populate FunctionsToExport, which works well enough unless you misspell a file or want to have more than one function per file. My main problem is that this method won't export any aliases for commands, meaning that I will have to either set AliasesToExport to '*' which is bad for performance or parse my aliases in a post-build task.
I would like to add an option to use AST to get all functions and aliases from all files matching $PublicFilter. This option could be enabled by a swich parameter $UseAST. I am aware that this will have an impact on build performance. In my testing on a small module with ~20 public functions, this change takes the build time from ~0.35seconds to ~0.7 seconds, an impact I'm gladly willing to endure to get Aliases parsed for me.
Would a PR for this be of interest?