diff --git a/images/iqsharp-base/Dockerfile b/images/iqsharp-base/Dockerfile index eadbf75082..a633eb5572 100644 --- a/images/iqsharp-base/Dockerfile +++ b/images/iqsharp-base/Dockerfile @@ -109,7 +109,7 @@ ENV PATH=$PATH:${HOME}/dotnet:${HOME}/.dotnet/tools \ # Install IQ# and the project templates, using the NuGet packages from the # build context. ARG IQSHARP_VERSION -RUN dotnet new -i "Microsoft.Quantum.ProjectTemplates::0.10.2001.525-beta" && \ +RUN dotnet new -i "Microsoft.Quantum.ProjectTemplates::0.11.2006.2203-beta" && \ dotnet tool install \ --global \ Microsoft.Quantum.IQSharp \ diff --git a/src/Core/Compiler/CompilerService.cs b/src/Core/Compiler/CompilerService.cs index 6ac40cdd4b..b0665f3d54 100644 --- a/src/Core/Compiler/CompilerService.cs +++ b/src/Core/Compiler/CompilerService.cs @@ -135,10 +135,9 @@ private AssemblyInfo BuildAssembly(ImmutableDictionary sources, Com { // Generate C# simulation code from Q# syntax tree and convert it into C# syntax trees: var trees = new List(); - NonNullable GetFileId(Uri uri) => CompilationUnitManager.TryGetFileId(uri, out var id) ? id : NonNullable.New(uri.AbsolutePath); foreach (var file in sources.Keys) { - var sourceFile = GetFileId(file); + var sourceFile = CompilationUnitManager.GetFileId(file); var codegenContext = string.IsNullOrEmpty(executionTarget) ? CodegenContext.Create(qsCompilation.Namespaces) : CodegenContext.Create(qsCompilation.Namespaces, new Dictionary() { { AssemblyConstants.ExecutionTarget, executionTarget } }); diff --git a/src/Core/Core.csproj b/src/Core/Core.csproj index 6bfdb7f9ac..e4a4b59562 100644 --- a/src/Core/Core.csproj +++ b/src/Core/Core.csproj @@ -34,9 +34,9 @@ - - - + + + diff --git a/src/Core/Snippets/Snippets.cs b/src/Core/Snippets/Snippets.cs index f6afa05204..dcff06fc0b 100644 --- a/src/Core/Snippets/Snippets.cs +++ b/src/Core/Snippets/Snippets.cs @@ -10,6 +10,7 @@ using System.Runtime.Loader; using Microsoft.Extensions.Logging; using Microsoft.Quantum.IQSharp.Common; +using Microsoft.Quantum.QsCompiler.CompilationBuilder; namespace Microsoft.Quantum.IQSharp { @@ -162,10 +163,13 @@ Snippet populate(Snippet s) => { id = string.IsNullOrWhiteSpace(s.id) ? Guid.NewGuid().ToString() : s.id, code = s.code, - warnings = logger.Logs.Where(m => m.Source == s.Uri.AbsolutePath).Select(logger.Format).ToArray(), + warnings = logger.Logs + .Where(m => m.Source == CompilationUnitManager.GetFileId(s.Uri).Value) + .Select(logger.Format) + .ToArray(), Elements = assembly?.SyntaxTree? .SelectMany(ns => ns.Elements) - .Where(c => c.SourceFile() == s.Uri.AbsolutePath) + .Where(c => c.SourceFile() == CompilationUnitManager.GetFileId(s.Uri).Value) .ToArray() }; diff --git a/src/Tool/appsettings.json b/src/Tool/appsettings.json index f6951ce8db..9b0c466e3a 100644 --- a/src/Tool/appsettings.json +++ b/src/Tool/appsettings.json @@ -6,26 +6,25 @@ }, "AllowedHosts": "*", "DefaultPackageVersions": [ - "Microsoft.Quantum.Compiler::0.12.20062505-beta", + "Microsoft.Quantum.Compiler::0.11.2006.2203-beta", - "Microsoft.Quantum.CsharpGeneration::0.12.20062505-beta", - "Microsoft.Quantum.Development.Kit::0.12.20062505-beta", - "Microsoft.Quantum.Simulators::0.12.20062505-beta", - "Microsoft.Quantum.Xunit::0.12.20062505-beta", + "Microsoft.Quantum.CsharpGeneration::0.11.2006.2203-beta", + "Microsoft.Quantum.Development.Kit::0.11.2006.2203-beta", + "Microsoft.Quantum.Simulators::0.11.2006.2203-beta", + "Microsoft.Quantum.Xunit::0.11.2006.2203-beta", - "Microsoft.Quantum.Standard::0.12.20062505-beta", - "Microsoft.Quantum.Chemistry::0.12.20062505-beta", - "Microsoft.Quantum.Chemistry.Jupyter::0.12.20062505-beta", - "Microsoft.Quantum.MachineLearning::0.12.20062505-beta", - "Microsoft.Quantum.Numerics::0.12.20062505-beta", + "Microsoft.Quantum.Standard::0.11.2006.2203-beta", + "Microsoft.Quantum.Chemistry::0.11.2006.2203-beta", + "Microsoft.Quantum.Chemistry.Jupyter::0.11.2006.2203-beta", + "Microsoft.Quantum.MachineLearning::0.11.2006.2203-beta", + "Microsoft.Quantum.Numerics::0.11.2006.2203-beta", - "Microsoft.Quantum.Katas::0.12.20062505-beta", + "Microsoft.Quantum.Katas::0.11.2006.2203-beta", - "Microsoft.Quantum.Research::0.12.20062505-beta", - + "Microsoft.Quantum.Research::0.11.2006.2203-beta", - "Microsoft.Quantum.Providers.IonQ::0.12.20062505-beta", - "Microsoft.Quantum.Providers.Honeywell::0.12.20062505-beta", - "Microsoft.Quantum.Providers.QCI::0.12.20062505-beta" + "Microsoft.Quantum.Providers.IonQ::0.11.2006.2203-beta", + "Microsoft.Quantum.Providers.Honeywell::0.11.2006.2203-beta", + "Microsoft.Quantum.Providers.QCI::0.11.2006.2203-beta" ] }