Skip to content
This repository was archived by the owner on Nov 28, 2021. It is now read-only.
/ roslyn Public archive
forked from dotnet/roslyn

InfectedLibraries/roslyn

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66,453 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Patholyn - A soft fork of the .NET Compiler Platform ("Roslyn")

MIT Licensed Sponsor

This is a soft fork of Roslyn. It is primarily serves as a sandbox for testing out ideas for C#. All changes to the language are locked behind feature flags, meaning you can opt into them individually. (In theory anwyay, the way Roslyn is designed means mistakes could break expecations here.)

There is a quick-and-dirty NuGet package attached to this release. If you just want to see the fork in action, check out PathogenPlayground/CSharpParameterlessStruct/patholyn-demo.

The intent is that eventually you'll be able to consume this compiler as a NuGet package and eventually we'll automatically keep pace with the Roslyn upstream using CI.

Feature Flags

StructParameterlessConstructors

This feature is similar to dotnet/csharplang#99

This feature flag enables parameterless instance constructors on structs, for example:

public struct MyStruct
{
    private string Message;

    public MyStruct()
        => Message = "Initialized from parameterless constructor.";

    public MyStruct(string message)
        => Message = message;

    public override string ToString()
        => Message ?? "Defaulted struct.";
}

The implementation of this feature is based on the cut C# 6 feature that was removed before Roslyn 1.0 was released.

(Note that the Visual Basic implementation of this feature was not restored.)

Roslyn actually supports calling parameterless constructors on structs when they exist. So using this feature on public API does not make it incompatible with vanilla Roslyn. Parameterless constructors will be called as expected.

Roslyn Readme

Past this point is the original Roslyn readme, unmodified.


Welcome to the .NET Compiler Platform ("Roslyn")

Join the chat at https://gitter.im/dotnet/roslyn Chat on Discord

Roslyn provides open-source C# and Visual Basic compilers with rich code analysis APIs. It enables building code analysis tools with the same APIs that are used by Visual Studio.

C# and Visual Basic Language Feature Suggestions

If you want to suggest a new feature for the C# or Visual Basic languages go here:

Contribute!

Some of the best ways to contribute are to try things out, file bugs, and join in design conversations.

Questions

A great way to get started is to ask some questions!

See if your issue is already being worked on! (Add your own votes using the 👍 reaction)

Vote in the Backlog! (Add your own votes using the 👍 reaction)

Find a bug to fix! (Add your own votes using the 👍 reaction)

Find a feature to implement! (Add your own votes using the 👍 reaction)

Getting started with the Roslyn APIs

If you want to get started using Roslyn's APIs to analyzer your code take a look at these links:

The latest pre-release builds are available from the following public NuGet feeds:

  • Compiler: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
  • IDE Services: https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json
  • .NET SDK: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json

Continuous Integration status

Desktop Unit Tests

Branch Debug x86 Debug x64 Release x86 Release x64
master Build Status Build Status Build Status Build Status
master-vs-deps Build Status Build Status Build Status Build Status

CoreClr Unit Tests

Branch Windows Debug Windows Release Linux
master Build Status Build Status Build Status
master-vs-deps Build Status Build Status Build Status

Integration Tests

Branch Debug Release
master Build Status Build Status
master-vs-deps Build Status Build Status

Misc Tests

Branch Determinism Build Correctness Spanish Mono
master Build Status Build Status Build Status Build Status
master-vs-deps Build Status Build Status Build Status Build Status

This project has adopted the .NET Foundation Code of Conduct.

.NET Foundation

This project is part of the .NET Foundation along with other projects like the .NET Runtime.

About

This was an experimental soft fork of Roslyn enabling parameterless struct constructors, which were officially added in C# 10.0

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Contributors

Languages

  • C# 66.2%
  • Visual Basic .NET 33.6%
  • 1C Enterprise 0.1%
  • PowerShell 0.1%
  • Shell 0.0%
  • CMake 0.0%