Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Adding option for parsing public Functions and Aliases #50

Copy link
Copy link
@SimonWahlin

Description

@SimonWahlin
Issue body actions

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?

Reactions are currently unavailable

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.