1. 10 8月, 2019 1 次提交
    • J
      Move to new ilasm version · c04a0377
      Jared Parsons 提交于
      The latest version of ilasm produced by coreclr is now a fully
      independent executable; it no longer depends on having a full runtime
      laid down next to it.
      
      This means we can vastly simplify how it is deployde in our
      infrastructure. The package can now be included and have ilasm manually
      copied out. This is similar to the approach that we take for our
      diasymreader native dependencies.
      
      closes #37582
      related #25930, #25144
      c04a0377
  2. 07 8月, 2019 1 次提交
    • J
      Fix our MSB3270 warnings · e75dd56e
      Jared Parsons 提交于
      There are a few parts to this change:
      
      1. Ensure that MSB3270 and MSB3277 warnings are promoted to errors in CI
      and hence block merging.
      1. Move our DiaSymReader.Native logic into a separate targets file.
      This resource cannot be consumed with a simple package reference but
      rather requires a package reference and custom logic to pull out the
      contained binaries. This logic used to be spread through our build. Now
      it's in a single place.
      1. Remove the x86 bootstrapping logic. This was testing a pretty obscure
      scenario and the cost of maintaining that logic is siginificant at this
      point. Can bring back if we ever find a bug in this area.
      
      The root cause of the MSB3270 warnings is a subtle change in the SDK. It
      now passes the runtime graph to NuGet for native assets. In the case of
      DiaSymReader.Native there are runtime specific assets hence the SDK /
      NuGet had to pick one for framework projects. This eventually lead to
      `PlatformTarget` being set to x86 where it shoud have been AnyCPU.
      
      Part of the change includes adding `ExcludeAssets=all` to the package
      reference which means they no longer figure into this logic and hence
      the binaries are marked as AnyCPU.
      
      This regression in behavior is being tracked by
      https://github.com/dotnet/sdk/issues/3495
      e75dd56e
  3. 27 7月, 2019 1 次提交
    • T
      IDE EnC support for all C# 8.0 features (#37173) · 12b370dc
      Tomáš Matoušek 提交于
      * Report rude edits when updating method containing switch expression.
      
      Fix stackalloc rude edits.
      
      * Updating modifiers of local functions
      
      * await foreach, await using
      
      * Improve error message
      
      * Distinguish async foreach/using from synchronous in error messages
      
      * Using declaration
      
      * Report rude edit when editing using statement/declaration around non-leaf AS
      
      * Rude edits for switch with patterns
      
      * Fix VB issues with active statements in nested single-line functions and when updating iterators
      
      * Update comment
      
      * Fix duplicate rude edit
      12b370dc
  4. 26 7月, 2019 2 次提交
  5. 25 7月, 2019 1 次提交
  6. 24 7月, 2019 1 次提交
  7. 17 7月, 2019 3 次提交
    • C
    • F
      Add nullable context api definitions (#37017) · 73c70055
      Fred Silberberg 提交于
      Adds a public API, `NullableContext GetNullableContext(int position)`, for determining the nullable context at a particular file location, and types supporting that API.
      73c70055
    • T
      Fix EnC debug information emitted for patterns (#37239) · 5739c71b
      Tomáš Matoušek 提交于
      * Fix EnC debug information emitted for patterns
      
      Update calculation of syntax offset to account for a new case when a node (a switch expression) that is associated with a variable, closure or lambda may share start offset with other node of the same kind (`expr switch { … } switch { … }`). Use the offset of the `switch` keyword instead of the starting offset of the expression to disambiguate.
      
      Assign ordinals to variables synthesized for storing pattern values across cases. This is required to support complex patterns since we can no longer rely on the type of these variables to be distinct. This will require follow up in the IDE to disallow updating/adding/reordering the case clauses of switch expression which there an active statement is present within the switch statement. If the cases are unmodified the compiler guarantees that the order in which the synthesized variables are generated remains the same, so we can map the variables using their ordinal.
      
      Mark all variables synthesized during lowering of switch expression as short-lived. Their lifespan is limited to the switch expression, which does not include a sequence point.
      
      Disallow editing methods that contain switch expression. This is necessary until bugs https://github.com/dotnet/roslyn/issues/37232, https://github.com/dotnet/roslyn/issues/37237 are fixed.
      
      * Feedback
      
      * Update tests
      5739c71b
  8. 13 7月, 2019 2 次提交
  9. 12 7月, 2019 2 次提交
  10. 03 7月, 2019 1 次提交
  11. 28 6月, 2019 3 次提交
  12. 26 6月, 2019 2 次提交
  13. 22 6月, 2019 1 次提交
  14. 21 6月, 2019 1 次提交
  15. 20 6月, 2019 1 次提交
  16. 19 6月, 2019 1 次提交
  17. 18 6月, 2019 1 次提交
  18. 15 6月, 2019 1 次提交
  19. 12 6月, 2019 1 次提交
  20. 11 6月, 2019 1 次提交
  21. 07 6月, 2019 1 次提交
  22. 05 6月, 2019 1 次提交
  23. 03 6月, 2019 2 次提交
  24. 02 6月, 2019 1 次提交
  25. 01 6月, 2019 1 次提交
  26. 31 5月, 2019 2 次提交
    • S
    • M
      Add new analyzer API (DiagnosticSuppressor) to allow programmatic suppression... · f2f7a069
      Manish Vasani 提交于
      Add new analyzer API (DiagnosticSuppressor) to allow programmatic suppression of analyzer and/or compiler non-error diagnostics
      
      Fixes #20242 and #30172
      
      Detailed design proposal [here](https://gist.github.com/mavasani/fcac17a9581b5c54cef8a689eeec954a).
      
      Added public APIs with documentation comments:
      ```cs
      namespace Microsoft.CodeAnalysis.Diagnostics
      {
          /// <summary>
          /// The base type for diagnostic suppressors that can programmatically suppress analyzer and/or compiler non-error diagnostics.
          /// </summary>
          public abstract class DiagnosticSuppressor : DiagnosticAnalyzer
          {
              // Disallow suppressors from reporting diagnostics or registering analysis actions.
              public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray<DiagnosticDescriptor>.Empty;
      
              public sealed override void Initialize(AnalysisContext context) { }
      
              /// <summary>
              /// Returns a set of descriptors for the suppressions that this suppressor is capable of producing.
              /// </summary>
              public abstract ImmutableArray<SuppressionDescriptor> SupportedSuppressions { get; }
      
              /// <summary>
              /// Suppress analyzer and/or compiler non-error diagnostics reported for the compilation.
              /// This may be a subset of the full set of reported diagnostics, as an optimization for
              /// supporting incremental and partial analysis scenarios.
              /// A diagnostic is considered suppressible by a DiagnosticSuppressor if *all* of the following conditions are met:
              ///     1. Diagnostic is not already suppressed in source via pragma/suppress message attribute.
              ///     2. Diagnostic's <see cref="Diagnostic.DefaultSeverity"/> is not <see cref="DiagnosticSeverity.Error"/>.
              ///     3. Diagnostic is not tagged with <see cref="WellKnownDiagnosticTags.NotConfigurable"/> custom tag.
              /// </summary>
              public abstract void ReportSuppressions(SuppressionAnalysisContext context);
          }
      
          /// <summary>
          /// Provides a description about a programmatic suppression of a <see cref="Diagnostic"/> by a <see cref="DiagnosticSuppressor"/>.
          /// </summary>
          public sealed class SuppressionDescriptor : IEquatable<SuppressionDescriptor>
          {
              /// <summary>
              /// An unique identifier for the suppression.
              /// </summary>
              public string Id { get; }
      
              /// <summary>
              /// Identifier of the suppressed diagnostic, i.e. <see cref="Diagnostic.Id"/>.
              /// </summary>
              public string SuppressedDiagnosticId { get; }
      
              /// <summary>
              /// A localizable description about the suppression.
              /// </summary>
              public LocalizableString Description { get; }
          }
      
          /// <summary>
          /// Context for suppressing analyzer and/or compiler non-error diagnostics reported for the compilation.
          /// </summary>
          public struct SuppressionAnalysisContext
          {
              /// <summary>
              /// Suppressible analyzer and/or compiler non-error diagnostics reported for the compilation.
              /// This may be a subset of the full set of reported diagnostics, as an optimization for
              /// supporting incremental and partial analysis scenarios.
              /// A diagnostic is considered suppressible by a DiagnosticSuppressor if *all* of the following conditions are met:
              ///     1. Diagnostic is not already suppressed in source via pragma/suppress message attribute.
              ///     2. Diagnostic's <see cref="Diagnostic.DefaultSeverity"/> is not <see cref="DiagnosticSeverity.Error"/>.
              ///     3. Diagnostic is not tagged with <see cref="WellKnownDiagnosticTags.NotConfigurable"/> custom tag.
              /// </summary>
              public ImmutableArray<Diagnostic> ReportedDiagnostics { get; }
      
              /// <summary>
              /// Report a <see cref="Suppression"/> for a reported diagnostic.
              /// </summary>
              public void ReportSuppression(Suppression suppression);
      
              /// <summary>
              /// Gets a <see cref="SemanticModel"/> for the given <see cref="SyntaxTree"/>, which is shared across all analyzers.
              /// </summary>
              public SemanticModel GetSemanticModel(SyntaxTree syntaxTree);
      
              /// <summary>
              /// <see cref="CodeAnalysis.Compilation"/> for the context.
              /// </summary>
              public Compilation Compilation { get; }
      
              /// <summary>
              /// Options specified for the analysis.
              /// </summary>
              public AnalyzerOptions Options { get; }
      
              /// <summary>
              /// Token to check for requested cancellation of the analysis.
              /// </summary>
              public CancellationToken CancellationToken { get; }
          }
      
          /// <summary>
          /// Programmatic suppression of a <see cref="Diagnostic"/> by a <see cref="DiagnosticSuppressor"/>.
          /// </summary>
          public struct Suppression
          {
              /// <summary>
              /// Creates a suppression of a <see cref="Diagnostic"/> with the given <see cref="SuppressionDescriptor"/>.
              /// </summary>
              /// <param name="descriptor">
              /// Descriptor for the suppression, which must be from <see cref="DiagnosticSuppressor.SupportedSuppressions"/>
              /// for the <see cref="DiagnosticSuppressor"/> creating this suppression.
              /// </param>
              /// <param name="suppressedDiagnostic">
              /// <see cref="Diagnostic"/> to be suppressed, which must be from <see cref="SuppressionAnalysisContext.ReportedDiagnostics"/>
              /// for the suppression context in which this suppression is being created.</param>
              public static Suppression Create(SuppressionDescriptor descriptor, Diagnostic suppressedDiagnostic);
      
              /// <summary>
              /// Descriptor for this suppression.
              /// </summary>
              public SuppressionDescriptor Descriptor { get; }
      
              /// <summary>
              /// Diagnostic suppressed by this suppression.
              /// </summary>
              public Diagnostic SuppressedDiagnostic { get; }
          }
      }
      ```
      
      For batch compilation, suppressors always run after all the analyzer diagnostics have been computed.
      For IDE partial/incremental analysis scenario, we may run the suppressors with partial diagnostics.
      Suppressed diagnostics from diagnostic suppressors are equivalent to source suppressed diagnostics: they show up in the error list with "Suppression State" column as "Suppressed" and are also output to errorlog as suppressed diagnostics.
      f2f7a069
  27. 30 5月, 2019 1 次提交
  28. 21 5月, 2019 1 次提交
  29. 16 5月, 2019 1 次提交
  30. 14 5月, 2019 1 次提交