« first day (1688 days earlier)      last day (1492 days later) » 

12:00 AM
RELOAD!
[rubberduck-vba/Rubberduck] 2 opened issues. 10 issue comments.
 
12:32 AM
@Comintern Core contains the settings, too, which is a PITA.
 
I think there was a historical reason for that, but I'm guessing it's probably not the case any more.
 
I think it had to do with loading the settings
but that should be in Rubberduck.Main?
I wonder if we can get away with moving them over to Rubberduck.SettingsProvider.
 
I'm pretty sure it had to do with the dependency graph. That should be sorted out though.
SettingsProvider creates circular dependencies, no?
 
In the current state, nothing in Parsing can depend on settings.
 
IDK. but even if that's the case, there's the Rubberduck.Resources which is explicitly meant to be on the bottom of the chain
(or top, however you view it)
though that's our 3rd junk drawer.... :(
 
12:38 AM
The dependency problem is that some of the settings depend on strong types.
 
That is purely for resources.
But, do they depend on types in Core?
 
I'm wondering if settings really ought to.
 
Maybe. I'm giving it a quick check.
 
Anyway, why should settings depend on anything?
 
yeah, it should be basically a model. One possible problem is the enumerations, though.
 
12:42 AM
Ok, they could depend on some enums.
 
Yep. That's all I found.
 
why is there a declaration.QualifiedModuleName and declaration.QualifiedName.QualifiedModuleName?
 
Is that in main?
 
well, enums can legitimately be argued as being just data but...
no, core - OpenDesignerCommand
(main isn't supposed to touch anything from parsing)
 
They're in Rubberduck.VBEditor.
 
12:48 AM
They being the enums?
 
QMN etc.
 
ok, crossed the streams again -
but my question was is whether there's a difference between declaration.QualifiedModuleName and declaration.QualifiedName.QualifiedModuleName
 
Ah, no. Looks like a shim.
public QualifiedMemberName QualifiedName { get; }
public QualifiedModuleName QualifiedModuleName => QualifiedName.QualifiedModuleName;
 
should have thought to look there
was a bit taken aback to see alternative routes, esp only one hop away
 
I'm guessing it added as a convenience at some point.
 
12:57 AM
yeah i kind of can see it. declaration.QualifiedName.QualifiedModuleName would get quite winded very fast.
are we shooting to release 2.4 on sunday?
 
IDK. Depends on how we feel about the lack of recent issues on the CE. TBH I was expecting more.
Do we have DL counts for 4431-pre and 4441-pre somewhere?
 
That'd be a question for @MathieuGuindon
 
The RD GitHub page gets a crapload of daily visitors.
 
> Rubberduck.Setup.2.3.1.4441-pre.exe (4.02 MiB) - downloaded 60 times. Last updated on 2019-01-17
> Rubberduck.Setup.2.3.1.4431-pre.exe (4.02 MiB) - downloaded 49 times. Last updated on 2019-01-16
> Rubberduck.Setup.2.3.1.4414-pre.exe (4.01 MiB) - downloaded 198 times. Last updated on 2019-01-09
 
Thanks!
 
1:09 AM
> Rubberduck.Setup.2.3.1.4308.exe (3.89 MiB) - downloaded 1,097 times. Last updated on 2018-12-10
 
oh nice!
1000 in a month?
well a bit over a month
but still.
 
Yeah, that's a first!
 
any idea last time we broke 1000?
 
That's more installs than we get at work.
Granted, our software is significantly more expensive and is pretty specialized, but...
 
@this 1.4.3 was close to 5.5K IIRC, when 2.0 was launched
 
1:11 AM
how big was the gap between those 2?
 
a year=)
 
kind of a significant gap. :p
 
basically 1K/month never happened before AFAIK
 
