« first day (1646 days earlier)      last day (1534 days later) » 

12:00 AM
RELOAD!
[rubberduck-vba/Rubberduck] 5 commits. 3 opened issues. 3 closed issues. 17 issue comments. 10 additions. 10 deletions.
 
12:25 AM
The Glenlivet: pretty decent
A bit citrus-y, but you can clearly identify each in-mouth stage
(came in a gift set with 2 nice whiskey glasses)
 
great... now I feel like a cretin
on that note... I'm apparently incapable of TDD...
 
@Vogel612 huh?
who are you and what have you done to @Vogel612?
 
well... let's say "real" TDD
I just stomped half the release cleaner out of the ground, including minor things like reading passwords from the user, without writing a single test
 
huh, why are we injecting IVBE into App? The ctor parameter is ...not used...
 
nice
 
12:40 AM
@Vogel612 all while breaking 200 tests? :)
 
I don't even have 200 tests...
but yea, I just broke all my 15 tests
 
> @cswartzvi thanks for the feedback BTW! Note that v2.3.1 hotfix release is just about to be released (just a few last-minute kinks to work out, see #4619 for details), and v2.4 will include another new piece of total awesomeness (see this video)!
 
learns from @Vogel612's mistake, writes red test for SCP bug
of course red test turns out green
 
1:02 AM
okay... all 15 test have been fixed.
it's damn near impossible to get some proper unit-tests for console interaction, though...
 
you basically need to abstract the whole console behind an interface... can get tedious
okay, 2 green, useless tests
this isn't going well...
 
yea, but how do I test that interface
it doesn't help that Console is sealed
but eh, whatever
 
why would you need to test Console?
 
I don't want to write a thin boilerplate wrapper
that's nonsense
I want something like Abstraction.ReadPassword
and since Console makes that somewhat annoying ...
that'd need a unit-test
writing a "IConsole" and implementing it by delegation of the Console members is fishy and stupid
especially since Console is static in the first place, soo ....
on that note: #TIL SecureString is discouraged
 
boils down to UI testing IMO
@Vogel612 huh why?
 
1:10 AM
cuz it's benefit is only marginal for almost all platforms
 
> FWIW, here's the stack trace for the actual exception - an `IndexOutOfBoundsException`, as I suspected:

```
at System.String.get_Chars(Int32 index)
at Rubberduck.AutoComplete.Service.SelfClosingPairCompletionService.Execute(SelfClosingPair pair, CodeString original, Char input, CodeString& result) in C:\Dev\GitHub\Rubberduck\Rubberduck.Core\AutoComplete\Service\SelfClosingPairCompletionService.cs:line 30
at Rubberduck.AutoComplete.Service.SelfClosingPairHandler.HandleInternal(Au
 
I actually might work on octokit.net to get the release deletion and stuff fully supported in the lib that I'll be using for the release cleaner
 
hi @jeffperrin!
thanks for the follow :)
 
heya @jeffperrin you should have talk powers in here now
hmm.. still no red test, huh? ...
 
1:19 AM
(might need to F5/reload the page though)
@Vogel612 nope. thought I'd catch the exception, work out where to break, find out what the actual reprettified code looks like, then try to get a red test out of it
 
hmm ... would it make sense to have an exception handler around the whole SCP entry point?
 
I put it higher than that - in the AC service
 
hmm ... but that doesn't necessarily handle the message pump, does it?
 
nope. but the AC service attempts to get the key handled by the SCP handler, the smart-concat handler, soon the block-completion handler, and eventually some autocorrect handler... worth handling it right there IMO
if SCP throws, smart-concat still gets to try to handle the keypress now
that obviously shouldn't ever happen, but eh
e.Handled is only ever true when a handler says "I've got this"
hmm, interesting
        var previousCharIsClosingChar =
            original.CaretPosition.StartColumn > 0 &&
            original.CaretLine[original.CaretPosition.StartColumn - 1] == pair.ClosingChar;
that's the throwing instruction
it's the 2nd executable instruction in the SCP handler
wth
I'm missing something
ah
nope
aaah
dammit, VBE
    err.Raise 5, _
|
^ re-prettified code
original.CaretPosition.StartColumn is still 4, but original.CaretLine is ""
hence, index out of bounds
ok, time for a red test
 
1:35 AM
Thank you @V
Thank you @Vogel612 !
 
@jeffperrin Welcome to the duck pond.
@all Should recent references be host specific, or only recent host project references?
 
I say host-agnostic
 
Pinning is global for libraries, per host for projects.
 
^ that makes a lot of sense
 
So a Word .dotm file would show up in Excel?
 
1:41 AM
well no! global/host-agnostic for libraries, per host for projects :)
 
OK, I'll do the same thing for recent lists then.
 
so you reference Scripting or ADODB in Excel, bring up... PowerPoint, and still have Scripting and ADODB in your "recent" tab
 
Yes, up to the limit of the recent count.
 
which is configurable :)
 
The other option is to maintain them completely separately.
 
1:43 AM
min 0, max ?
 
Limited by HDD space for the config file?
 
It's actually uint.Max currently, but that might need a more sane limit.
 
I think Int.MaxValue might be larger than the number of available type libs
50 seems a reasonable max
10-20 a reasonable default
 
It includes arbitrary files though.
You can pin or "recent" unregistered projects and libraries.
 
1:45 AM
just to confirm, a library only gets into the "recent" list after "apply" or "ok" is hit, right?
 
So, if I have unregistered foo.dll, browse-add it, and then pin it, I don't have to register it.
 
aight. bedtime for me.
 
@MathieuGuindon Correct. As of this morning.
 
also, I think we should pin the RD type libs by default
 
@Vogel612 'night
 
1:46 AM
@Vogel612 'night!
 
I was thinking of pinning RD and the Scripting Runtime by default.
 
that'll give greater discoverability to the "reflection API"
 
@Comintern nah, leave the users the unmeasurable joy of typing "script" in the search bar
 
:-D
It might be so much fun nobody uses the pinned or recent filters.
 
1:50 AM
IKR
damn test is still stubbornly green
 
Oh, you just reminded me - I need to hook the add reference event.
 
I.. did that?
 
6 mins ago, by Mathieu Guindon
just to confirm, a library only gets into the "recent" list after "apply" or "ok" is hit, right?
Not strictly correct - the VBE's dialog will update it too.
Just for the surprise factor if they don't discover it right away and use the ghetto version...
 
wait are we hijacking the VBE's vanilla dialog?
(I don't think we should)
 
No, I was going to listen for References.ItemAdded events.
 
2:01 AM
and ItemRemoved I guess
 
Meh. That wouldn't remove them from the recent list.
I was thinking of right-click to remove in the UI.
 
oh duh, you build the list of referenced libraries when the dialog is brought up?
 
Yep.
 
@Comintern straight from the CE! #sick
 
2:06 AM
early 2.4.x releases will need a visual cue in the CE for unused libraries
 
Early merged PR may get it. ;-)
It actually looks fairly trivial to implement. With a corresponding inspection.
 
The DeclarationFinder has already done most of the work.
 
another un-ignorable inspection
 
Yep.
RD will relentlessly nag you about your unused references.
 
2:09 AM
"use it or kill it"
 
Exactly. Won't be hard with the RemoveUnusedReferenceQuickfix either.
 
yeah.. but the inspection could be turned off - a visual cue in the CE would remain. IDK, gray-out the library with a "no references found for this type library" tooltip, or something
ugh.. I can't repro the reprettified code despite the test setup
mocking the VBE is rather easy. mocking the VBE in a productive way is much harder.
 
Hmmm... I wonder if value tuples are serializable.
 
(bad puns intended)
 
lol
And that's a no on the ValueTuple serialization.
Have to kick it old school.
 
2:14 AM
I doubt they're really meant for public API anyway
any tuple, really
 
Yeah, I'd set the laziness aside and write the struct.
 
that moment you realize the test you're writing doesn't involve the class with the breakpoint at all
AC namespace needs a cleanup
AutoComplete.Service makes no sense anymore
this is a hotfix, Mat. Just fix the damn thing, release, refactor tomorrow
 
Trust me, that's better than realizing you forgot to take a breakpoint out of a process that takes 12 hours to run...
FML, it can't be a struct. It needs to be a class.
 
 
1 hour later…
3:25 AM
at last! a red test!
runs the rest of them to make sure
woot! one red test!
ugh. testing the wrong thing
 
3:54 AM
...and settings are a wrap (pending tests and checking to see if they work).
 
nice!
ah-ha! got my red test
 
4:15 AM
...and two extras
 
4:33 AM
ok, on track now
 
4:53 AM
ugh
I don't know how I can test this
 
What's the case you need to test?
 
the good news is that it works
Err.Raise 5, _
          "
I got it to restore the indent of the original code if prettified.CaretLine.Length==0
I'm keeping the try/catch+log
 
So you're using the catch to handle it?
 
nope
but it makes a good safety net
if any AC handler throws for whatever reason, host won't blow up
 
Just need a mock Excel...
I wonder if it would be possible to mock a message pump.
It's really just one function. We could feed it an array of window messages as a test case.
 
5:01 AM
> Wraps all AC handling in a try/catch block. Avoids taking down the host if any AC handler throws.
 
5:20 AM
[rubberduck-vba/Rubberduck] build for commit f501e891 on unknown branch: AppVeyor build succeeded
[rubberduck-vba/Rubberduck] retailcoder pushed commit 1cdcfe6c to next: removed unused parameter
[rubberduck-vba/Rubberduck] retailcoder pushed commit c926d730 to next: catch & log AC handler exceptions.
[rubberduck-vba/Rubberduck] retailcoder pushed commit f501e891 to next: fixes #4621
Merge pull request #4623 from retailcoder/redim

Critical SCP Fix
[rubberduck-vba/Rubberduck] retailcoder did something with some project card
 
ah crap
@Comintern I forgot the diff
 
    public OpenProjectPropertiesCommand OpenProjectPropertiesCommand { get; set; }
 
[rubberduck-vba/Rubberduck] retailcoder did something with some project card
 
Eh, no biggie.
 
5:23 AM
hmm
 
SetAsStartupProject is VB6 specific - I don't even know if it's implemented yet.
 
@Duga not waiting two hours for a build here
 
Not sure whether FindAllImplementations is working or not.
 
 
OpenProjectPropertiesCommand is grayed out anyway
 
the refs are in the test project :)
 
Oh f*ck - it needs the binding in the xaml file too. Guess it will have to wait.
 
PSA: the CE XAML is currently frozen, until all your refs are belong to ducky
@Comintern want to review the WP article about the refs explorer before I hit the green button?
 
5:31 AM
I'm not entirely sure that's necessary at this point - the diff for that file should only be a couple lines.
@MathieuGuindon Yeah, I can do that.
 
<!-- wp:paragraph -->
<p>Back in the <a href="https://rubberduckvba.wordpress.com/2017/10/17/rubberduck-2-1-x/">2.1.x announcement</a> post over a whole year ago, one of the bullet points about the upcoming roadmap said we were going to "<strong>make you never want to use the VBE’s </strong><em><strong>Project References </strong></em><strong>dialog ever again</strong>"; it took a bit longer than expected, but as far as we can tell, this feature does exactly that.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
 
I completely forgot that XmlPersistanceService<T> doesn't support DataContract.
New serializer in-bound...
MSForms is only locked if there's a UserForm in the project. You can add fm20.dll without one and it won't lock.
 
interesting
same is probably true for .ocx in use
 
:nitpick:
Maybe "and if the project has a UserForm, the <code>MSForms</code>&nbsp;library."?
Oh, snap - you dish on VS too.
 
> The selected libraries show up at the top of the list, in priority order. Locked libraries are stacked at the top. You use the up/down arrow buttons to move the selected library up or down, but you can't move the locked ones.
@Comintern :)
 
@Duga 3 more builds until merge
no, only 1
 
Host-specific project types are in a separate tab if applicable. (as we realized today).
 
good catch
 
Also, there's a new "feature" I added this afternoon - if you browse for a type library and it can't be loaded into the project, it will show as a broken reference immediately (before the VBE tries to reference it).
 
nice!
@Comintern do we still try to add it though?
 
5:47 AM
Other than the MSForms nitpick and the availability of the Projects tab, that looks great.
@MathieuGuindon Yes.
 
It will pop the messagebox (RD's) when you hit OK or Apply.
I will do the same with broken references that came in with the project.
 
that's awesome
ok so.. I'm publishing that?
 
I also don't know if you saw this comment...
> // TODO: If for some reason the VBA reference is broken, we could technically use this to repair it. Just a thought...
@MathieuGuindon Go for it!
 
@Comintern wut!
 
5:50 AM
:-)
There's a code path that will try to locate all references by CLSID in the registry. If it's broken because of a version or path issue, RD could prompt to "repair" it.
 
not sure Symantec will like that though
not that Symantec likes us anyway
but still..
 
Let's say you have Office 16 referenced, and Office 15 installed. RD will find the GUID for Office, so it could detect the version mismatch as being the reason the reference is broken.
> Repair Office 16.0 reference by referencing Office 15.0? [Yes] [No]
 
that's... wow
 
[rubberduck-vba/Rubberduck] build for commit e48e3965 on next: AppVeyor build succeeded
 
6:09 AM
2.3.1 will have to be tomorrow
..which is probably a good idea
 
posted on December 08, 2018 by Rubberduck VBA

Back in the 2.1.x announcement post over a whole year ago, one of the bullet points about the upcoming roadmap said we were going to “make you never want to use the VBE’s Project References dialog ever again“; it took a bit longer than expected, but as far as we can tell, this feature does exactly that.… Continue reading Introducing the Reference Explorer →

 
"hey let's release at 1:15AM on a Friday night" - no one ever
 
#ReleaseOnMonday
 
@MathieuGuindon "The Scriptingruntime’s library " is missing a space.
 
6:15 AM
I missed it in the markdown too.
 
fixed
@Comintern well spotted anyway! it's got a whole 3 views so far
 
Newly found science video: youtube.com/watch?v=HRBVfqhPQQ8
 
That's the bane of my existence in SO answers, I've developed an eye for it.
 
6:21 AM
Nice work on the reference explorer.
 
'night
@IvenBach Thanks! 2-4 days and counting.
 
 
2 hours later…
8:18 AM
Introducing the Reference Explorer https://rubberduckvba.wordpress.com/2018/12/08/introducing-the-reference-explorer/
Hotfix release 2.3.1 is imminent - help us test the pre-release build here: https://github.com/rubberduck-vba/Rubberduck/releases/tag/Prerelease-v2.3.1.4297
 
 
5 hours later…
12:48 PM
~sigh ... 21 pending changes...
 
1:21 PM
at least I'm starting to get some unit tests in there
 
[rubberduck-vba/ReleaseCleaner] Vogel612 pushed commit f05c0ab3 to master: Expand Argument Parsing to include credentials
[rubberduck-vba/ReleaseCleaner] build for commit f05c0ab3 on master: AppVeyor build failed
BUILD FAILURE!
 
1:48 PM
[rubberduck-vba/ReleaseCleaner] Vogel612 pushed commit d344c70f to master: Add InternalsVisibleTo specification for Moq
[rubberduck-vba/ReleaseCleaner] Vogel612 pushed commit 0f3f4041 to master: Deal with Octokit.Credentials not implementing custom equality semantics
[rubberduck-vba/ReleaseCleaner] build for commit 0f3f4041 on master: AppVeyor build failed
BUILD FAILURE!
 
2:06 PM
~sigh
 
[rubberduck-vba/ReleaseCleaner] Vogel612 pushed commit 38dda7c9 to master: PoorMan's DI the IConsole into the argument parser
[rubberduck-vba/ReleaseCleaner] build for commit 38dda7c9 on master: AppVeyor build succeeded
 
finally ...
that mess also explains why tests were never finishing...
 
3:01 PM
> The ReadKey method reads from the keyboard even if the standard input is redirected to a file with the SetIn method.
^^ this completely breaks every chance of unit-testing the ReadPassword method.
 
 
3 hours later…
5:43 PM
[rubberduck-vba/Rubberduck] retailcoder did something with some project card
[rubberduck-vba/Rubberduck] retailcoder is checking what fun stuff @Duga can say about project cards
[rubberduck-vba/Rubberduck] retailcoder did something with some project card
[rubberduck-vba/Rubberduck] retailcoder project card. Enough said.
[rubberduck-vba/Rubberduck] retailcoder did something with some project card
 
6:27 PM
> This function:

```vb
Public Function GridCoordToRange(ByVal gridId As Byte, ByVal position As IGridCoord) As Range
With PlayerGrid(gridId)
Set GridCoordToRange = .Cells(position.Y, position.X)
End With
End Function
```

Is used here:

```vb
Private Sub IGridViewCommands_OnSelectPosition(ByVal gridId As Byte, ByVal position As IGridCoord)
If sheetUI Is Application.ActiveSheet Then
sheetUI.GridCoordToRange(gridId, position).Select
End If
End Sub
 
"It is far better to improve the effectiveness of testing first than to improve the efficiency of poor testing. Automating chaos just gives faster chaos." - Mark Fewster
 
@TweetingDuck #EasierSaidThanDone
 
6:43 PM
> Annotations can no longer be used at both module and member level (right?): modules that have a `@Description` annotation are now tripping the "Illegal Annotation" inspection, which is fine - but there's no `@ModuleDescription` annotation, and the corresponding `VB_Description` attributes don't get synchronized.

Do we kill it? Or cure it? How?
 
6:55 PM
> We could simply add the ModuleAnnotation flag to the @Descrption annotation. Than, it will also work for modules.
> We could simply add the ModuleAnnotation flag to the @Descrption annotation. Then, it will also work for modules.
> We could simply add the `ModuleAnnotation` flag to the `@Descrption` annotation. Then, it will also work for modules.

However, that will introduce problems when an `@Description` annotation gets applied to the first member of the module. That would always also annotate the module.
 
@Duga yup. that trips the "duplicate annotation" when first member has a description annotation, hinting that a description gets applied to first member. might be simpler to introduce a @ModuleAnnotation
 
> The inspection is a relic from a failed feature, and is currently polluting inspection results with legit but unactionable results. This PR removes it.
 
hmm, getting a false positive for "requires set keyword" here:
Public Property Get IsSunken(ByVal position As GridCoord) As Boolean
    Dim currentShip As IShip
    For Each currentShip In this.ships
        If currentShip.IsSunken Then
            If currentShip.Orientation = Horizontal Then
                If currentShip.GridPosition.Y = position.Y Then
                    If position.X >= currentShip.GridPosition.X And _
                       position.X <= currentShip.GridPosition.X + currentShip.Size - 1 _
                    Then
                        IsSunken = True
the IsSunken assignment
 
Huh? That is strange.
 
7:10 PM
off latest pre-release build (would-be bugfix release)
 
I will have a look in a moment.
 
I added a test for a simple bool property get with just an assignment to a boolean literal; building now
hmm, test is green.. wonder if I might be missing commits
reloading...
also here:
Public Property Get State(ByVal position As GridCoord) As GridState
    On Error Resume Next
    State = this.State(position.X, position.Y)
    On Error GoTo 0
End Property
GridState is an enum
...which is weird, there's a green test specifically for that
(close enough anyway)
 
[rubberduck-vba/Rubberduck] build for commit 0142b655 on unknown branch: AppVeyor build succeeded
 
7:27 PM
wtf, bool test passes
 
@MathieuGuindon that's quite some arrow code there
 
yeah
if only I had an extract method refactoring to pull the loop body into its own method!
...jokes aside, if only that refactoring wasn't so damn complex
ugh. adding an index/parameter doesn't change anything. test still green. ..trying with the integral arrow code :)
ha, and red
scratches head
 
soo ... 2.3.1 today?
 
7:43 PM
I'd like to get to the bottom of that one, but yes, in theory =)
HasDamagedShip trips the same false positive:
Public Property Get HasDamagedShip(ByVal position As GridCoord) As Boolean

    Dim currentShip As IShip
    For Each currentShip In this.ships

        Dim currentX As Long
        Dim currentY As Long

        If currentShip.GridPosition.Y = position.Y And currentShip.Orientation = Horizontal Then
            For currentX = currentShip.GridPosition.X To currentShip.GridPosition.X + currentShip.Size - 1
                If currentX = position.X Then
                    HasDamagedShip = Not currentShip.IsSunken And currentShip.HitAreas.Count > 0
wtf.. declaration.IsObject is returning true
the IsObject logic is wrong
..and a little too complex to be a good fit for an expression-bodied property
    public virtual bool IsObject =>
        AsTypeName == Tokens.Object || (
            AsTypeDeclaration?.DeclarationType.HasFlag(DeclarationType.ClassModule) ??
                !AsTypeIsBaseType
                && !IsArray
                && !DeclarationType.HasFlag(DeclarationType.UserDefinedType)
                && !DeclarationType.HasFlag(DeclarationType.Enumeration));
 
youch.
 
I bet that's my code :)
better?
    public virtual bool IsObject
    {
        get
        {
            if (AsTypeName == Tokens.Object ||
                (AsTypeDeclaration?.DeclarationType.HasFlag(DeclarationType.ClassModule) ?? false))
            {
                return true;
            }

            return !(AsTypeIsBaseType ||
                     IsArray ||
                     DeclarationType.HasFlag(DeclarationType.UserDefinedType) ||
                     DeclarationType.HasFlag(DeclarationType.Enumeration));
        }
ok I'm confused. Declaration.IsObject now correctly returns false. then PropertyDeclaration overrides it, and in there base.IsObject is apparently true.
    public override bool IsObject =>
        base.IsObject || (Parameters.OrderBy(p => p.Selection).LastOrDefault()?.IsObject ?? false);
the override seems to assume PropertyLet/PropertySet for the parameter handling though
ok so the false positive is tripped when a property member has an object parameter
In normal languages, programmers refer to the documentation instead of complaining about how they would have specified the language differently to suit their own needs. "fractions are rounded" is all over the docs. — Mathieu Guindon 19 secs ago
ffs RTFM instead of bitching about how VBA isn't a "normal language"
 
8:16 PM
also "in normal languages" you either get a rounding conversion or a type error
 
gtg, bbl
 
 
1 hour later…
9:32 PM
@Comintern Yep, VB6 only, merged in #4335. No idea why it doesn't find usages though - just retested it and it works fine...
 
@mansellan You know what, it might be the new project format. It only creates the .g.cs files when it builds, so it's possible that VS just can't see the reference.
 
10:17 PM
@IvenBach Your thing looks pretty OK to me.
However, you should add a .gitignore file and exclude the bin, obj, and other generated directories and stuff.
 
[rubberduck-vba/Rubberduck] Vogel612 is bored so why not move a project card
 

« first day (1646 days earlier)      last day (1534 days later) »