PowerShell / PowerShell/PowerShellEditorServices
Investigate using LanguagePrimitives.ConvertTo rather than the converter attribute
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 767
- Forks
- 266
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 1
Description
In the debugger code we currently go to great lengths to find and execute a type conversion attribute on variables:
Most of this can't be avoided, but one thing we do here is use the EngineIntrinsics value to execute the conversion attribute on the pipeline thread, which means we need to contend for and wait on a pipeline thread execution.
Instead of this, we could maybe call LanguagePrimitives.ConvertTo() with the known target type and ideally not need to use the pipeline thread.
This might not be possible, but is worth investigating...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the conversion handling in src/PowerShellEditorServices/Services/DebugAdapter/DebugService.cs at lines 489-522, especially the EngineIntrinsics and pipeline-thread use. Compare that path with LanguagePrimitives.ConvertTo() for the known target type. Done means establishing whether the conversion can avoid pipeline-thread execution and documenting or implementing the viable approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- devtools
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100