1. 11 10月, 2014 2 次提交
    • T
      Remove duplicate package references. · 8fef5b5d
      tmeschter 提交于
      When our projects were last updated to a newer version of Microsoft.Net.ToolsetCompilers, NuGet didn't replace the old version--it just put the new version next to it. Every project ended up referencing both versions, and which set of compiler binaries "won" depended on the order they appeared in the project file. So different projects built with different compilers.
      
      This change strips out all references to the old version. (changeset 1352054)
      8fef5b5d
    • M
      Remove type constraint on ReplaceNodes API that forces the type of the... · c1f51f11
      mattwar 提交于
      Remove type constraint on ReplaceNodes API that forces the type of the replacement node to be of the same type as the node to be replaced. (changeset 1352036)
      c1f51f11
  2. 10 10月, 2014 3 次提交
  3. 07 10月, 2014 2 次提交
    • J
      Make much of the Workspaces layer Portable. · e76a29a4
      jasonmalinowski 提交于
      This change splits the Workspaces layer into two parts, mirroring the Portable/Desktop split that the compilers did. The core parts of the Workspaces layer (managing documents and projects, formatting, some refactoring, code fixes) is kept in the portable subset, with a few non-portable pieces remaining, notably MSBuild support.
      
      This change has a major impact on how MEF now works in Roslyn. Traditional MEF (“MEFv1”) is not portable, and so we must move the Workspaces layer over to using the Microsoft.Composition NuGet package (“MEFv2”) which is. The APIs are distinct in that each has its own namespace, but the concepts are more or less identical. It requires some care though: the workspaces layer is simple in that it only references MEFv2, but higher layers have to reference both versions to use metadata attributes. Exports using metadata attributes from the editor (say, ContentTypeAttribute) must use MEFv1 attributes to export, whereas exports for the workspaces layer must use MEFv2 attributes. The rule is subtle and yet simple, and so a diagnostic is provided which catches any offenses to prevent confusion.
      
      This also has some impact in how we create MEF hosts: if you wish to host just the base workspaces layer, we can use MEFv2 to compose everything. The HostServices implementation (MefV1HostServices) that consumes a MEFv1 ExportProvider. If you’re in Visual Studio, you can use this implementation to get the full set of host services provided in Visual Studio.
      
      Otherwise, most of the changes in here are minor: we react to some APIs that have been moved/renamed in the portable subset we are targeting, and also align our various exception helper utilities with the compiler’s precedent. (changeset 1349276)
      e76a29a4
    • T
      042bc6fb
  4. 06 10月, 2014 3 次提交
  5. 05 10月, 2014 2 次提交
  6. 04 10月, 2014 2 次提交
  7. 02 10月, 2014 4 次提交
    • T
      This shelveset implements following changes to metadata reference compiler API... · 4fc808ea
      TomasMatousek 提交于
      This shelveset implements following changes to metadata reference compiler API in order to remove duplication in the public surface and prevent users from unexpected metadata lifetime issues:
      
           1) MetadataImageReference and MetadataFileReference overlap
           Currently MetadataImageReference can be constructed from a Stream. MetadataImageReference supports metadata prefetch (reading the blob into memory and close the underlying stream) as well deferred reading (no content is read until the reference is consumed during compilation). MetadataFileReference only supports deferred reading.
      
           Lifetime of MetadataFileReference is non-deterministic, the underlying file is locked until no references exist and we GC the metadata.  On the other hand, it is possible to construct MetadataImageReference in such a way that allows controlling the underlying resources deterministically.
      
           Remove MetadataFileReference, use MetadataImageReference instead.
      
           2) Lifetime management
           AssemblyMetadata and ModuleMetadata objects hold on resources and implement IDisposable. When using MetadataFileReference constructors and some MetadataImageReference constructors to create references the underlying metadata objects are created implicitly and the user doesn’t have a way to explicitly dispose them.
      
           Make MetadataImageReference constructors internal and instead add factory method GetReference on AssemblyMetadata/ModuleMetadata. The usage pattern is:
      
           using (var metadata = AssemblyMetadata.CreateFromXxx(…))
           {
               var compilation = CSharpCompilation.Create(syntaxTrees, new[] { metadata.GetReference() });
               …
           }
      
           In addition the shelveset makes MetadataImageReference internal and adds the following convenience APIs, that are not the most efficient but are very convenient, easy to discover and safe to use for customers that don’t wanna explicitly manage the lifetime of metadata objects. (changeset 1345987)
      4fc808ea
    • M
      Fix for bug 1036190: Introduce context objects for Code Fixes / Code Refactoring APIs · c6217820
      manishv 提交于
      This change introduces following context objects:
      (a) CodeFixContext struct which is passed into CodeFixProvider.GetFixesAsync method and
      (b) CodeRefactoringContext struct which is passed into CodeRefactoringProvider.GetRefactoringsAsync. (changeset 1345537)
      c6217820
    • S
      Add a AnalyzerDriver.Create method · 41f9b137
      srivatsn 提交于
      Creating an analyzer driver is rather complicated today - you need to create the right one for the language and you need to know to attach that to the compilation etc. In this change I'm just adding a public method called Create and hiding the constructor.
      
      Also hiding a method called GetAnalyzerDiagnostic which was just used by a test in the IDE layer. The remaining public methods on this type either are resonable or are needed for the implementation of the IDE driver. We have some ideas to write the IDE driver in a way that might not require these post preview.
       (changeset 1345464)
      41f9b137
    • M
      Fix for bug 1036195: Use abstract base type for Code Fixes / Refactorings instead of interfaces · 553ab06c
      manishv 提交于
      Change ICodeFixProvider (interface) to CodeFixProvider (abstract type) and ICodeRefactoringProvider (interface) to CodeRefactoringProvider (abstract type) (changeset 1344836)
      553ab06c
  8. 25 9月, 2014 5 次提交
    • M
      User story 862192: FixAllProvider API and default fix all implementations... · 56e17171
      manishv 提交于
      User story 862192: FixAllProvider API and default fix all implementations (replace "Fix All Occurrences")
      
      Changes include:
      1) Add a new abstract type, FixAllProvider, in Workspaces layer to represent a provider which can provide "fix all occurrences" code fixes corresponding to fixes provided by an ICodeFixProvider.
      
      2) Add a new API on ICodeFixProvider (GetFixAllProvider()) to get an optional FixAllProvider. Implementers can return null to indicate no fix all support. Otherwise, they can either return an instance any of the well known implementations (see (3) below) or return an instance of their own implementation of FixAllProvider.
      
      3) Provide default implementation of a batch FixAllProvider which works for simple code fix providers which return code actions which have a single document change action. This provider batches all the individual diagnostic fixes across the scope of fix all action, computes fixes in parallel and and then merges all the non-conflicting fixes into a single fix all code action. For more complex scenarios, users must write their own FixAllProvider implementation.
      
      4) Add the following public types for FixAllProvider:
        (a) FixAllScope: Represents the scope in which fix all occurrences will be applied (document/project/solution/custom)
        (b) FixAllContext: Context information for computing fix all fixes. This context object is passed into FixAllProvider.GetFix API.
      
      5) Add an optional string property "Id" on CodeAction. This string defines a unique Id amongst all code actions returned by an ICodeFixProvider, and is part of the FixAllContext to determine which code action is applied at all fix locations.
      
      6) Enable fix all support for following code fixes:
        (a) Simplify type names
        (b) Remove unnecessary cast
        (c) Remove unncessary usings
        (d) Implement interface/abstract type
      
      7) Fix All Occurrences UI: Currently, these FixAllOccurrences code fixes will show up as hyperlinks in code fix preview pane. Clicking on these will trigger computation of diagnostics and fix all fixes for the chosen scope. Subsequently, preview changes dialog will come up to preview the fix.
      Post preview, these hyperlinks will be replaced with lightbulb sub menus under the original code fix. (changeset 1341442)
      56e17171
    • J
      updating toolset compilers to \\cpvsbuild\drops\Roslyn\Main-Signed-Release\20140923.3 · 324b041e
      jmarolf 提交于
      ***NO_CI***
       (changeset 1341082)
      324b041e
    • P
      - Give assignment expressions their own node in the syntax tree distinct from binary expressions · b25657f2
      pgavlin 提交于
      - Update the parser to produce such nodes when parsing assignment expressions
      - Port the rest of the compiler and related tests over to AssignmentExpressions
      - Port the workspace layer, its tests, and the samples over to AssignmentExpressions.
      - Port the editor features, samples, VS support, and related tests over to AssignmentExpressions. (changeset 1338828)
      b25657f2
    • R
      Replace IDiagnosticAnalyzer with DiagnosticAnalyzer, and move to an... · 010d4bda
      RoslynTeam 提交于
      Replace IDiagnosticAnalyzer with DiagnosticAnalyzer, and move to an action-based diagnostic analysis model. (changeset 1337816)
      010d4bda
    • T
      Removes workarounds for portability bugs 967430 and 797360 - the underlying... · 352e1c9b
      TomasMatousek 提交于
      Removes workarounds for portability bugs 967430 and 797360 - the underlying issues in the project system have been fixed.
      Removes explicit references to portable facade assemblies (System.IO, System.Runtime, etc.).
       (changeset 1336570)
      352e1c9b
  9. 12 9月, 2014 1 次提交
    • R
      This fixes the warnings which occur during a build of Asyncpackage. The... · 1cc753ab
      RoslynTeam 提交于
      This fixes the warnings which occur during a build of Asyncpackage.  The nuspec file puts several dlls into the tools portion of the package which triggers a warning (won't reference dll unless they are in lib).  The behavior here is intentional as the dlls aren't meant to be referenced.  Suppress the warning to get to a clean build (changeset 1333949)
      1cc753ab
  10. 10 9月, 2014 7 次提交
  11. 15 8月, 2014 6 次提交