diff --git a/src/AzureClient/EntryPoint/EntryPointGenerator.cs b/src/AzureClient/EntryPoint/EntryPointGenerator.cs index a7b7bd419c..dd7b721d18 100644 --- a/src/AzureClient/EntryPoint/EntryPointGenerator.cs +++ b/src/AzureClient/EntryPoint/EntryPointGenerator.cs @@ -103,15 +103,13 @@ public IEntryPoint Generate(string operationName, string? executionTarget, project.SourceFiles.ToArray(), compilerMetadata.WithAssemblies(workspaceAssemblies.ToArray()), logger, - Path.Combine(Workspace.CacheFolder, $"__entrypoint{project.CacheDllName}"), - executionTarget, - runtimeCapability)); + Path.Combine(Workspace.CacheFolder, $"__entrypoint{project.CacheDllName}"))); } catch (Exception e) { logger.LogError( "IQS004", - $"Error compiling project {project.ProjectFile} for execution target {executionTarget}: {e.Message}"); + $"Error compiling project {project.ProjectFile}: {e.Message}"); } } @@ -153,7 +151,7 @@ public IEntryPoint Generate(string operationName, string? executionTarget, operationInfo, compilerMetadata, logger, Path.Combine(Workspace.CacheFolder, "__entrypoint__.dll"), executionTarget, runtimeCapability); if (EntryPointAssemblyInfo == null || logger.HasErrors) { - Logger?.LogError($"Error compiling entry point for operation {operationName}."); + Logger?.LogError($"Error compiling entry point operation {operationName} for execution target {executionTarget}."); throw new CompilationErrorsException(logger.Errors.ToArray()); } diff --git a/src/Core/Compiler/CompilerService.cs b/src/Core/Compiler/CompilerService.cs index 2313b80a69..7a434242a2 100644 --- a/src/Core/Compiler/CompilerService.cs +++ b/src/Core/Compiler/CompilerService.cs @@ -168,8 +168,7 @@ public IEnumerable IdentifyElements(string source) /// Each snippet code is wrapped inside the 'SNIPPETS_NAMESPACE' namespace and processed as a file /// with the same name as the snippet id. /// - public AssemblyInfo? BuildSnippets(Snippet[] snippets, CompilerMetadata metadatas, QSharpLogger logger, string dllName, string? executionTarget = null, - RuntimeCapability? runtimeCapability = null) + public AssemblyInfo? BuildSnippets(Snippet[] snippets, CompilerMetadata metadatas, QSharpLogger logger, string dllName) { string openStatements = string.Join("", AutoOpenNamespaces.Select( entry => string.IsNullOrEmpty(entry.Value) @@ -189,7 +188,7 @@ string WrapInNamespace(Snippet s) => }; warningCodesToIgnore.ForEach(code => logger.WarningCodesToIgnore.Add(code)); - var assembly = BuildAssembly(sources, metadatas, logger, dllName, compileAsExecutable: false, executionTarget, runtimeCapability); + var assembly = BuildAssembly(sources, metadatas, logger, dllName, compileAsExecutable: false); warningCodesToIgnore.ForEach(code => logger.WarningCodesToIgnore.Remove(code)); return assembly; @@ -198,18 +197,17 @@ string WrapInNamespace(Snippet s) => /// /// Builds the corresponding .net core assembly from the code in the given files. /// - public AssemblyInfo? BuildFiles(string[] files, CompilerMetadata metadatas, QSharpLogger logger, string dllName, string? executionTarget = null, - RuntimeCapability? runtimeCapability = null) + public AssemblyInfo? BuildFiles(string[] files, CompilerMetadata metadatas, QSharpLogger logger, string dllName) { var sources = ProjectManager.LoadSourceFiles(files, d => logger?.Log(d), ex => logger?.Log(ex)); - return BuildAssembly(sources, metadatas, logger, dllName, compileAsExecutable: false, executionTarget, runtimeCapability); + return BuildAssembly(sources, metadatas, logger, dllName, compileAsExecutable: false); } /// /// Builds the corresponding .net core assembly from the Q# syntax tree. /// - private AssemblyInfo? BuildAssembly(ImmutableDictionary sources, CompilerMetadata metadata, QSharpLogger logger, string dllName, bool compileAsExecutable, string? executionTarget, - RuntimeCapability? runtimeCapability = null) + private AssemblyInfo? BuildAssembly(ImmutableDictionary sources, CompilerMetadata metadata, QSharpLogger logger, string dllName, + bool compileAsExecutable, string? executionTarget = null, RuntimeCapability? runtimeCapability = null) { logger.LogDebug($"Compiling the following Q# files: {string.Join(",", sources.Keys.Select(f => f.LocalPath))}"); diff --git a/src/Core/Compiler/ICompilerService.cs b/src/Core/Compiler/ICompilerService.cs index dc3229c71f..06e8142faf 100644 --- a/src/Core/Compiler/ICompilerService.cs +++ b/src/Core/Compiler/ICompilerService.cs @@ -31,14 +31,12 @@ AssemblyInfo BuildEntryPoint(OperationInfo operation, CompilerMetadata metadatas /// /// Builds the corresponding .net core assembly from the code in the given Q# Snippets. /// - AssemblyInfo BuildSnippets(Snippet[] snippets, CompilerMetadata metadatas, QSharpLogger logger, string dllName, string executionTarget = null, - RuntimeCapability runtimeCapabilities = null); + AssemblyInfo BuildSnippets(Snippet[] snippets, CompilerMetadata metadatas, QSharpLogger logger, string dllName); /// /// Builds the corresponding .net core assembly from the code in the given files. /// - AssemblyInfo BuildFiles(string[] files, CompilerMetadata metadatas, QSharpLogger logger, string dllName, string executionTarget = null, - RuntimeCapability runtimeCapability = null); + AssemblyInfo BuildFiles(string[] files, CompilerMetadata metadatas, QSharpLogger logger, string dllName); /// /// Returns the names of all declared callables and types.