Commit Graph

242 Commits

Author SHA1 Message Date
Tamas Vajk
91aa182d53 C#: Fix TSP diagnostic message 2024-05-22 08:49:55 +02:00
Cornelius Riemenschneider
a6ce24dc39 C#: Reformat project files with paket.
When running `dotnet paket update` or `dotnet paket install`, `paket`
forcefully reformats the project files. This is unfortunate.
One option is to accept these changes, as they're not harmful.
They do mean that each project includes the Paket restore targets individually,
instead of doing so via `Directory.Build.targets`.
Another option would be to not merge this PR, and then I'll document that
the changes to the csproj files should be ignored when running `paket` instead.
I don't really mind either way.
2024-05-17 12:19:53 +02:00
Cornelius Riemenschneider
a158e40cc2 MSBuild: Move paket restore target inclusion to global file. 2024-05-15 14:17:02 +02:00
Cornelius Riemenschneider
3f020a96e4 Remove unused dependency. 2024-05-15 13:37:05 +02:00
Cornelius Riemenschneider
25b7214064 C++: Move Windows autobuilder to paket dependencies. 2024-05-15 13:36:51 +02:00
Cornelius Riemenschneider
45167cf9f1 C#: Switch over dependencies in msbuild files to paket. 2024-05-15 13:28:00 +02:00
Cornelius Riemenschneider
04c26056a1 C#: Commit paket-based dependency tree. 2024-05-15 13:27:58 +02:00
Cornelius Riemenschneider
869bf8afc6 C++/C#: Move the Windows autobuilder into a subfolder in ql/csharp.
This is a necessary preparation for moving the C# dependency management to `paket`,
which in turn is a necessary preparation for moving the C# build to bazel.

As we discovered in https://github.com/github/codeql/pull/16376,
`paket` tries to restore all projects recursively from the root folder.
If we support building C# code under both `ql/csharp` and `ql/cpp`, we need
to have a single lockfile under `ql`, as both codebases share the same set of dependencies
(and utilities from `ql/csharp/extractor`).
Then, `paket` will also try to restore things that look like "C# projects" in other languages'
folders, which is not what we want.
Therefore, we address this by moving all C# code into a common root directory, `ql/csharp`.

