microsoft / microsoft/AL

Integration Events with IncludeSender := true should suggest `var` to subscribers

Open
#6,089 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement intellisense
Dominant language
PowerShell
Stars
881
Forks
285
Avg merge
3d 36m
Merged PRs (30d)
1

Description

When we add a subscriber with Shift+Alt+E to an event that declares true for IncludeSender, we only get the other, explicitly written parameters as arguments to our resulting subscriber function. We can then use Ctrl+Space within the argument list parentheses to see what other arguments are available and add them if desired.

However, when added this way, the sender is declared without var. So, (a) we have to add that ourselves, and (b) it might mislead someone into thinking they don't have the option of modifying the sender, but we do. Might a better default be to insert var Sender there? Then those who don't need/want to modify can drop the var. Afaict, this is how other args work.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Shift+Alt+E subscriber-generation path for events with IncludeSender := true and inspect the generated subscriber signature. Compare sender handling with the existing explicit-parameter behavior; done means the generated sender parameter includes var while other available arguments remain discoverable.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.