Azure / Azure/azure-functions-powershell-worker

Reference module with Functions-specific command declarations

Open
#577 5 comments 0 reactions 1 assignee Claimed by @Francisco-Gamino View on GitHub
feature:developer experience investigation P1
Dominant language
C#
Stars
215
Forks
61
Avg merge
21h 4m
Merged PRs (30d)
6

Description

When authoring PowerShell functions, the Functions-specific commands (such as `Push-OutputBinding`, `Invoke-ActivityFunction`, etc.) are difficult to discover. The user must find the names and invocation syntax in the documentation and type them in correctly. These commands cannot be discovered interactively via the regular PowerShell means (`Get-Help`, `Get-Command`), and VSCode cannot help with autocomplete, IntelliSense, etc., which complicates functions authoring.

These commands are defined in an internal module that is automatically loaded by the worker during function execution. However, this module cannot be imported into a standalone PowerShell session because of the dependency on worker's internals.

What we can do is provide a special reference module containing all the commands with parameters and help text, with a "do-nothing" implementation. We will update this module on adding or changing commands, and we will distribute it together with the PowerShell worker (so it always stays in sync with the actual implementation).

Challenge: it would be great if we could make sure this module automatically loaded when Functions are authored in VSCode. At the same time, we don't want this module to be loaded into the sessions used for executing Functions code, so including this module into the global PSModulePath is probably not a good idea. In the worst case, we can document manual steps, and this will be an improvement comparing to the current situation, but can we find a better way?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.