Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ This repository includes both C# and F# code, as well as .csproj and .fsproj pro

| branch | status |
|--------|-----------|
| master | [![Build Status](https://dev.azure.com/ms-quantum-public/Microsoft%20Quantum%20(public)/_apis/build/status/microsoft.qsharp-compiler?branchName=master)](https://dev.azure.com/ms-quantum-public/Microsoft%20Quantum%20(public)/_build/latest?definitionId=14&branchName=master) |
| main | [![Build Status](https://dev.azure.com/ms-quantum-public/Microsoft%20Quantum%20(public)/_apis/build/status/microsoft.qsharp-compiler?branchName=main)](https://dev.azure.com/ms-quantum-public/Microsoft%20Quantum%20(public)/_build/latest?definitionId=14&branchName=main) |

## Feedback ##

Expand Down
4 changes: 2 additions & 2 deletions examples/CompilerExtensions/ExtensionPackage/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Creating a NuGet package containing a Q# compiler extension

This project contains a template for packaging a Q# compiler extension. For more information about Q# compiler extensions see [here](https://github.com/microsoft/qsharp-compiler/tree/master/src/QuantumSdk#extending-the-q-compiler). For more information on NuGet packages, see [here](https://docs.microsoft.com/en-us/nuget/what-is-nuget).
This project contains a template for packaging a Q# compiler extension. For more information about Q# compiler extensions see [here](https://github.com/microsoft/qsharp-compiler/tree/main/src/QuantumSdk#extending-the-q-compiler). For more information on NuGet packages, see [here](https://docs.microsoft.com/en-us/nuget/what-is-nuget).

Prerequisites: [NuGet tools](https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools)

Expand All @@ -14,4 +14,4 @@ In order to use the created package as a Q# compiler extension when building a Q
```
<PackageReference Include="CustomExtension.Package" Version="1.0.0" IsQscReference="true" />
```
The extension will only be included in the build process if`IsQscReference` is set to `true`. For more information, see this [readme](https://github.com/microsoft/qsharp-compiler/blob/master/src/QuantumSdk/README.md).
The extension will only be included in the build process if`IsQscReference` is set to `true`. For more information, see this [readme](https://github.com/microsoft/qsharp-compiler/blob/main/src/QuantumSdk/README.md).
6 changes: 3 additions & 3 deletions src/QuantumSdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Any project that uses the Quantum Sdk can easily incorporate custom compilation
```
Marking all assets as private by adding a `PrivateAssets="All"` attribute is generally a good practice if the reference is a development only dependency, which is often the case for assemblies that implement rewrite steps.

A custom compilation step is defined by a class that implements the [IRewriteStep interface](https://github.com/microsoft/qsharp-compiler/blob/master/src/QsCompiler/Compiler/PluginInterface.cs). The output assembly of a project reference or any .NET Core library contained in a package reference marked as qsc reference is loaded during compilation and searched for classes implementing the `IRewriteStep` interface. Any such class is instantiated using the default constructor, and the implemented transformation is executed.
A custom compilation step is defined by a class that implements the [IRewriteStep interface](https://github.com/microsoft/qsharp-compiler/blob/main/src/QsCompiler/Compiler/PluginInterface.cs). The output assembly of a project reference or any .NET Core library contained in a package reference marked as qsc reference is loaded during compilation and searched for classes implementing the `IRewriteStep` interface. Any such class is instantiated using the default constructor, and the implemented transformation is executed.

[comment]: # (TODO: add a section detailing the IRewriteStep interface, and link it here)

Expand All @@ -47,7 +47,7 @@ Steps defined within packages or projects with higher priority are executed firs

[comment]: # (TODO: describe how to limit included rewrite steps to a particular execution target)

An example for defining custom compilation steps in a referenced .NET Core project can be found [here](https://github.com/microsoft/qsharp-compiler/tree/master/examples).
An example for defining custom compilation steps in a referenced .NET Core project can be found [here](https://github.com/microsoft/qsharp-compiler/tree/main/examples).
See the [this section](#packaging) for more detail on how to package a Q# compiler extension to distribute it as a NuGet package.


Expand Down Expand Up @@ -92,7 +92,7 @@ The content of the file should be similar to the following, with `Package_Name`

</Project>
```
This [example](https://github.com/microsoft/qsharp-compiler/tree/master/examples/CompilerExtensions/ExtensionPackage) provides a template for packaging a Q# compiler extension.
This [example](https://github.com/microsoft/qsharp-compiler/tree/main/examples/CompilerExtensions/ExtensionPackage) provides a template for packaging a Q# compiler extension.

If you develop a NuGet package to extend the Q# compilation process, we recommend to distribute it as a self-contained package to avoid issues due to references that could not be resolved. Each qsc reference is loaded into its own context to avoid issues when several references depend on different versions of the same package.

Expand Down