1. 04 6月, 2015 13 次提交
  2. 03 6月, 2015 12 次提交
    • D
      Merge pull request #3273 from dpoeschl/FixCIBuilds · 1540509e
      David Poeschl 提交于
      Update stabilization cibuild scripts
      1540509e
    • D
      Update stabilization cibuild scripts · 263210d9
      David Poeschl 提交于
      The cibuild scripts had diverged between stabilization and master. This
      change brings stabilization back in sync with master and makes a small
      change to ensure passing invalid commandline arguments returns a proper
      error code.
      263210d9
    • J
      Deal with solutions with circular project references in MSBuildWorkspace · 4c727592
      Jason Malinowski 提交于
      If we have a solution with circular references, leave one as a metadata
      reference to prevent deadlocks when trying to get compilations.
      4c727592
    • M
      Fix ITypeSymbolExtensions.IsOrDerivedFromExceptionType to handle type... · 3701a7f7
      Manish Vasani 提交于
      Fix ITypeSymbolExtensions.IsOrDerivedFromExceptionType to handle type parameters constrained on Exception type or its subtype
      
      Fixes https://github.com/dotnet/roslyn/issues/3254
      
      User scenario: User writes code where they have explicit casts to a type parameter deriving from Exception type or its subtype. We will offer incorrect cast removal fixes to remove these explicit casts. Removing such casts will cause their code to not compile. Even worse, if they apply a FixAll occurrences code fix, then all such casts across their (document/project/solution) will be removed, causing tons of compile errors.
      
      Fix description: IsOrDerivedFromExceptionType was only checking for base types of the given type symbol to detect if the type is an Exception type. We also need to handle type parameters which are constrained by Exception or its subtypes.
      
      Testing: Added regression tests + existing tests.
      3701a7f7
    • T
      Add unit tests around rule set modification · fa6e63a6
      Tom Meschter 提交于
      Add unit tests to cover modifying rule set documents.
      fa6e63a6
    • T
      Extract code to modify rule sets · 68cfbed6
      Tom Meschter 提交于
      Extract the code to modify rule sets to a helper type.
      68cfbed6
    • A
      Do not cut short binding of “return” statement even if expression has syntax errors. · b2f9d029
      AlekseyTs 提交于
      Addresses DevDiv 1179899.
      b2f9d029
    • D
      Merge pull request #3227 from dpoeschl/PortXamlNavigationEtc · a7ddf2c7
      David Poeschl 提交于
      Pass correct itemIDs to IVsSymbolicNavigationNotify
      a7ddf2c7
    • T
      Be careful removing items from rule sets · e0c54290
      Tom Meschter 提交于
      Fixes #3098.
      
      It is possible to have multiple `<Rule>` elements with the same ID in a
      rule set file, so long as they specify the same Action. This is likely
      to happen with former FxCop rules--you'll end up with one copy under the
      "Microsoft.Analyzers.ManagedCodeAnalysis" analyzer (from FxCop) and one
      under "Microsoft.AnalyzerPowerPack.CSharp" (from a Roslyn-based
      analyzer).
      
      When the user selects one of these rules in Solution Explorer and sets
      the severity to "Default" we need to find each rule with the matching
      ID, and remove them all from the rule set file. However, we remove the
      rules while we're in the middle of the enumeration, tripping up the
      enumerator and leading to `NullReferenceException`s.
      
      The fix is to first flatten the enumeration of items to be removed to a
      list, and then remove them.
      e0c54290
    • A
      Merge pull request #3236 from amcasey/GH3231 · d1fc6e65
      Andrew Casey 提交于
      Loosen check in CapturedVariableRewriter.RewriteParameter
      d1fc6e65
    • A
      Loosen check in CapturedVariableRewriter.RewriteParameter · cbc056c9
      Andrew Casey 提交于
      When we added support for transparent identifiers, we loosened the
      existing check so that they wouldn't be flagged as erroneous.  We should
      have gone further and indicated that all anonymous types (i.e. including
      user-declared ones) are okay.
      
      Because of the way its check is structured, VB is unaffected.
      
      Fixes #3231
      cbc056c9
    • A
      Catch exceptions when creating a stream for signing · d6a8f32b
      Andy Gocke 提交于
      This change is meant to address crashes like the ones in bug 1140649. The
      crashes seem to happen due to exceptions thrown while getting a temporary
      output stream to write the PE file to. I have been unable to reproduce
      the conditions for the crash themselves -- they only seem to happen on
      a Japanese language Windows with a Japanese language copy of Visual Studio.
      This fix addresses their symptom by wrapping the CreateInputStream call
      during signing with a try/catch and then surfacing the exception as a
      diagnostic for signing failure.
      
      We cannot currently add any more localized resources to stabilization, so
      this fix is meant to be as targeted as possible and can only deliver
      information through existing resource strings.
      
      (cherry picked from commit 801a10a5)
      d6a8f32b
  3. 02 6月, 2015 15 次提交
    • R
      Handle "Color color" from VB completion · 8a689715
      Ravi Chande 提交于
      Fixes #3086.
      8a689715
    • D
    • A
      Check current language version for “Global” keyword only if it starts... · 993918f9
      AlekseyTs 提交于
      Check current language version for “Global” keyword only if it starts namespace name in namespace declaration.
      
      Addresses DevDiv 1129404.
      993918f9
    • D
      Add unit tests for Code Model issue with member node keys · fd6c7845
      Dustin Campbell 提交于
      Add unit tests for PR #3242 that correctly trigger the failure when the
      change is not present, but pass when it *is* present.
      fd6c7845
    • M
      Merge pull request #3093 from mavasani/CodeAnalysisAnalyzers · 1d61936d
      Manish Vasani 提交于
      Add an analyzer to catch incorrect usage of CodeAction.Create API for fixers that support FixAllProvider
      1d61936d
    • T
      fb3b7665
    • D
      Code Model: When setting the name of a CodeElement, ensure that its members are updated · 146092ce
      Dustin Campbell 提交于
      Code Model tracks nodes with a "node key" concept, which is effectively
      the full name of an element coupled with an ordinal. When the name of a
      CodeElement is updated, its node key must also be updated since the name
      of the underlying node has changed. However, we had failed to update the
      node keys of any members of that CodeElement, which means that they can
      no longer be located after their parent container's name changes. This
      is now fixed.
      146092ce
    • M
      Merge pull request #3180 from mavasani/vb_additional_file_diagnostics · 6f0a9a0a
      Manish Vasani 提交于
      Handle non-source file diagnostics in the VB command line diagnostic formatter
      6f0a9a0a
    • M
      Symptom: Fix all not available when providing more than one code fix · b5c0889d
      Manish Vasani 提交于
      User scenario: A CodeFixProvider that supports fix all occurrences code fix, gets FixAll support in IDE if it registers a single code action, but disappears as soon as fixer registers multiple code actions.
      
      Reason: A CodeFixProvider that intends to support fix all occurrences must classify the registered code actions into equivalence classes by assigning it an explicit, non-null equivalence key which is unique across all registered code actions by this fixer. This enables the FixAllProvider to fix all diagnostics in the required scope by applying code actions from this fixer that are in the equivalence class of the trigger code action.
      The analyzer added by this change catches violations of this requirement in the code actions registered by a CodeFixProvider that supports FixAllProvider.
      
      Fixes #2864
      b5c0889d
    • A
      Merge pull request #3198 from AlekseyTs/Bug1169533 · 82837c31
      AlekseyTs 提交于
      Ensure SemanticModel reports node as a default instance access rather than as a type reference, when the type reference is reclassified as such.
      82837c31
    • M
      Handle non-source file diagnostics in the VB command line diagnostic formatter · 80ffb872
      Manish Vasani 提交于
      User scenario: User compiles a project with analyzers, and analyzer(s) generates a diagnostic with location in a non-source additional text file, but msbuild doesn't report such analyzer diagnostics and exits with code 1 with no output.
      
      Bug description: For analyzer diagnostics in additional file, VB command line compiler doesn’t output any file information or squiggles. However, it does include the file name and location in the output. This format doesn't match the Vbc MSBuild task parsing logic which expects the output to have either all of this information (file path, location, file content and squiggles) OR none of it for no-location diagnostic. This causes the Vbc task to ignore additional file diagnostics.
      
      Fix description: Fix the VB command line diagnostic formatter to always output diagnostics in either of the above 2 formats expected by MSBuild. For additional file diagnostics, the formatter now attempts to read the additional file stream and if it succeeds, formats it as a source diagnostic with location info and squiggles. Otherwise, it formats it as a no-location project diagnostic.
      
      Testing: Added regression test + existing tests. Also verified that the original issue reported on Roslyn.sln is also fixed by this change.
      80ffb872
    • D
      Pass correct itemIDs to IVsSymbolicNavigationNotify · c1cf2f84
      David Poeschl 提交于
      Partial fix for internal TFS bug #1169405
      
      We previously always passed Nil for all itemidCodeFile parameters in
      IVsSymbolicNavigationNotify to ensure the XAML language service heard
      our request (because their current implementation only processes request
      for Nil or 0-valued itemids.) This caused Go To Definition and Find All
      References to be slower than necessary in non-XAML cases and also
      resulted in unwanted behaviors on certain properties that are referenced
      in XAML.
      
      Our two options for fixing this were to either:
      1. Update our implementation to send the correct item ids for
      heuristically "non-generated" files and send Nil for "generated" files
      (to match the Dev12 behavior)
      2. Always send the actual item ids, even for "generated" files, and
      update the XAML language service to do a fast initial check of the
      corresponding document to see if they're interested in processing it.
      
      This changeset represents the Roslyn half of option 2. Any builds that
      contain this fix but do not contain the corresponding change to the XAML
      language service will see no Go To Definition navigation to .xaml files
      (e.g. when navigating from a reference to a named Button) and no .xaml
      file entries in Find All References.
      
      Unfortunately, this does not remove all heuristics from this algorithm,
      because Roslyn must still decide which itemid to pass in the case of a
      definition spanning multiple documents (e.g. the MainWindow class
      created in default WPF projects). We always prefer the "generated"
      documents to give external language services the best opportunity to
      participate.
      c1cf2f84
    • D
      Ensure Rename itemid handling is on UI thread · c5e172e6
      David Poeschl 提交于
      c5e172e6
    • D
      Observe IVsHierarchy.ParseCanonicalName return value · 6c2afcbc
      David Poeschl 提交于
      If IVsHierarchy.ParseCanonicalName returns something other than S_OK,
      then use VSITEMID.Nil
      6c2afcbc
    • M
      Remove tail recursion and enable cancellation · 2e3e96c5
      Matt Warren 提交于
      2e3e96c5