This needs an internal PR to adjust the buildsystem to look for the autobuilder in the new location.
2024-05-14 13:45:49 +02:00
Tamás Vajk
7beb73729d Merge pull request #16036 from tamasvajk/autobuilder/disposable
C#: Properly dispose diagnostic writer objects
2024-04-04 08:21:11 +02:00
Tamas Vajk
75894d581c C#: Remove unused classes from Util project 2024-04-03 12:15:37 +02:00
Tamas Vajk
305fa84186 Change IDiagnosticsWriter to implement IDisposable 2024-04-03 10:08:46 +02:00
Tamas Vajk
0f980e2b97 C#: Properly dispose diagnostic writer objects 2024-04-03 09:47:24 +02:00
Tom Hvitved
a8dac17aec Merge pull request #16016 from hvitved/csharp/remove-lgtm-autobuilder-options
C#: Remove support for legacy LGTM options in autobuilder
2024-04-02 10:03:10 +02:00
Tamas Vajk
2f0b54c801 Refactor buildless telemetry logging 2024-03-25 12:48:27 +01:00
Tamas Vajk
b94d33d78d Add buildless failed diagnostic 2024-03-25 12:27:36 +01:00
Tamas Vajk
5ab5244171 Change public messages to not include 'buildless' 2024-03-25 11:59:29 +01:00
Tamas Vajk
178a45af25 C#: Add high level diagnostic messages for buildless extraction (start, success) 2024-03-22 14:27:36 +01:00
Tom Hvitved
9d124197e8 C#: Remove support for legacy LGTM options in autobuilder 2024-03-22 10:09:24 +01:00
Tom Hvitved
a8468a6178 C#: Better handle multiple global.json files 2024-02-29 20:27:52 +01:00
Tom Hvitved
62382fc5a2 C#: Fetch .NET in dependency manager instead of autobuilder 2024-02-29 11:23:36 +01:00
Tom Hvitved
c6426d8858 C#: Move BuildScript.cs and friends to Semmle.Util 2024-02-29 08:49:20 +01:00
Tamas Vajk
20f795c03a Code quality improvements 2024-02-23 11:20:15 +01:00
Tamas Vajk
50f9354ca8 Remove redundant using 2024-02-22 17:14:02 +01:00
Tamas Vajk
e176b32a83 Remove environment dictionary passing 2024-02-22 17:12:38 +01:00
Tamas Vajk
648c06ce27 Simplify dotnet SDK check in autobuilder 2024-02-22 16:44:46 +01:00
Tamas Vajk
c0d82cb73e Minor improvement to not start dotnet process when it is known to fail 2024-02-22 14:58:00 +01:00
Tamas Vajk
8e64880e86 Fix and add unit tests 2024-02-22 14:27:28 +01:00
Tamas Vajk
976c627d52 C#: Download latest dotnet SDK when missing 2024-02-22 12:07:15 +01:00
Tamás Vajk
70a2d16b1a Merge pull request #15600 from tamasvajk/buildless/no-mono-dlls
C# Change desktop dotnet assembly lookup to fall back to nuget reference assemblies
2024-02-21 08:36:41 +01:00
Tamas Vajk
b3f5beb076 C#: Use nameof in nullability attributes 2024-02-20 10:05:39 +01:00
Tamas Vajk
f8b29ad70e Introduce environment variable to specify framework assembly locations 2024-02-16 11:54:19 +01:00
Tamas Vajk
4608550e48 C#: Disable msbuild node reuse in autobuild 2024-01-31 16:14:40 +01:00
Tamas Vajk
3d25ebc13c Revert "C#: Add /nodeReuse:false to autobuild build command"
This reverts commit bcee901fbd.
2024-01-31 16:12:21 +01:00
Tamas Vajk
bcee901fbd C#: Add /nodeReuse:false to autobuild build command 2024-01-31 14:12:49 +01:00
Tamas Vajk
b8c8f52efc C#: Introduce extractor option for logging verbosity 2024-01-25 17:20:47 +01:00
Henry Mercer
0928c93989 Use TryGetValue 2024-01-23 20:43:19 +00:00
Henry Mercer
e73c1b7281 Be forgiving with casing of build mode environment variable 2024-01-23 20:35:43 +00:00
Henry Mercer
a75c8273f9 C#: Allow checking environment variables that may be undefined
The build mode environment variable for instance is only set when a build mode is specified.
2024-01-23 20:33:16 +00:00
Henry Mercer
6724dea54d C#: Enable standalone extraction via --build-mode 2024-01-22 19:12:07 +00:00
Tamas Vajk
dc36cdbede Only delete dotnet-install.sh if not in scratch directory 2023-12-20 10:51:23 +01:00
Tamas Vajk
016d200355 Fix unit tests 2023-12-19 15:14:47 +01:00
Tamas Vajk
ad394a0d84 C#: Download dotnet-install.sh to the scratch dir 2023-12-19 13:11:22 +01:00
Tamas Vajk
21229b93bf C#: Remove unneeded options from standalone extractor 2023-12-13 12:15:56 +01:00
Tom Hvitved
9b043a10cc Merge pull request #15063 from hvitved/csharp/use-scratch-dir
C#: Use `CODEQL_EXTRACTOR_CSHARP_SCRATCH_DIR` instead of `Path.GetTempPath`
2023-12-12 08:16:04 +01:00
Tom Hvitved
866f124a95 C#: Use CODEQL_EXTRACTOR_CSHARP_SCRATCH_DIR instead of Path.GetTempPath 2023-12-11 13:10:46 +01:00
Michael Nebel
c8542e972e C#: Fix compiler warnings. 2023-12-11 10:57:44 +01:00
Michael Nebel
09239ba804 C#: Update NuGet packages. 2023-12-11 10:57:43 +01:00
Michael Nebel
9ab9f2b0e6 C#: Update all project files to use .NET 8 as target framework. 2023-12-11 10:57:43 +01:00
Tamas Vajk
8334c6db91 C#: Do not call nuget.exe on Apple Silicon 2023-11-14 14:50:29 +01:00
Tamas Vajk
5b38ba87df Code quality improvement 2023-11-14 08:08:46 +01:00