I think back then in 1.4.3/2.0 (and I wasn't here then) you only had low hundreds of stars, didn't you?
now we have ~700, so more people are paying attention (?)
 
It's interesting that our page view frequency graph matches the one we have at work. I wonder why Wednesday is "software install day".
 
1:13 AM
we've had 60-70 watchers for a while though
 
i think the majority don't really want the dev chatters.
watching would bring a lot of chatters that would go over the head
@Comintern because it's the hump day?
 
depends, GH introduced "releases only" watch mode this year, so in theory watching a repo isn't as annoying as it was
 
oh that's right.
might be still too new, though.
I'd wager the same crowd who don't want dev chatter either don't read GH news. :p
 
hmm. Why is the declaration.DeclarationType returning ClassModule while its a document (its ComponentType returns a Document.
 
1:19 AM
Because a Document is a ClassModule.
 
yes, but the DeclarationType.Document is already OR'd
1L << 5 | ClassModule
 
Well that explains the component type check I found in the CE...
 
the OpenDesignerCommand is just doing a simple equality. Felt wrong
I think the DeclarationType needs to be using HasFlag()
 
Is DeclarationType.Document resolving correctly?
I'm trying to remember when we check that.
Oh, well there's yer problem:
public ClassModuleDeclaration(
          QualifiedMemberName qualifiedName,
          Declaration projectDeclaration,
          string name,
          bool isUserDefined,
          IEnumerable<IAnnotation> annotations,
          Attributes attributes,
          bool isWithEvents = false,
          bool hasDefaultInstanceVariable = false,
          bool isControl = false)
    : base(
          qualifiedName,
          projectDeclaration,
          name,
          DeclarationType.ClassModule,
          isUserDefined,
It's hard coded in the ctor.
 
Doesn't it make sense?
Or is DocumentModuleDeclaration inheriting ClassModuleDeclaration?
 
1:25 AM
well, the declaration i have is for a document.
this is cool, though:
switch (declaration.DeclarationType)
                {
                    case DeclarationType.ClassModule when qualifiedModuleName.ComponentType != ComponentType.Document:
                        return _projectsProvider.Component(qualifiedModuleName).HasDesigner;
                    case DeclarationType.ClassModule:
                        using (var app = _vbe.HostApplication())
                        {
                            return app != null && app.CanOpenDocumentDesigner(qualifiedModuleName);
didn't know about the when. Thanks, R#!
 
pattern matching ftw
 
There isn't a DocumentModuleDeclaration. I'm presuming that they get created as ClassModuleDeclaration because they support interfaces.
(for some values of "support")
 
@Comintern makes sense
@Comintern ha yeah
 
yeah, that's "wrong", and probably explains the CE check you mentioned
I'm not going to fix that either. #PartOfTheProblem
 
LOL. Are we even checking to see if it's a document in the resolver?
 
1:28 AM
hmm the QMN does have it right, though.
 
I thought we were. And if so, it's an easy fix.
 
so maybe?
 
@this one day a VBA dev will say "oh nice, didn't know that - thanks Rubberduck!"
3
 
now that would be AWESOME
 
@this it's a trivial fix.
 
1:30 AM
Rubberduck being awesome is a trivial fix?
 
No, the declaration type for documents.
Add an isDocument parameter to the ctor.
 
do we really want to do that? :p
 
Pass it from DeclarationResolveRunnerBase - it's around line 186.
 
feels like making the problem worse.
 
Then fix the hundreds of broken tests.
:-D
 
1:31 AM
lol
 
TBH, you should open an issue for it though. That's some unneeded tech debt.
It directly results in hitting the COM objects in some of the callers.
 
OK - i'll have a look at that once I have it working
 
1:47 AM
trying out the "trivial" fix
Hey, @Comintern want to guess how many failed tests?
 
1500?
 
0
 
Nice!
 
should we be scared instead?
 
Hey, @this want to guess how many upcoming issues?
 
1:56 AM
666
 
Let me do a quick sanity test on uses of that declaration type.
I do have the feeling this will break stuff. The more I think of it, the less coverage I think we have on the distinction between classes and documents.
 
That's why I'm scared - if no unit tests fail, it usually implies that there's a dearth of coverage
TBH, I haven't written any unit tests for the changes I made to OpenDesignerCommand. :(
 
Documents were the bastard stepchild of classes for a long time.
 
yeah I can understant that.
we're only starting to break apart the egg.
 
Probably safer to leave it out and open the issue. It'll need a pretty comprehensive static review.
 
2:02 AM
np - i'll stash that change.
 
@MathieuGuindon pfft. RD already did that for me with pretty much everything.
 
attaches teh debugger while unit testing is running
that looks like a good idea.
 
> @Greedquest is it possible to get a copy of your VBE registry, in particular the Dock key? I have a hunch we need that in order to reproduce.
> @Greedquest is it possible to get a copy of your VBE registry, in particular the `Dock` key? I have a hunch we need that in order to reproduce.

I cannot reproduce, even though I made VBE window small then restart Excel.
 
2:41 AM
> That was discovering while fixing #4708 -- for documents, they are given `DeclarationType.ClassModule`. That is because of the document falling into the `default` case:

https://github.com/rubberduck-vba/Rubberduck/blob/dda930087260194b2e3935fac1171143b6f5cdf4/Rubberduck.Parsing/VBA/DeclarationResolving/DeclarationResolveRunnerBase.cs#L186-L213

The fix is trivial; we can just add a `isDocument = false` to the `ClassModuleDeclaration` and set the declaration type accordingly. The fix does
 
3:24 AM
> **Rubberduck version information**
Version 2.3.0.4261
OS: Microsoft Windows NT 6.1.7601 Service Pack 1, x64
Host Product: Microsoft Office 2016 x86
Host Version: 16.0.4771.1000
Host Executable: EXCEL.EXE



**Description**
Preprocessor commands such as `#If` used within procedures are not indented.

**To Reproduce**
1. Place this in a code module:
```
Sub ReproduceBug()
#If 1 = 1 Then
MsgBox "Math still works!"
#Else
MsgBox "Match is broken."
#End If
End Sub
```
2. Run t
> Can you check the following 2 indenter settings that could effect this?

Force compiler directives to column 1 would cause this behavior if checked.
Indent compiler directives would (for the sample code above) cause this behavior if unchecked.

If the problem still persists, there is an Export link in the top right corner of the indenter settings form - click the link, and then append the resulting file to the issue.

Thanks!
 
3:46 AM
> I am unable to reproduce this. In an empty project, regardless whether it's a module, a class or a document, I cannot get the inspection to fire for the given code.

Is there more to the story than the original report is letting on?
 
 
2 hours later…
@Duga I suppose I should break out the profiler. ;-P
 
sorry - i assumed since you were on other WPF issues, and it might be similar enough to be rolled up
 
No, I just missed that one.
 
@this we good to merge #4721? Hotfix is cooling down.
 
@Duga Too soon. That's in #4717.
 
yeah, need to go to bed. Just want to fix one more bug.
 
> #4717 addresses the worst of this, but there is a second issue (beside the one mentioned above) that will set the cursor to it's busy state. If the navigate command changes the code pane, the cursor will stick in the busy state until the mouse is moved. This promises to be incredibly difficult to fix in that we don't have direct access to the Cursor from inside the navigate command and it's asynchronous.

I'm inclined to ignore that last remaining bit in that the workaround is to simply mo
 
Yep, I should probably get to bed too. The low hanging fruit is just so tantalizing though...
 
[rubberduck-vba/Rubberduck] build for commit 17f43348 on unknown branch: AppVeyor build failed
BUILD FAILURE!
 
6:46 AM
Wut?
The sort broke 2 tests? Seriously?
 
@Comintern IKR?
 
I suspect a sequence equity check that doesn't belong there...
A'yup.
    Assert.IsTrue(config.UserSettings.CodeInspectionSettings.CodeInspections.SequenceEqual(
            viewModel.InspectionSettings.SourceCollection.OfType<CodeInspectionSetting>()));
 
[rubberduck-vba/Rubberduck] build for commit 81a26265 on next: AppVeyor build succeeded
> The issue is with this part:

https://github.com/rubberduck-vba/Rubberduck/blob/b4f45bf0f076519375fc3a0467d1974c919477af/Rubberduck.CodeAnalysis/Inspections/Concrete/FunctionReturnValueNotUsedInspection.cs#L107-L120

The argument list comes up `null` which cause the procedure to return `true`, which I think is incorrect.

It's not exactly clear to me why we're doing this, though - it *looks* like this was meant to handle the case where the return value is used as an argument to some oth
 
7:21 AM
[rubberduck-vba/Rubberduck] build for commit a5d15bc1 on unknown branch: AppVeyor build succeeded
 
 
1 hour later…
8:22 AM
> The actual problem here is that this code makes the naive assumption that just because the reference is in a call statement the call is on the referenced function.

To fix this, the tree probably has to be traversed upwards stepwise
 
@this I saw that you have assigned yourself to the array ByRef issue. I have that inspection already completely rewritten in a branch.
Btw, I introduced the QualifiedModuleName member on the Declaration as a shortcut at some point because we need the module far more often than the qualified member name.
 
8:41 AM
@Comintern Why would anything ever query a COM object for the component type when it already had the declaration? The component type is cached on the QMN.
 
 
3 hours later…
11:40 AM
> @bclothier Sure, where's it located?
 
 
2 hours later…
1:50 PM
@M.Doerner oh ok - I've been trying to fix small bugs in my branch. It only is a unit test and minimal changes. If you intend to add your branch soonish, I can discard the changes before I open a PR on my bug fixes branch.
 
> It would be in this path:

`HKEY_CURRENT_USER\Software\Microsoft\VBA\X.0\Common` where `X` is either `6` or `7`, most likely `7` since you are running Excel 2016.
> It would be in this path:

`HKEY_CURRENT_USER\Software\Microsoft\VBA\X.0\Common` where `X` is either `6` or `7`, most likely `7` since you are running Excel 2016. It's probably best to export the entire subkey just in case it's not just the `Dock` setting.
 
@MathieuGuindon stars > open issues
 
Unexpected but awesome interview from @SwiftOnSecurity, who, btw, is one of the best accounts around https://twitter.com/SwiftOnSecurity/status/1086446451323031552
 
2:18 PM
@SimonForsberg haha good point!
 
@TweetingDuck You lost your picture? If anyone finds a new picture, let me know and I'll fix it
 
> So for this snippet `GetIt(1).Select`, I have this parse tree:

`usage.Context` => `SimpleNameExprContext`, `33..33`
`.Parent` => `IndexExprContext`, `33..36`
`.Parent` => `MemberAccessExprContext`, `33..38`
`.Parent` => `CallStmtContext`, `33..38`

from there, the parent is the `MainBlockStmtContext`.

I'm not sure if I want to simply check if the call statement is its immediate parent or draw a list of acceptable contexts before going to the call statement.

We can see that:
``
 
@SimonForsberg found it :)
 
@Vogel612 Thanks
 
> Possibly related: #4607
> @daFreeMan are you still experiencing this?
 
2:41 PM
> I am. I'll be sure to grab a couple of crash logs when I'm back in the office.
I'm getting crashes from Excel when I've got several workbooks open, not just on exit now. I'm not convinced it's an RD issue, but I feel that I'll get a better and more responsive investigation from you guys than I ever would from MS. ;)
> I'll have to run a quick test on the most recent build. I'll let you know what I find.
> I'm inclined to agree with you. Once the user is aware of the situation, it's no big deal at all. However, for the uninitiated, it does appear that RD is "locked up" until you try to move the mouse. I'm impressed that you were able to find and fix some of it! Thanks.
> Every time you try to refresh RD, folders multiply themselves producing empty folders.

![folder multiplication issue](https://user-images.githubusercontent.com/40927759/51428115-b6269580-1bc5-11e9-837f-36465dcd24d3.png)

Also, it won't allow you or won't see folder structure/annotation deeper than two levels.

![folder layers](https://user-images.githubusercontent.com/40927759/51428244-f1759400-1bc6-11e9-9eb6-48a1eade0dce.png)


Version 2.3.1.4414 is not showing any of these issues.
 
3:02 PM
@Duga yikes
 
I think @Comintern let in some tribbles on board.
 
> Actually, fortunately, we had 2 other unit tests that covers a related scenario which helped narrow down the correct changes:

`FunctionReturnValueNotUsed_ReturnsResult_InterfaceMember` and `GivenInterfaceImplementationMember_ReturnsNoResult`

Unfortunately, I'm not 100% happy with the changes which currently passes all the tests including the new unit test reproducing this issue. This is the change:

```
var indexExpr = usage.Context.GetAncestor<VBAParser.IndexExprContext>(
 
in Coding Projects and Factorio Heaven, 1 hour ago, by Simon Forsberg
Oh geez... https://www.amsterdamduckstore.com/rubber-duck/trump-rubber-duck/
That’s some fowl and awful humor.
 
4:04 PM
> A band-aid would be to exclude the `BracketedExpression` declaration type from the inspection's query.

However, it's a bit deeper than that. That code wouldn't be legal in other VBA project for where there are no `appobject` that has an evaluate member on its interface. Furthermore, we probably don't want to exclude other uses of bracketed expressions.

```
Public Sub derp()
Dim foo As Range
foo = [A1] 'runtime expression
foo = Application.[A1] 'VBAProject.Mo
> Well, after days of trying various fixes, I have to give up. I cannot get RD to work. I removed all add-ins, reinstalled RD - still did not work. I uninstalled MS Access and all add-ins, then reloaded Access and RD. Same problem. And, I did this on 2 computers. So, thanks for all the help, but .... I'll try again in a couple of months.
 
@M.Doerner That's a really good question. I'm going to have to dig up the place I found it.
 
4:20 PM
@Duga bizarre.... @IvenBach you can install and run RD, right?
 
@Duga I need to figure out HTH to unit test that...
Huh? Why would I be able to get 2 assert dialogs open at the same time originating from the UI thread?
 
> That's the whole lot saved as a text file
[VBA entry.txt](https://github.com/rubberduck-vba/Rubberduck/files/2775734/VBA.entry.txt)

I believe the VBE got in that state by crashing in some other way (I would never make the window that small on purpose). I've been messing around with the rubberduck api recently if that has any bearing
> That's sad to hear and frustrating as we don't have a reproduction on our end. It may be related to the need for shimming (c.f. #4041 ) - we have observed somehow similar error with #3837 though the symptoms are quite different (this has to do with loading RD whereas you can load it just fine but then error on the casting the commandbars).

That said, because you are on an Insider build, it can't hurt to report this, especially if you have a 3rd computer that isn't on a insider build and ca
 
4:40 PM
@Duga I did notice in the log file that the resize event is hitting the message pump before the window is subclassed. Wasn't Vogel's resize hack in the WndProc?
 
> One more question that may seem totally random -- do you have or have you ever installed Office version older than 2003? (2000, 97...)
 
@this That gets invoked from SubClassProc. The WM_SIZE is hitting the pump before we're in the message queue.
Oh wait, maybe not - I don't think the path that takes is logging anymore.
 
4:59 PM
I thought it worked because the weird parameter had special meaning to VBE so it had to go through. It would be us who need to not tale the "special" message
 
Yeah, it would be there to prevent passing a bad size down to the managed control.
Do our toolwindows load in a deterministic order? It's specifically the 4th one that's the problem.
 
Not sure. Might have to do with reading registry
 
Yay, hexdump!
 
ikr?
 
I'm tempted to drop the contents into my registry...
I wonder if I can just copy and paste that into HxD...
I seriously do not want to type that.
 
5:14 PM
@Duga I start to get the impression that we really should not have merged the CE changes before the release.
Now, we are stuck with fixing all issues introduced before we can release.
 
well, the release was slanted for the CE improvements. Without that, I'm not sure we have things to justify a new release? If need be, we can hold back release a bit more until all CE issues are fixed.
 
That's my fault for assuming this was covered in the existing tests.
 
The reference explorer is not a justification for a release?
 
5:30 PM
Oh dear. I thought that was released already :(
 
Well, if we want to release clean with the reference explorer, the CE merge should be clean enough to roll back.
 
No, that was the main feature of the upcoming 2.4 release.
Neither has managing attributes via annotations been released yet.
 
Can we merge master to a specific commit in next?
 
Not taking the latest next will be non-trivial.
We still need the translations.
 
6:30 PM
@this Were you still looking for instances where SCWs are in use at teardown?
2019-01-19 12:21:34.6122;TRACE-2.3.1.21944;Rubberduck._Extension;Initiating App.Shutdown...;
2019-01-19 12:21:34.6267;TRACE-2.3.1.21944;Rubberduck._Extension;Disposing IoC container...;
2019-01-19 12:21:34.6522;TRACE-2.3.1.21944;Rubberduck.UI.DockableToolwindowPresenter;Disposing DockableWindowPresenter of type Rubberduck.UI.UnitTesting.TestExplorerDockablePresenter.;
2019-01-19 12:21:34.6580;TRACE-2.3.1.21944;Rubberduck.UI.DockableToolwindowPresenter;Disposing DockableWindowPresenter of type Rubberduck.UI.ToDoItems.ToDoExplorerDockablePresenter.;
You get that when you shut down while Inspector.FindIssuesAsync is returning results.
 
 
1 hour later…
7:33 PM
The ParameterCanBeByValInspection is missing soo many tests.
 
Speaking of tests, do you see any issue with using the MockParser to in a static ctor to generate a base list of declarations?
 
Sorry, I fail to parse that sentence.
 
I'd like to get a static List<Declaration> to use on bunch of related tests. I was thinking of using the MockParser in a static constructor.
It seems silly to repeatedly parse the same test project if all I need is the declaration list.
 
You could statically cache the declarations, if they are all you need.
Alternatively, you could generate the declarations by hand.
Anyway, gtg.
 
OK, that's what I thought. I'm thinking that will significantly improve the test runtimes.
 
8:14 PM
@Comintern that and other subsystems need to listen for Terminate event to cancel their operations
 
That's kind of what I was thinking.
On the upside, the trouble with tribbles is sorted out. Needs a crapload more UTs though.
 
 
3 hours later…
11:24 PM
> What do you do in the case there is no IndexExpr in the chain because the function does not have parameters?
 
11:41 PM
@Duga Moreover, whenever you handle index expressions in a special way, you also have to do it for whitespace index expressions.
 

« first day (1688 days earlier)      last day (1492 days later) »