Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 21:53
    mikeclayton commented #61516
  • 21:49
    mikeclayton commented #61516
  • 21:49
    runfoapp[bot] edited #61474
  • 21:49
    runfoapp[bot] edited #61368
  • 21:49
    runfoapp[bot] edited #61367
  • 21:49
    runfoapp[bot] edited #61367
  • 21:48
    runfoapp[bot] edited #19763
  • 21:48
    runfoapp[bot] edited #60071
  • 21:48
    runfoapp[bot] edited #56625
  • 21:48
    runfoapp[bot] edited #58202
  • 21:48
    runfoapp[bot] edited #58199
  • 21:48
    runfoapp[bot] edited #58197
  • 21:47
    runfoapp[bot] edited #58077
  • 21:47
    runfoapp[bot] edited #57423
  • 21:47
    runfoapp[bot] edited #57565
  • 21:46
    mikeclayton commented #61516
  • 21:46
    runfoapp[bot] edited #46414
  • 21:46
    runfoapp[bot] edited #53392
  • 21:46
    runfoapp[bot] edited #53391
  • 21:45
    runfoapp[bot] edited #46414
Bernd Baumanns
@bernd5
@ltcmelo it could be an indexer
indexers do not have a name ...
that they are mapped to IPropertySymbol is a bit strange, but ...
I think in VB they can have names - in csharp not
Leandro T. C. Melo
@ltcmelo
@bernd5 thanks but an indexer does have a valid name
BTW, about your question @bernd5 : you could rewrite the initializer into the constructor body (prior to analysis)
I do similar things in this library https://github.com/ShiftLeftSecurity/SharpSyntaxRewriter
Bernd Baumanns
@bernd5
That is what I did - but the rewrite the symbols are different (they belong to the rewritten code ...)
@ltcmelo what is the name of an indexer?
Is "this" returned?
I would think null would be okay, too
the best is maybe to extend roslyn... I create a PR
Leandro T. C. Melo
@ltcmelo

the rewrite the symbols are different (they belong to the rewritten code ...)

correct, so what I do is to recompute the semantic model, then you get valid symbols and a correspondence

Bernd Baumanns
@bernd5
Bernd Baumanns
@bernd5
Bernd Baumanns
@bernd5
at least the GC is not deterministic
1 reply
but that is not a roslyn question it is a runtime question
Antonín Procházka
@prochan2
Hi, why are all the Microsoft.CodeAnalysis* NuGet packages of version 4.0.0 unlisted at NuGet.org and why there's no 4.0.0 version of Microsoft.VisualStudio.LanguageServices yet? Are these waiting for .NET Conf? It's confusing because VS 2022 is out already.
Joe4evr
@Joe4evr
probably waiting for .NETConf, yea
Bernd Baumanns
@bernd5
you can download the preview versions
But I assume the final versions will be published soon
Ryan
@ryan:chat.binarydad.com
[m]
Was anyone else having issues searching for files in any of the 2022 previews?
I would type in solution Explorer and it would never find any files
Bernd Baumanns
@bernd5
here it works
Ryan
@ryan:chat.binarydad.com
[m]
hmm...never did for me. i can ctrl+F just fine, but searching in the right under solution explorer never shows anything
ok... disregard. updated to RTM for 2022 and it seems to work...
Vyacheslav Avdeev
@lsoft
dotnet6 is here, but what's about incremental generators docs? did I miss it? the existings doc ( https://github.com/dotnet/roslyn/blob/main/docs/features/incremental-generators.md ) is obsolete even in terms of classes names...
Joe4evr
@Joe4evr
how is it that I get build errors that are not pushed to the Error List?
image.png
CyrusNajmabadi
@CyrusNajmabadi
Sounds like a bug. Please report it
Mohammad Hamdy Ghanem
@VBAndCs
untitled12.jpg
Remove unused local function? This is too scary!
Bernd Baumanns
@bernd5
what is scary?
Paul M Cohen
@paul1956
For VB functions that are Event Handlers appear as unused and VS 2022 removes handles clauses sometimes so the function would be deleted.
CyrusNajmabadi
@CyrusNajmabadi
That's a bug if so. Please file.
Jon Evans
@glitch100

Morning all.

Is it still the case that debugging Roslyn Analyzers/ CodeFixProviders can only be done via the VSIX Extension project? Is it possible to debug a unit test that is written? As in step into the Analyzer code?

Joe4evr
@Joe4evr
I've always used a unit test to step into analyzer code
never heard of a VSIX project being "the only way" to debug an analyzer
Jon Evans
@glitch100
Do you use a specific helper method to invoke your Analyzer code?
Jon Evans
@glitch100
My goodness
Antony Male
@canton7
I took that and modified it a bunch, ended up with something quite nice
Joe4evr
@Joe4evr
and it needs to be told which assembly to load the analyzers from + possible dependencies, so there's room for improvement
Jon Evans
@glitch100
Checking them atm - cheers all
HaloFour
@HaloFour
Mohammad Hamdy Ghanem
@VBAndCs
I am using this extension method in c#:
    public static IEnumerator GetEnumerator(this System.ValueTuple<int, int, int> range)
    {
        int start = range.Item1;
        int end = range.Item2;
        int step = range.Item3;

        if (step > 0)
            for (int i = start; i <= end; i += step)
                yield return i;
        else
            for (int i = start; i >= end; i += step)
                yield return i;
    }
It allows me to use this code:
foreach (int i in (-10, 10, 3))
    Console.WriteLine(i);
I imported this method from C# to VB and I can also use it in for each:
image.png