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
Show all changes
24 commits
Select commit Hold shift + click to select a range
d9607b6
Fix to reserve symbol in set statement crash (#486)
cesarzc Jun 26, 2020
cc3018d
Add NoOp to Precondition Dependencies for Classically Controlled (#489)
ScottCarda-MS Jun 26, 2020
7ebc8e2
NoOp Removed from Dependency List (#490)
ScottCarda-MS Jun 26, 2020
dbeaf56
Language Server SEMVER (#497)
anpaz Jun 30, 2020
cd147b9
Bump Markdig version. (#502)
Jun 30, 2020
73340cf
Add SemVer 2.0 data as AssemblyInformationalVersion (#501)
Jul 1, 2020
4a3f128
Use correct versions for both VS and VSCode VSIX (#500)
Jul 1, 2020
b776411
Distinguishing the processor architecture and the execution target (#…
bettinaheim Jul 3, 2020
0b8cdb4
upgraded Roslyn to 3.6.0 (#499)
filipw Jul 4, 2020
d602131
removing unnecessary package references (#505)
bettinaheim Jul 6, 2020
deca80d
Fix errors with exception handling during compilation and tests (#492)
bamarsha Jul 6, 2020
78e152b
NoOp Reference Change (#494)
ScottCarda-MS Jul 7, 2020
62c8f55
Compile-time errors for Q# programs not supported by QPRGen1 runtime …
bamarsha Jul 7, 2020
3c9bde9
Add StyleCop to CommandLineTool project and reformat source code; add…
bamarsha Jul 9, 2020
2b2d262
Set up PackageId for Compiler package (#512)
anpaz Jul 9, 2020
31f3fdf
Rename "execution target" to "target" in result diagnostic messages (…
bamarsha Jul 9, 2020
84b7a64
Remove version and copyright properties from Q# grammar file (#509)
bamarsha Jul 11, 2020
ceede3b
Add StyleCop to all C# projects and reformat code (#513)
bamarsha Jul 14, 2020
e318308
Replacing assets in extensions. (#516)
ricardo-espinoza Jul 14, 2020
e88d8ec
Replacing deprecated IconUrl with Icon and updating the assets for Nu…
ricardo-espinoza Jul 15, 2020
3b4638d
Remove extraneous line break in command in the build steps YAML scrip…
ricardo-espinoza Jul 15, 2020
f82be30
Embedding project templates in Visual Studio Code extension using Yeo…
ricardo-espinoza Jul 15, 2020
98c5b89
Limit trim_trailing_whitespace = true to C# files (#518)
bamarsha Jul 16, 2020
87508f7
Merged in master to feature branch.
ScottCarda-MS Jul 16, 2020
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
56 changes: 56 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
root = true

[*]
indent_style = space
insert_final_newline = true

[*.cs]
indent_size = 4
trim_trailing_whitespace = true

dotnet_style_qualification_for_event = true:suggestion
dotnet_style_qualification_for_field = true:suggestion
dotnet_style_qualification_for_method = true:suggestion
dotnet_style_qualification_for_property = true:suggestion

dotnet_diagnostic.IDE0002.severity = warning # Name can be simplified

# StyleCop: Special Rules
dotnet_diagnostic.SA0001.severity = none # XML comment analysis disabled

# StyleCop: Readability Rules
dotnet_diagnostic.SA1118.severity = none # Parameter should not span multiple lines
dotnet_diagnostic.SA1122.severity = none # Use string.Empty for empty strings
dotnet_diagnostic.SA1127.severity = none # Generic type constraints should be on their own line
dotnet_diagnostic.SA1128.severity = none # Put constructor initializers on their own line
dotnet_diagnostic.SA1135.severity = none # Using directives should be qualified

# StyleCop: Ordering Rules
dotnet_diagnostic.SA1201.severity = none # Elements should appear in the correct order
dotnet_diagnostic.SA1202.severity = none # Elements should be ordered by access
dotnet_diagnostic.SA1203.severity = none # Constants should appear before fields
dotnet_diagnostic.SA1204.severity = none # Static members should appear before non-static members
dotnet_diagnostic.SA1214.severity = none # Readonly fields should appear before non-readonly fields

# StyleCop: Maintainability Rules
dotnet_diagnostic.SA1401.severity = none # Fields should be private
dotnet_diagnostic.SA1402.severity = none # File may only contain a single type
dotnet_diagnostic.SA1405.severity = none # Debug.Assert should provide message text
dotnet_diagnostic.SA1413.severity = none # Use trailing comma in multi-line initializers
dotnet_diagnostic.SA1414.severity = none # Tuple types in signatures should have element names

# StyleCop: Layout Rules
dotnet_diagnostic.SA1512.severity = none # Single-line comments should not be followed by blank line
dotnet_diagnostic.SA1513.severity = none # Closing brace should be followed by blank line
dotnet_diagnostic.SA1515.severity = none # Single-line comment should be preceded by blank line

# StyleCop: Documentation Rules
dotnet_diagnostic.SA1611.severity = none # Element parameters should be documented
dotnet_diagnostic.SA1612.severity = none # Element parameter documentation should match element parameters
dotnet_diagnostic.SA1615.severity = none # Element return value should be documented
dotnet_diagnostic.SA1618.severity = none # Generic type parameters should be documented
dotnet_diagnostic.SA1623.severity = none # Property summary documentation should match accessors
dotnet_diagnostic.SA1629.severity = none # Documentation text should end with a period
dotnet_diagnostic.SA1633.severity = none # File should have header
dotnet_diagnostic.SA1642.severity = none # Constructor summary documentation should begin with standard text
dotnet_diagnostic.SA1649.severity = none # File name should match first type name
5 changes: 3 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"recommendations": [
"ms-dotnettools.csharp",
"editorconfig.editorconfig",
"ionide.ionide-fsharp",
"ms-dotnettools.csharp"
]
}
}
15 changes: 8 additions & 7 deletions bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ param(
$NuGetVersion = $Env:NUGET_VERSION,

[string]
$VsixVersion = $Env:VSIX_VERSION
$VsVsixVersion = $Env:VSVSIX_VERSION
);

if ("$AssemblyVersion".Trim().Length -eq 0) {
Expand All @@ -25,19 +25,19 @@ Write-Host "Assembly version: $AssemblyVersion";
$pieces = "$AssemblyVersion".split(".");
$MajorVersion = "$($pieces[0])";
$MinorVersion = "$($pieces[1])";
$patch = "$($pieces[2])"
$rev = "$($pieces[3])".PadLeft(4, "0");

if ("$SemverVersion".Trim().Length -eq 0) {
$patch = "$($pieces[2])"
$rev = "$($pieces[3])".PadLeft(4, "0");
$SemverVersion = "$MajorVersion.$MinorVersion.$patch$rev";
}

if ("$NuGetVersion".Trim().Length -eq 0) {
$NuGetVersion = "$AssemblyVersion-alpha";
}

if ("$VsixVersion".Trim().Length -eq 0) {
$VsixVersion = "$AssemblyVersion";
if ("$VsVsixVersion".Trim().Length -eq 0) {
$VsVsixVersion = "$MajorVersion.$MinorVersion.$patch.$rev";
}

$Telemetry = "$($Env:ASSEMBLY_CONSTANTS)".Contains("TELEMETRY").ToString().ToLower();
Expand All @@ -55,7 +55,7 @@ Get-ChildItem -Recurse *.v.template `
Replace("#MINOR_VERSION#", $MinorVersion).
Replace("#ASSEMBLY_VERSION#", $AssemblyVersion).
Replace("#NUGET_VERSION#", $NuGetVersion).
Replace("#VSIX_VERSION#", $VsixVersion).
Replace("#VSVSIX_VERSION#", $VsVsixVersion).
Replace("#SEMVER_VERSION#", $SemverVersion).
Replace("#ENABLE_TELEMETRY#", $Telemetry)
} `
Expand All @@ -65,7 +65,8 @@ Get-ChildItem -Recurse *.v.template `
If ($Env:ASSEMBLY_VERSION -eq $null) { $Env:ASSEMBLY_VERSION ="$AssemblyVersion" }
If ($Env:NUGET_VERSION -eq $null) { $Env:NUGET_VERSION ="$NuGetVersion" }
If ($Env:SEMVER_VERSION -eq $null) { $Env:SEMVER_VERSION ="$SemverVersion" }
If ($Env:VSIX_VERSION -eq $null) { $Env:VSIX_VERSION ="$VsixVersion" }
If ($Env:VSVSIX_VERSION -eq $null) { $Env:VSVSIX_VERSION ="$VsVsixVersion" }
Write-Host "##vso[task.setvariable variable=VsVsix.Version]$VsVsixVersion"

Push-Location (Join-Path $PSScriptRoot 'src/QsCompiler/Compiler')
.\FindNuspecReferences.ps1;
Expand Down
Binary file added build/assets/qdk-nuget-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions build/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ function Build-One {
-c $Env:BUILD_CONFIGURATION `
-v $Env:BUILD_VERBOSITY `
@args `
/property:Version=$Env:ASSEMBLY_VERSION
/property:Version=$Env:ASSEMBLY_VERSION `
/property:InformationalVersion=$Env:SEMVER_VERSION

if ($LastExitCode -ne 0) {
Write-Host "##vso[task.logissue type=error;]Failed to build $project."
Expand Down Expand Up @@ -83,7 +84,8 @@ function Build-VS() {
msbuild VisualStudioExtension.sln `
/property:Configuration=$Env:BUILD_CONFIGURATION `
@args `
/property:AssemblyVersion=$Env:ASSEMBLY_VERSION
/property:AssemblyVersion=$Env:ASSEMBLY_VERSION `
/property:InformationalVersion=$Env:SEMVER_VERSION

if ($LastExitCode -ne 0) {
throw
Expand Down Expand Up @@ -125,4 +127,3 @@ if (-not $all_ok) {
} else {
exit 0
}

2 changes: 1 addition & 1 deletion build/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ trigger:

variables:
Build.Major: 0
Build.Minor: 11
Build.Minor: 12
Assembly.Version: $(Build.BuildNumber)
Assembly.Constants: ''
Drops.Dir: $(Build.ArtifactStagingDirectory)/drops
Expand Down
8 changes: 4 additions & 4 deletions build/init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ steps:
# Pre-reqs
##
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 5.2.0'
displayName: 'Use NuGet 5.6.0'
inputs:
versionSpec: '5.2.0'
versionSpec: '5.6.0'

- task: UseDotNet@2
displayName: 'Use .NET Core SDK 3.1.100'
displayName: 'Use .NET Core SDK 3.1.300'
inputs:
packageType: sdk
version: '3.1.100'
version: '3.1.300'

- task: Npm@1
displayName: 'Install vsce'
Expand Down
9 changes: 5 additions & 4 deletions build/pack.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,16 @@ function Pack-SelfContained() {
} else {
$args = @();
}
$ArchivePath = Join-Path $ArchiveDir "$BaseName-$DotNetRuntimeID-$Env:ASSEMBLY_VERSION.zip";
$ArchivePath = Join-Path $ArchiveDir "$BaseName-$DotNetRuntimeID-$Env:SEMVER_VERSION.zip";
dotnet publish (Join-Path $PSScriptRoot $Project) `
-c $Env:BUILD_CONFIGURATION `
-v $Env:BUILD_VERBOSITY `
--self-contained `
--runtime $DotNetRuntimeID `
--output $TargetDir `
@args `
/property:Version=$Env:ASSEMBLY_VERSION
/property:Version=$Env:ASSEMBLY_VERSION `
/property:InformationalVersion=$Env:SEMVER_VERSION
Write-Host "##[info]Writing self-contained deployment to $ArchivePath..."
Compress-Archive `
-Force `
Expand Down Expand Up @@ -186,7 +187,8 @@ function Pack-VS() {
msbuild QsharpVSIX.csproj `
/t:CreateVsixContainer `
/property:Configuration=$Env:BUILD_CONFIGURATION `
/property:AssemblyVersion=$Env:ASSEMBLY_VERSION
/property:AssemblyVersion=$Env:ASSEMBLY_VERSION `
/property:InformationalVersion=$Env:SEMVER_VERSION

if ($LastExitCode -ne 0) {
throw
Expand Down Expand Up @@ -235,4 +237,3 @@ if (-not $all_ok) {
} else {
exit 0
}

2 changes: 1 addition & 1 deletion build/steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ steps:
condition: and(succeeded(), ne(variables['Enable.VSIX'], 'false'))
inputs:
solution: '$(System.DefaultWorkingDirectory)/VisualStudioExtension.sln'
msbuildArgs: >
msbuildArgs: >-
/p:DefineConstants=$(Assembly.Constants)
/p:AssemblyVersion=$(Assembly.Version)
configuration: $(Build.Configuration)
Expand Down
4 changes: 2 additions & 2 deletions build/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ function Test-One {
-v $Env:BUILD_VERBOSITY `
--logger trx `
@args `
/property:Version=$Env:ASSEMBLY_VERSION
/property:Version=$Env:ASSEMBLY_VERSION `
/property:InformationalVersion=$Env:SEMVER_VERSION

if ($LastExitCode -ne 0) {
Write-Host "##vso[task.logissue type=error;]Failed to test $project."
Expand All @@ -44,4 +45,3 @@ if (-not $all_ok)
{
throw "Running tests failed. Check the logs."
}

8 changes: 8 additions & 0 deletions omnisharp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"FormattingOptions": {
"enableEditorConfigSupport": true
},
"RoslynExtensionsOptions": {
"enableAnalyzersSupport": true
}
}
4 changes: 2 additions & 2 deletions src/Common/DelaySign.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
internal static class SigningConstants
{
#if SIGNED
public const string PUBLIC_KEY = ", PublicKey=" +
public const string PublicKey = ", PublicKey=" +
"002400000c800000140100000602000000240000525341310008000001000100613399aff18ef1" +
"a2c2514a273a42d9042b72321f1757102df9ebada69923e2738406c21e5b801552ab8d200a65a2" +
"35e001ac9adc25f2d811eb09496a4c6a59d4619589c69f5baf0c4179a47311d92555cd006acc8b" +
Expand All @@ -22,6 +22,6 @@ internal static class SigningConstants
"02d5efcdeae953658d3452561b5f36c542efdbdd9f888538d374cef106acf7d93a4445c3c73cd9" +
"11f0571aaf3d54da12b11ddec375b3";
#else
public const string PUBLIC_KEY = "";
public const string PublicKey = "";
#endif
}
11 changes: 11 additions & 0 deletions src/Common/stylecop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
"settings": {
"orderingRules": {
"usingDirectivesPlacement": "preserve"
},
"documentationRules": {
"documentInternalElements": false
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<package>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>Microsoft.Quantum.ProjectTemplates</id>
<version>$version$</version>
Expand All @@ -9,7 +9,7 @@

<license type="expression">MIT</license>
<projectUrl>https://docs.microsoft.com/en-us/quantum</projectUrl>
<iconUrl>https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png</iconUrl>
<icon>images\qdk-nuget-icon.png</icon>

<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>.NET Core templates pack for Q#, part of the Microsoft Quantum Development Kit.</description>
Expand All @@ -25,7 +25,8 @@
</metadata>

<files>
<file src="**" target="content" exclude="**\bin\**;**\obj\**;**\*.v.template;*.nuspec" />
<file src="**" target="content" exclude="**\bin\**;**\obj\**;**\*.v.template;*.nuspec;*.png" />
<file src="..\..\build\assets\qdk-nuget-icon.png" target="images" />
</files>

</package>
14 changes: 8 additions & 6 deletions src/QsCompiler/CommandLineTool/CommandLineTool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PackageReleaseNotes>See: https://docs.microsoft.com/en-us/quantum/relnotes/</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/Microsoft/qsharp-compiler</PackageProjectUrl>
<PackageIconUrl>https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png</PackageIconUrl>
<PackageIcon>qdk-nuget-icon.png</PackageIcon>
<PackageTags>Quantum Q# Qsharp</PackageTags>
<PackAsTool>true</PackAsTool>
<ToolCommandName>qsc</ToolCommandName>
Expand All @@ -26,11 +26,8 @@

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.6.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="3.3.1" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.3.1" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.3.1" />
<PackageReference Include="Microsoft.CodeAnalysis.Features" Version="3.3.1" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="3.3.1" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.6.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.164" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand All @@ -42,8 +39,13 @@
</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="..\..\Common\stylecop.json" Link="stylecop.json" />
<Content Include="..\..\..\NOTICE.txt" Link="NOTICE.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<None Include="..\..\..\build\assets\qdk-nuget-icon.png" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>
</Project>
Loading