Skip to content

Commit 4cc75c5

Browse files
authored
Merge pull request #14564 from michaelnebel/csharp/cildefaultfalse
C#: Disable CIL extraction by default.
2 parents ff6b8c4 + cd4a546 commit 4cc75c5

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

csharp/extractor/Semmle.Extraction.Tests/Options.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public void DefaultOptions()
2222
{
2323
options = CSharp.Options.CreateWithEnvironment(Array.Empty<string>());
2424
Assert.True(options.Cache);
25-
Assert.True(options.CIL);
25+
Assert.False(options.CIL);
2626
Assert.Null(options.Framework);
2727
Assert.Null(options.CompilerName);
2828
Assert.Empty(options.CompilerArguments);
@@ -52,7 +52,7 @@ public void Cache()
5252
public void CIL()
5353
{
5454
options = CSharp.Options.CreateWithEnvironment(Array.Empty<string>());
55-
Assert.True(options.CIL);
55+
Assert.False(options.CIL);
5656

5757
Environment.SetEnvironmentVariable("CODEQL_EXTRACTOR_CSHARP_OPTION_CIL", "false");
5858
options = CSharp.Options.CreateWithEnvironment(Array.Empty<string>());
@@ -64,7 +64,7 @@ public void CIL()
6464

6565
Environment.SetEnvironmentVariable("CODEQL_EXTRACTOR_CSHARP_OPTION_CIL", null);
6666
options = CSharp.Options.CreateWithEnvironment(Array.Empty<string>());
67-
Assert.True(options.CIL);
67+
Assert.False(options.CIL);
6868
}
6969

7070
[Fact]

csharp/extractor/Semmle.Extraction/Options.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public abstract class CommonOptions : ICommandLineOptions
2828
/// <summary>
2929
/// Holds if CIL should be extracted.
3030
/// </summary>
31-
public bool CIL { get; private set; } = true;
31+
public bool CIL { get; private set; } = false;
3232

3333
/// <summary>
3434
/// Holds if assemblies shouldn't be extracted twice.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* CIL extraction is now disabled by default. It is still possible to turn on CIL extraction by setting the `cil` extractor option to `true` or by setting the environment variable `$CODEQL_EXTRACTOR_CSHARP_OPTION_CIL` to `true`. This is the first step towards sun-setting the CIL extractor entirely.

0 commit comments

Comments
 (0)