CompilationLoader Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public class CompilationLoader
type CompilationLoader = class
Public Class CompilationLoader
- Inheritance
-
CompilationLoader
Constructors
| CompilationLoader(CompilationLoader+SourceLoader, CompilationLoader+ReferenceLoader, CompilationLoader+Configuration, ILogger) |
Builds the compilation for the source files and references loaded by the given loaders, executing the compilation steps specified by the given options. Uses the specified logger to log all diagnostic events. |
| CompilationLoader(CompilationLoader+SourceLoader, IEnumerable<String>, CompilationLoader+Configuration, ILogger) |
Builds the compilation of the content returned by the given loader and the specified references, executing the compilation steps specified by the given options. Uses the specified logger to log all diagnostic events. |
| CompilationLoader(IEnumerable<String>, CompilationLoader+ReferenceLoader, CompilationLoader+Configuration, ILogger) |
Builds the compilation of the specified source files and the loaded references returned by the given loader, executing the compilation steps specified by the given options. Uses the specified logger to log all diagnostic events. |
| CompilationLoader(IEnumerable<String>, IEnumerable<String>, CompilationLoader+Configuration, ILogger) |
Builds the compilation of the specified source files and references, executing the compilation steps specified by the given options. Uses the specified logger to log all diagnostic events. |
Properties
| AllLoadedRewriteSteps |
Indicates the overall status of all rewrite step from external dlls. The status is indicated as success if none of these steps failed. |
| BinaryFormat |
Indicates whether a binary representation for the generated syntax tree has been generated successfully. This step is only executed if the corresponding configuration is specified. |
| CapabilityInference |
Indicates whether the inference of required runtime capabilities for execution completed successfully. This rewrite step is only executed when compiling a library. |
| CompilationOutput |
Contains the built compilation including the syntax tree after executing all configured rewrite steps. |
| DllGeneration |
Indicates whether a dll containing the compiled binary has been generated successfully. This step is only executed if the corresponding configuration is specified. |
| DllOutputPath |
Contains the absolute path where the generated dll containing the compiled binary has been written to disk. |
| Documentation |
Indicates whether documentation for the compilation was generated successfully. This step is only executed if the corresponding configuration is specified. |
| FunctorSupport |
Indicates whether all specializations were generated successfully. This rewrite step is only executed if the corresponding configuration is specified. |
| GeneratedSyntaxTree |
Contains the full Q# syntax tree after executing all configured rewrite steps, including the content of loaded references. |
| LiftLambdaExpressions |
Indicates whether all lambda expressions were replaced successfully with calls to generated callables. |
| LoadAssembly |
If LoadAssembly is not null, it will be used to load the dlls that are search for classes defining rewrite steps. |
| LoadDiagnostics |
Contains all diagnostics generated upon source file and reference loading. All other diagnostics can be accessed via the VerifiedCompilation. |
| LoadedRewriteSteps |
Contains the Uri and names of all rewrite steps loaded from the specified dlls in the order in which they are executed. |
| Monomorphization |
Indicates whether all the type-parameterized callables were resolved to concrete callables. This rewrite step is only executed if the corresponding configuration is specified. |
| PathToCompiledBinary |
Contains the absolute path where the binary representation of the generated syntax tree has been written to disk. |
| PluginLoading |
Indicates whether all external dlls specifying e.g. rewrite steps to perform as part of the compilation have been loaded successfully. The status indicates a successful execution if no such external dlls have been specified. |
| PreEvaluation |
Indicates whether the pre-evaluation step executed successfully. This rewrite step is only executed if the corresponding configuration is specified. |
| ReferenceLoading |
Indicates whether all references were loaded successfully. The loading may not be executed if all references were preloaded using methods outside this class. |
| Serialization |
Indicates whether the built compilation could be serialized successfully. This step is only executed if either the binary representation or a dll is emitted. |
| SourceFileLoading |
Indicates whether all source files were loaded successfully. Source file loading may not be executed if the content was preloaded using methods outside this class. |
| Success |
Indicates the overall success of all compilation steps. The compilation is indicated as having been successful if all steps that were configured to execute completed successfully. |
| TargetSpecificCompilation |
Indicates whether any target-specific compilation steps executed successfully. This includes the step to convert control flow statements when needed. |
| TargetSpecificReplacements |
Indicates whether target specific implementations for functions and operations have been used to replace the ones declared within the compilation unit. This step is only executed if the specified configuration contains the path to the target package. |
| Validation |
Indicates whether the compilation unit passed the compiler validation that is executed before invoking further rewrite and/or generation steps. |
| VerifiedCompilation |
Contains the initial compilation built by the compilation unit manager after verification. |
Methods
| GeneratedFile(String, String, String, String) |
Given a file id assigned by the Q# compiler, computes the corresponding path in the specified output folder. Returns the computed absolute path for a file with the specified ending. If the content for that file is specified, writes that content to disk. Throws the corresponding exception if any of the path operations fails or if the writing fails. |
| LoadedRewriteStep(String, String) |
Indicates whether all rewrite steps with the given name and loaded from the given source executed successfully. The source, if specified, is the path to the dll in which the step is specified. Returns a status NotRun if no such step was found or executed. Execution is considered successful if the precondition and transformation (if any) returned true. |
| ReadBinary(Stream, QsCompilation) |
Given a stream with the content of a Q# binary file, returns the corresponding compilation as out parameter. |
| ReadBinary(String, QsCompilation) |
Given the path to a Q# binary file, reads the content of that file and returns the corresponding compilation as out parameter. Throws the corresponding exception if the given path does not correspond to a suitable binary file. |
| WriteBinary(QsCompilation, Stream) |
Writes a binary representation of the Q# compilation to supplied stream. |