Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into merge-main
Browse files Browse the repository at this point in the history
* upstream/main: (71 commits)
  Fix after merge
  PR feedback
  Bump Roslyn version
  Moving formatting service to common layer (dotnet#10761)
  Move GetSyntaxTree to document snapshot
  Inject file path service into the document snapshot
  Remove code document parameter and just use document snapshot
  Update NOTICE.txt (dotnet#10768)
  Allow @@ as a fallback (dotnet#10752)
  Rework how we get generated documents
  Directly test the component definition service in cohosting
  Add missing test case
  Defer to C# for component attribute GTD in cohosting
  Allow LSP and cohosting to provide specialized methods to get a syntax tree for a C# document
  Dev Container (dotnet#10751)
  Use a proper Try pattern
  Add tests for co-hosted GTD
  Rework IDocumentPositionInfoStrategy and use correctly in co-hosted GTD
  Add DocumentMappingSerice to RazorDocumentServiceBase
  Move IDocumentPositionInfoStrategy and friends to Workspaces layer
  ...
  • Loading branch information
333fred committed Aug 22, 2024
2 parents fef2d1c + fc8332f commit 35871e3
Show file tree
Hide file tree
Showing 261 changed files with 10,364 additions and 8,412 deletions.
19 changes: 19 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0

ARG DOTNET_SDK_INSTALL_URL=https://dot.net/v1/dotnet-install.sh
# Install the correct Roslyn SDK into the same directory that the base image installs the SDK in.
ENV DOTNET_INSTALL_DIR=/usr/share/dotnet

# Copy the global.json file so its available in the image before the repo is cloned
COPY global.json /tmp/

RUN cd /tmp \
&& curl --location --output dotnet-install.sh "${DOTNET_SDK_INSTALL_URL}" \
&& chmod +x dotnet-install.sh \
&& mkdir -p "${DOTNET_INSTALL_DIR}" \
&& ./dotnet-install.sh --jsonfile "./global.json" --install-dir "${DOTNET_INSTALL_DIR}" \
&& rm dotnet-install.sh

# Set up machine requirements to build the repo
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends curl git
60 changes: 60 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/dotnetcore
{
"name": "Razor DevContainer",
"build": {
"dockerfile": "Dockerfile",
// Set the context to the workspace folder to allow us to copy files from it.
"context": ".."
},
"customizations": {
"vscode": {
"settings": {
"files.associations": {
"*.csproj": "msbuild",
"*.fsproj": "msbuild",
"*.globalconfig": "ini",
"*.manifest": "xml",
"*.nuspec": "xml",
"*.pkgdef": "ini",
"*.projitems": "msbuild",
"*.props": "msbuild",
"*.resx": "xml",
"*.rsp": "Powershell",
"*.ruleset": "xml",
"*.settings": "xml",
"*.shproj": "msbuild",
"*.slnf": "json",
"*.targets": "msbuild",
"*.vbproj": "msbuild",
"*.vsixmanifest": "xml",
"*.vstemplate": "xml",
"*.xlf": "xml",
"*.yml": "azure-pipelines"
},
// ms-dotnettools.csharp settings
"omnisharp.disableMSBuildDiagnosticWarning": true,
"omnisharp.enableEditorConfigSupport": true,
"omnisharp.enableImportCompletion": true,
"omnisharp.useModernNet": true,
"omnisharp.enableAsyncCompletion": true,
// ms-dotnettools.csdevkit settings
"dotnet.defaultSolution": "Razor.sln",
// ms-vscode.powershell settings
"powershell.promptToUpdatePowerShell": false,
"powershell.integratedConsole.showOnStartup": false,
"powershell.startAutomatically": false,
// ms-azure-devops.azure-pipelines settings
},
"extensions": [
"ms-dotnettools.csharp",
"ms-dotnettools.csdevkit",
"EditorConfig.EditorConfig",
"ms-vscode.powershell",
"tintoy.msbuild-project-tools",
"ms-azure-devops.azure-pipelines"
]
}
},
"postCreateCommand": "${containerWorkspaceFolder}/restore.sh"
}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
},
"dotnet.defaultSolution": "Razor.sln",
"omnisharp.defaultLaunchSolution": "Razor.sln",
"files.encoding": "utf8bom"
"files.encoding": "utf8bom",
"dotnet.testWindow.disableBuildOnRefresh": true
}
73 changes: 49 additions & 24 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,52 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "ActivateDotnet",
"type": "shell",
"windows": {
"command": "echo",
"args": [
"Skipping activation on windows"
]
},
"linux": {
"command": "source",
"args": [
"activate.sh"
],
"options": {
"cwd": "${workspaceFolder}"
},
"presentation": {
"reveal": "silent"
}
},
"version": "2.0.0",
"tasks": [
{
"label": "ActivateDotnet",
"type": "shell",
"windows": {
"command": "echo",
"args": [
"Skipping activation on windows"
]
},
"linux": {
"command": "source",
"args": [
"activate.sh"
],
"options": {
"cwd": "${workspaceFolder}"
},
]
"presentation": {
"reveal": "silent"
}
},
},
{
"label": "build.sh",
"command": "./build.sh",
"type": "shell",
"args": [
],
"windows": {
"command": "${workspaceFolder}/build.cmd",
},
"problemMatcher": "$msCompile",
"group": "build"
},
{
"label": "build Rasor.Slim.slnf",
"command": "dotnet",
"type": "shell",
"args": [
"build",
"-p:RunAnalyzersDuringBuild=false",
"-p:GenerateFullPaths=true",
"Razor.Slim.slnf"
],
"problemMatcher": "$msCompile",
"group": "build"
}
]
}
8 changes: 8 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,13 @@
<PackageVersion Include="xunit.extensibility.execution" Version="$(_XunitPackageVersion)" />
<PackageVersion Include="xunit.runner.utility" Version="2.4.1" />
<PackageVersion Include="Xunit.StaFact" Version="1.2.46-alpha" />

<!--
These package references exist solely to fix component governance issues. Referencing them here
at the appropriate version, in combination with using CentralPackageTransitivePinningEnabled, will
ensure the correct version is used in all places
-->
<PackageVersion Include="Microsoft.IO.Redist" Version="6.0.1" />
<PackageVersion Include="System.Formats.Asn1" Version="8.0.1" />
</ItemGroup>
</Project>
Loading

0 comments on commit 35871e3

Please sign in to comment.