Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 00:18
    JoeRobich commented #38136
  • 00:18
    ryzngard synchronize #37851
  • 00:12
    CyrusNajmabadi commented #38136
  • 00:09

    JoeRobich on master

    Do not fade code for IDE0016 (U… Revert "Do not fade code for ID… Do not fade code for IDE0016 (U… and 1 more (compare)

  • 00:09
    JoeRobich closed #38136
  • 00:09
    JoeRobich closed #27213
  • 00:09
    JoeRobich commented #38136
  • 00:08
    jcouv commented #38148
  • 00:08
    jcouv commented #38146
  • 00:06
    riverar commented #37483
  • 00:03
    petrroll review_requested #38166
  • 00:03
    petrroll opened #38166
  • 00:02
    mavasani labeled #37483
  • 00:02
    mavasani reopened #37483
  • 00:02
    mavasani commented #37483
  • 00:02
    mavasani closed #35429
  • 00:02
    mavasani commented #35429
  • 00:02
    mavasani reopened #35429
  • 00:02
    mavasani commented #35429
  • 00:01

    dotnet-bot on release

    (compare)

Johan Larsson
@JohanLarsson
not sure I can recommend it, ad-hoc helper for tests.
ah, ok, it does naive parsing of old and new csproj but probably too limited for your needs
Matt Zinkevicius
@mattzink
I'm kinda dumbstruck that loading a solution and it's projects into a roslyn workspace is not a primary supported use case... I'll keep digging
Johan Larsson
@JohanLarsson
had to write it before the msbuild stuff was available, just a dumb hakk
why do you need xplat btw?
Matt Zinkevicius
@mattzink
Because the CI process is on Linux. Who doesn't need xplat nowadays? :-)
CyrusNajmabadi
@CyrusNajmabadi
I'm kinda dumbstruck that loading a solution and it's projects into a roslyn workspace is not a primary supported use case
you may be the first customer to have asked...
Matt Zinkevicius
@mattzink
That's blowing my mind
CyrusNajmabadi
@CyrusNajmabadi
in which case, it wouldn't be surprising that it wasn't worked on.
Matt Zinkevicius
@mattzink
But as I search around I see various attempts at people reconstrucing the logic (OmniSharp, etc)
CyrusNajmabadi
@CyrusNajmabadi
perhaps consider creating PR to address this need in Roslyn itself?
Johan Larsson
@JohanLarsson
I asked here couple of years ago, so second
CyrusNajmabadi
@CyrusNajmabadi
I asked here
here has no impact on roslyn. :)
Johan Larsson
@JohanLarsson
you may be the first customer to have asked
CyrusNajmabadi
@CyrusNajmabadi
by "ask" i mean: to the team :)
Matt Zinkevicius
@mattzink
Yet another unofficial parser, but I'll give it a try. Thanks!
CyrusNajmabadi
@CyrusNajmabadi
i mean, roslyn MSBuildWorkspace isn't official or anything
it just uses hte msbuild apis to do things
Matt Zinkevicius
@mattzink
Well it's an Microsoft published Rosyln nuget package. Not sure how much more official things get. The MSBuild API's are apparently Windows only. How does .NET Core on Linux parse/eval my sln/csproj files? No idea why this would be platform specific.
CyrusNajmabadi
@CyrusNajmabadi
How does .NET Core on Linux parse/eval my sln/csproj files? No idea why this would be platform specific.
they probably have some API.
if you find out, feel free to contribute an update to roslyn to make it use that :)
Joseph Musser
@jnm2
@mattzink parse/eval is a work in progress for all platforms last I asked
Not particularly good on Windows
Ever since SDKs
Joseph Musser
@jnm2
@CyrusNajmabadi I realized I forgot to remove the tracking annotation that was needed. Does the formatter kill that or do i have to remove it manually?
The instance is coming from static readonly so my .Single() would crash if more than one ended up in the same syntax tree
Paul M Cohen
@paul1956
Is there a way to say I expect a test that uses "Await AssertFormatLf2CrLfAsync(code.Value, expected.Value)" to fail. I am changing the way the code looks (formats) but I don't want to lose the old formatting test yet. I have another test showing the new formatting but changing the test makes reviewing harder.
Matt Zinkevicius
@mattzink
@CyrusNajmabadi Thanks for the heads up on Buildalyzer! Works a treat.
CyrusNajmabadi
@CyrusNajmabadi
@mattzink awesome :)
@jnm2 not exactly sure waht you're asking, but i think you're fine
Johan Larsson
@JohanLarsson
Is there something in Roslyn that answers ^?
Guess symbols do. Not sure if shadow is the correct word.
Can't afford symbols here I think.
CyrusNajmabadi
@CyrusNajmabadi
I believe there's a LookupSymbols or LookupNames
Johan Larsson
@JohanLarsson
true, what I'm doing is a pretty silly bad idea
Johan Larsson
@JohanLarsson
CyrusNajmabadi
@CyrusNajmabadi
every VisitXXX method calls DefaultVisit, by default
in the normal Visitor base class.
so it's what you override to say "here's what i want to do by default for any particular node" in case you want something like that.
Johan Larsson
@JohanLarsson
I'm adding a filter so that is probably right then, thanks
Joseph Musser
@jnm2
delegate bool FooDelegate<T>([MaybeNullWhen(false)] out T bar);

public static void Main()
{
    // CS8622 Nullability of reference types in type of parameter 'bar' of
    // 'bool Program.Foo(out string? bar)' doesn't match the target delegate 'Foo<string>'.
    //                          ↓
    _ = new FooDelegate<string>(Foo);
}

private static bool Foo([NotNullWhen(true)] out string? bar)
{
    bar = null;
    return false;
}
in order to fix, looks like I have to do:
private static bool Foo([MaybeNullWhen(false)] out string bar)
{
    bar = null!;
    return false;
}
which raises the question of whether the second form is equivalent when used as a standalone method.
Andrew Hall
@ryzngard
Why isn't it FooDelegate<string?> in this case?