Commit Graph

8329 Commits

Author SHA1 Message Date
Cornelius Riemenschneider
71372bc74c C#: Add Bazel-based build system.
This commits a bazel-based build system for C#
using `rules_dotnet`. External dependencies are managed
via `paket`, and updates to the generated bazel files
are done via `./update-deps.sh`.
We're providing our own (minimal) test runner for `xunit`
tests.
2024-05-21 09:14:13 +02:00
Tamas Vajk
cecaa0de3a C#: Clear possibly inherited Directory.Build.props and Directory.Build.targets in stub generator 2024-05-21 08:55:19 +02:00
Tamas Vajk
6da0592ab6 C#: Refactor common msbuild properties 2024-05-21 08:55:12 +02:00
Tom Hvitved
d9019f9676 C#: Fix performance issue in EntityFramework modelling 2024-05-21 08:53:51 +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
Michael Nebel
e198d0105f C#: Re-factor the model generator tests. 2024-05-17 09:44:58 +02:00
Michael Nebel
adeff8c602 C#: Convert neutral capture test to inline expectation. 2024-05-17 09:44:58 +02:00
Michael Nebel
e3b6ee1aaf C#: Convert type based summary capture test to inline expectation. 2024-05-17 09:44:58 +02:00
Michael Nebel
a5fd433c20 C#: Convert sink capture test to inline expectation. 2024-05-17 09:44:58 +02:00
Michael Nebel
26f9297d62 C#: Convert source capture test to inline expectation. 2024-05-17 09:44:58 +02:00
Michael Nebel
404b39b6e6 C#: Convert summary capture test to inline expectation. 2024-05-17 09:44:57 +02:00
Michael Nebel
2cda1a207e C#: Add language specific part of the models as data inline expectation. 2024-05-17 09:44:57 +02:00
Michael Nebel
e483948c19 Merge pull request #16513 from michaelnebel/csharp/flowsummariestest
C#: Change the printed information in the Flow summaries tests.
2024-05-17 09:43:28 +02:00
Chanel Young
5ee7004a62 fp case if encrypt set in initializer 2024-05-16 17:59:17 -07:00
Tamas Vajk
a79105e2ae C#: Use nuget.exe from the executing machine instead of always downloading it 2024-05-16 23:15:04 +02:00
Michael Nebel
18fc92247b C#: Update flowsummaries expected output. 2024-05-16 15:09:04 +02:00
Michael Nebel
763d53afed C#: Remove the override and ext column from the summaries printing test. 2024-05-16 15:08:45 +02:00
Cornelius Riemenschneider
47f679dc34 C#: Remove version constraints on most dependencies.
This means that `dotnet paket update` will pull in the
latest matching versions of all dependencies, except
the pinned roslyn versions.
GitInfo also remains pinned, as we're removing that
dependency when converting the build to bazel anyways.

This removes a whole bunch of transitive dependencies
we no longer need, resulting in a smaller distribution,
and hopefully a smaller build.
2024-05-16 13:51:36 +02:00
Cornelius Riemenschneider
8dc9c95be4 Merge pull request #16376 from github/criemen/dotnet-paket
C#/C++: Convert C# code to use `paket` package manager
2024-05-16 13:45:25 +02:00
Cornelius Riemenschneider
74e446ea3b Paket/C#: Only pull in the tool restore targt via InitialTargets. 2024-05-16 11:42:20 +02:00
Tamas Vajk
62faab320b C#: Pin dotnet SDK version in integration test relying on razor source generator 2024-05-16 09:00:53 +02:00
Cornelius Riemenschneider
1b22e0879a Paket/C#: Automatically restore tools for CSharp.sln.
This is not a general fix, as we not always build the
solution file, but this should improve the DX for
local developers that use the solution file.
2024-05-15 21:51:33 +02:00
Cornelius Riemenschneider
950e8c85e7 Paket: Prevent recursion into ql/csharp/ql directory. 2024-05-15 14:17:04 +02:00
Cornelius Riemenschneider
a158e40cc2 MSBuild: Move paket restore target inclusion to global file. 2024-05-15 14:17:02 +02:00
Cornelius Riemenschneider
8f207e7a06 Add dotnet tool restore to local CI. 2024-05-15 14:16:47 +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
723850394d Add paket files to .gitignore. 2024-05-15 13:28:03 +02:00
Cornelius Riemenschneider
f1616d3c26 Add auto-generated paket restore targets. 2024-05-15 13:28:01 +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
4a85cc98e5 C#: Add tool file for paket. 2024-05-15 13:27:56 +02:00
Cornelius Riemenschneider
ab7d30a464 Merge branch 'main' into criemen/move-win-autobuilder 2024-05-15 10:58:01 +02:00
github-actions[bot]
32e8b5c667 Post-release preparation for codeql-cli-2.17.3 2024-05-14 21:14:08 +00:00
github-actions[bot]
100166fa53 Release preparation for version 2.17.3 2024-05-14 19:23:18 +00: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
Michael Nebel
79c6834aa3 Merge pull request #16374 from michaelnebel/java/narrowsuperimpl
Java: Improve finding best type for models and lifting.
2024-05-14 13:12:04 +02:00
Joe Farebrother
a62ce4c51d Merge pull request #16461 from joefarebrother/csharp-missing-cwe-metadata
C#: Add missing CWE tags
2024-05-14 09:32:06 +01:00
Joe Farebrother
513a319149 Change cwe to 348 2024-05-13 22:38:47 +01:00
Chuan-kai Lin
372746ffd4 Merge pull request #16419 from github/cklin/csharp-entities-reorder
C#: Use entities in reorder directives
2024-05-13 10:25:50 -07:00
Joe Farebrother
20a1e22c44 Add missing CWE tags 2024-05-09 10:33:48 +01:00
Michael Nebel
f00ad7c0e7 C#/Java: Invert api filtering logic. 2024-05-08 14:42:53 +02:00
Michael Nebel
cfb0a862c1 Merge pull request #16356 from michaelnebel/csharp/aligntelemetryimplementation
C#: Base telemetry Api Source/Sink nodes on abstract classes.
2024-05-07 09:16:38 +02:00
Michael Nebel
757cf8d43a C#: Fix a comment typo. 2024-05-06 16:48:31 +02:00
Tom Hvitved
6233da3e40 Merge pull request #16399 from hvitved/csharp/unique-get-location
C#: Make `Element.getLocation` (mostly) functional
2024-05-05 20:18:19 +02:00
Chuan-kai Lin
077a2e3479 C#: Use entities in reorder directives 2024-05-03 11:15:42 -07:00
Tom Hvitved
3c91333d0b Address review comment 2024-05-03 14:09:41 +02:00
Michael Nebel
e64a2d6c9c C#: Align telemetry implementation with Java. 2024-05-03 12:48:14 +02:00
Tamás Vajk
f99cb3f649 Merge pull request #16396 from tamasvajk/buildless/opt-out-feed-check
C#: Change nuget feed responsiveness checking to be opt-out
2024-05-02 15:04:28 +02:00
Tamás Vajk
dfdd79d8cf Merge pull request #16395 from tamasvajk/buildless/logs1
C#: Add file path to log messages in assets.json parsing
2024-05-02 15:03:57 +02:00