Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Extensible diagnostics in design time builds #544

@bamarsha

Description

@bamarsha

Is your feature request related to a problem? Please describe.
The compiler has support for running arbitrary code on the Q# syntax tree during compilation in the form of the IRewriteStep interface. Rewrite steps can also generate arbitrary diagnostics that are displayed at build time. Unfortunately, rewrite steps don't run at design time when using the Q# language server, which means things like linters are limited to the command line, and can't provide live feedback in an editor.

Describe the solution you'd like
The compiler should provide some mechanism to run arbitrary diagnostic-generating code analysis in design-time builds, similar to Roslyn analyzers.

Describe alternatives you've considered
No known alternatives that don't involve modifying the language server.

Additional context
This would have been useful for the runtime capabilities diagnostics (#449, #488). Those had to be built into the compiler, but they are not needed for compilation. Extensible diagnostics would make this kind of static analysis easier to add in a modular way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: SDKQuantum SDK used to build Q# projectsenhancementNew request or suggestion for an improvementmaintenanceImprove code base quality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions