Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Igal Tabachnik
@hmemcpy
let snapshotSpan = span.GetSpan(snapshot)
and only return a TagSpan in case snapshotSpan.IsEmpty is false
but I can't make it NOT ugly
Anh-Dung Phan
@dungpa
What do you currently have?
Igal Tabachnik
@hmemcpy
ugh
I undid a bunch of things
currently I have this:
            let tags = [| for span, depth in lastResults.Value ->
                            let snapshotSpan = span.GetSpan(snapshot)
                            let classification = classifier.GetClassificationSpans(snapshotSpan) |> Seq.head
                            TagSpan(snapshotSpan, DepthRegionTag(depth, classification.ClassificationType)) :> ITagSpan<_> |]
now the problem is that if snapshotSpan.IsEmpty, GetClassificationSpans returns an empty list, so Seq.head throws
I obviously need to filter... but I can't get it right
Anh-Dung Phan
@dungpa
I see
Change -> to do
Then you can add if snapshotSpan.IsEmpty then
One the last line, it should be yield TagSpan...
It is array comprehension/sequence expression in F#
Igal Tabachnik
@hmemcpy
perfect :D
That's what I was hoping for :)
ok, let's see if that helped :)
Igal Tabachnik
@hmemcpy
Yay!
I fixed it!
There was another bug in Depth Colorizer, it would paint comment blocks in a weird gradients
I made it ignore comment blocks
I wonder if I should send this as a separate PR
Anh-Dung Phan
@dungpa
Cool, where's the PR?
Igal Tabachnik
@hmemcpy
Haven't sent it yet :)
Anh-Dung Phan
@dungpa
Choose a way that's the most convenient for you
Igal Tabachnik
@hmemcpy
I'll make another branch
Oh crap... I just realized I added a dependency to DepthColorizerTaggerProvider
Turns out there's one in .Tests too
Need to fix it too
Anh-Dung Phan
@dungpa
Great
Do you have ideas on this fsprojects/VisualFSharpPowerTools#1214
Igal Tabachnik
@hmemcpy
hmm
It may be that my fix fixes this too :)
Anh-Dung Phan
@dungpa
We should transform spans due to outlining, but I don't know how
I can't wait to see the CR that "fixes everything" :D
Igal Tabachnik
@hmemcpy
FIX ALL THE THINGS :)
This just happened:
I'm in repro mode today
blob
Anh-Dung Phan
@dungpa
Awesome!
Igal Tabachnik
@hmemcpy
I wonder if the 0-level guide makes sense
blob
Anh-Dung Phan
@dungpa
Sometimes yes. We often have top-level module without =
Most of functions start at level 0.
Igal Tabachnik
@hmemcpy
ok
then I need to figure out why collapsed regions are tagged differently somehow
But, tomorrow :D
Anh-Dung Phan
@dungpa
That would be great.