« first day (1683 days earlier)      last day (1497 days later) » 

12:00 AM
RELOAD!
[rubberduck-vba/Rubberduck] 1 issue comment.
 
 
2 hours later…
2:26 AM
@Comintern how much more time do you need for the PR?
 
I'm just about done. I still need to merge next (most likely), redo the unit tests, and make sure I got the CodeMetricsWindow rewired correctly.
If you want to get started with a review, I can sync.
 
no rush. I was already thinking that even if you were to finish it tonight, it might be better to pre-release it for 2 or 3 days to clear out any potential boneheaded mistakes beofre we make it officially 2.4
i just need to make sure I don't end up going duke nukem 3 with the deadline. ;-)
 
Oh, I have no doubt there will be a hiccup or two.
 
> New icons (ignore the sort - that's fixed):

![screenshot from 2019-01-12 19-21-08](https://user-images.githubusercontent.com/8944005/51094552-aa754200-1773-11e9-8854-ff605a51d0ed.png)
[rubberduck-vba/Rubberduck] build for commit 0a22f250 on unknown branch: AppVeyor build failed
BUILD FAILURE!
 
3:01 AM
Nice. Every single unit test for the CE is red.
user image
2
 
well, that's an impressive achievement. :D
OTOH, it may speak poorly about the quality of the CE's UTs.
 
I think I just need to change the setup of the test VM.
 
i'm thinking the coverage for the CW's registration is .... inadequate.
 
Yup. Every single one appears to be a "sequence contains no elements" error.
I wonder if that's due to the use of the UI dispatcher to rebuild the model.
HTH do I make sure that thread has completed before proceeding in the tests?
 
well, with some gymnastics
you can look at the suspension tests for some example of that.
(whether they are good example to model after....)
 
3:08 AM
Suspension tests?
 
yeah, for the parser
within ParserStateTests class
e.g. Test_RPS_SuspendParser_Exception_Suspending_Inside_Parse
 
Hmmm... I'm currently mocking the UIDispatcher.
 
or Test_RPS_SuspendParser_Interrupted_IsQueued
 
Well there's yer problem...
I wonder if it would be easier to just mock UIDispatcher.Invoke
If the mock implementation is blocking...
Yeah, the parser tests use Thread.Sleep. That seems...less than ideal.
 
well, sleeps are supposed to be inside a block to make it all synchronous(?)
so that we can still simulate the deadlocks/whatever
note that in ohter cases, we wait on the tasks started, too.
is mock ui dispatcher something new?
 
3:16 AM
I don't really need to avoid deadlocking.
I just need it to complete before I can test the outcome. The problem is the "live" version can't update the tree nodes on anything other than the UI thread.
 
why not wait on the thread, then?
it might be also less complex to just UiDispatcher.Invoke your assert(s). That' should force it to go after the prior UiDispatcher.Invoke.
 
Let's see if this works...
_uiDispatcher.Setup(m => m.Invoke(It.IsAny<Action>())).Callback((Action argument) => argument.Invoke());
@this That would likely have the same issue. The VM doesn't care because all it needs to do after the Invoke completes is update UI.
 
curious has your VS been randomly spinning for no apparent reason?
 
Yep.
 
Ok
Annoying.
 
3:21 AM
It's been doing that for months.
I think I need to update it or something.
 
it has became more pronounced recently
I already had updated it (for a different reason) like 1 or 2 weeks ago
 
OK, cool. Mocking the Invoke behavior worked.
 
:+1:
 
9 tests failing now. All in the comparers.
 
it's nice when using interfaces even for static classes.
 
3:23 AM
A static class can implement an interface?
 
sorry I should say fake static class
IIRC, UiDispatcher and VbeEvents both are instance classes with static instance methods.
because they can't be CW-injected
(though we do provide the instances to the CW)
 
OK, comment of the day...
// this won't happen, but just to be thorough...--besides, it is good for the coverage
WTH is that test for then?
 
for coverage of course!
You don't want your pink ass flapping in the wind, do you?!?
 
:facepalm:
        public void CompareByName_ReturnsZeroForIdenticalNames()
        {
            // this won't happen, but just to be thorough...--besides, it is good for the coverage
            var folderNode1 = new CodeExplorerCustomFolderViewModel(null, "Name", "Name", null, null);
            var folderNode2 = new CodeExplorerCustomFolderViewModel(null, "Name", "Name", null, null);

            Assert.AreEqual(0, new CompareByName().Compare(folderNode1, folderNode2));
        }
^ impossible.
There is no appropriate test for that at all.
 
huh?
 
3:28 AM
Having 2 CodeExplorerCustomFolderViewModels with the same name is in an of itself an error condition.
 
ah I see.
 
Besides, if you have any Comparer<T> where that condition is false, IEnumerable.OrderBy will throw.
 
But that's OK! We have 100% test coverage, right?
Alright, fixed all the unit tests. Now to see how many are now red.
for enums used in sorting nodes --- if the values are same, doesn't that imply that the ordering of the nodes will be random?
 
They'll be in the same order as the inputs.
 
it might be me but I'd twitch if in one module procedureA (set) came before procedureA (let) while in other module, it's procedureB (let) then procedureB (set)
 
3:40 AM
So use the selection as a tie-breaker?
Or the declaration type?
 
?
you mean the position of the procedures to break ties?
 
Yeah.
 
I suppose that makes sense to some degree
esp. that there's no guarantee that the order won't be consistent
conventionally we want to order Get, Let, Set but...
 
That would be the declaration type tie-breaker.
 
hmm that worries me. Only one unit test failed.
For the purpose of reading through a list, I'd be more likely to prefer declaration types.
 
3:43 AM
Isn't that odd that everyone assumes that they'd broken tests when a change is made?
 
Granted, a well designed UT shouldn't break when you refactor.
it's just that in my mind when you refactor too much, you will break even a well designed UT.
esp if you've changed the scope somehow
the other reason for making me paranoid is that if nothing broken, it may mean it's not covered adequately.
 
OK, bunch of null parameters need to be Enumerable.Empty<Declaration>() now...
Was there an issue for case sensitive sorting on name?
Yay! One failing test.
 
OK, time to see how back I messed up the CodeMetrics window...
> Exception thrown: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in Rubberduck.CodeAnalysis.dll
Lovely.
<Sarcacm>That narrows it down a bit.</Sarcacm>
 
4:25 AM
[rubberduck-vba/Rubberduck] build for commit 4ad676e0 on unknown branch: AppVeyor build succeeded
 
runtime binder errors are awesome.
 
4:44 AM
IKR?
In fairness, I did kick CodeMetrics in the small bits...
 
5:15 AM
I think for the CE tests mocking the IUiDispatcher was the most appropriate thing to do.
Should you ever have a feature that requests a new parse on a new thread and you have to wait for a parser state, you might want to have a look at the tests for the MemberAttributesRecoverer.
That is still in my open PR regarding the corresponding topic.
 
Is CodeMetrics supposed to have a toolbar?
 
> The PR now dries the settings view model some more, providing a factory to abstract out the creation of the viewmodel in a generic manner and also remove several redundant code in the setting view models. Furthermore, the persistence service now properly depend on the IPersistancePathProvider, abstracting out the filesystem some more.
 
@Duga @this Why new up a *Settings to export it? Shouldn't that just load it from the provider?
 
@Comintern I don't recall it having one.
 
5:26 AM
Hmmm... That might need an issue.
The window doesn't have an independent way to refresh itself. Maybe a context menu on the TreeView?
 
yuck
 
That's really the only thing I can think of that would land on a toolbar in that window.
Although I might just let it be pending splitting the CodeExplorer tree off into it's own control.
 
@Comintern you mean code like this? github.com/rubberduck-vba/Rubberduck/pull/4699/…
 
Yeah.
 
that was a part of refactor -
this is now generalized but the assignments to members, I can't generalize, so it's now a parameter
e.g. service.Save(new ...
 
5:31 AM
Why can't you generalize the assignments. Just reflect the properties.
 
it's now service.Save(T)
wait - that's viewmodel writing its properties into the settings class
if we want to avoid that, then viewmodel should be backing its public fields iwth the settings class, no?
Then no reflection needed; just pass the backing settings class, right?
 
[rubberduck-vba/Rubberduck] build for commit bce77cb2 on unknown branch: AppVeyor build succeeded
 
If you have a T and a T, you should be able to do something like this:
    foreach (var property in typeof(Declaration).GetProperties().Where(prop => prop.CanWrite))
    {
        property.SetMethod.Invoke(output, new [] { property.GetMethod.Invoke(input, new object[] { }) });
    }
Just grab the settings from the VM first. There should be a method for that, and if it isn't on an interface, it should be.
 
it's currently not
 
Hmmm... I like your idea better.
 
5:40 AM
but I think that'll make more sense that VM returns a settings.
 
Yeah, I don't get why VM has to have its own properties that's basically a copy of the setttings (the model)
might as well modify the model directly, no?
well, I do get why a viewmodel may need additional properties or whatever that's not a part of the model. But in those case, the properties are basically the same thing...
will refactor that some more tomorrow.
 
Wow, I completely gutted the CodeMetrics window.
 
wasn't it sharing some of XAML w/ CE?
 
Copied and pasted.
I just deleted ~175 LoC to make it work again.
:-D
 
5:48 AM
well, that's better, no?
 
Much better.
The performance hit was x2, because both windows were refreshing using the same horribly inefficient method. Even if they weren't visible.
 
:O
 
The TreeView really needs to be its own control.
...with a common node provider.
That would cut the synchronization work in half.
 
well, we'll have to first solve the problem of creating custom control.
which for some reason doesn't work in RD.
 
I think it might just have to do with the Core build.
Tangentially. It's much, much easier to break something horribly now without getting a warning.
 
5:51 AM
because of the new build or because of hte refactoring?
I wondered whether WPF stuff would be happier in their own solution.
 
Because of the build.
R# highlights broken bindings, etc., but it relies on having a current design-time object to work with.
 
Yeah. Not sure we can do much until .NET Core 3.0 is RTM'd.
(or going back to old skool gazillion-lines csproj format)
 
Yeah, I'm not too worried. I've pretty much got the build work-arounds down now.
 
5:54 AM
^ Needs meatbagging.
 
just to clarify - did document modules get their icons?
 
Nope. That's a more involved PR.
 
ok
 
I'm going to do that when I abstract out the Host a bit more.
It should be fairly easy to add now though. The icons all come from a converter now.
 
5:59 AM
you're thinking about having the IHostApplication providing the icons?
 
A node has no business keeping track of it's own icons.
@this Possibly - it seems like a good place for it. Something like IHostApplication.GetIconForDocument.
 
 
1 hour later…
 
3 hours later…
10:19 AM
> When I select a Form in the CodeExplorer and click on "Open Designer" nothing happens.

The same Nothing happens when I choose "Open Designer" in the Context menu...

In the VBE-build-in-Explorer the function "Show Object" works...
 
 
1 hour later…
11:47 AM
> What Version are You on? Because this issue has been previously raised and fixed at #4605
> This is my version:

Version 2.3.0.4221
OS: Microsoft Windows NT 10.0.16299.0, x64
Host Product: Microsoft Office 2016 x86
Host Version: 16.0.4711.1000
Host Executable: MSACCESS.EXE
 
12:12 PM
> This is the same version as reported in the linked issue. Please update rubberduck to the current latest green release (v2.3.1.4308) and check whether the issue persists.
> Hmmm...now I installed:

Version 2.3.1.4308
OS: Microsoft Windows NT 10.0.16299.0, x64
Host Product: Microsoft Office 2016 x86
Host Version: 16.0.4711.1000
Host Executable: MSACCESS.EXE

Now the "Open Designer" button in the CodeExplorer is grayed out and the function does not appear in the context menu anymore...

...so its still not possible for me to open the design view of my form.

As I found out now this happens only with Access-Forms.

With Userforms it seems to work. Sad
 
12:58 PM
> Access Forms are possibly a special beast... They are possibly not recognized as components with a Designer.
[rubberduck-vba/Rubberduck] Vogel612 did something with some project card
> Access Forms are a special beast... They are possibly not recognized as components with a Designer.
 
Today I came across this:
With SomeClass
Set SomeClass = Nothing
End With 'SomeClass Terminate event only triggered now
I fully expected the terminate event to be triggered at ...=Nothing. For some reason the class is set to Nothing but the terminate event is held until the End With. What is the rationale for that?
 
I assume it's because of the following:
With SomeClass
   .Foo ' works just fine
   Set SomeClass = Nothing
   .Foo ' still works just fine
End With
I'd be very surprised if you could set a with-block's internal reference to Nothing
 
1:14 PM
With SomeClass
   Set SomeClass = Nothing
   Debug.Print SomeClass Is Nothing 'returns True
   .Foo 'still works
End With
And yet the class thinks it is equal to Nothing before .Foo
 
yea. SomeClass and the with block's internal reference are separate things
SomeClass is a reference to an instance of the class and the with block's internal ref is one as well
 
And which is responsible for triggering the Terminate event?
 
now if you set SomeClass to Nothing, the reference-counter is decreased
 
@Duga no, we still can use View Object command to open forms in design view from VBE. One caveat is that if it is already open, design or not, then the command simply set focus to it.
 
and when the with block reference is released, the reference-counter is also decreased
 
1:18 PM
Terminate can only be triggered when ref count decreases to zero.
I bet you will see similiar behavior if you replaced the With with a second variable set to the same instance.
 
> From VBE's perspective, an Access form or report does not have a designer because you do not design it in VBE, but in the Access host.

We can get close using VBE's `View Object` command. However, if the Access form/report is already open, regardless whether it is open in design view or. In normal/datasheet/layout view, the command will merely set focus to the object. Thus it is not a 100% equivalent substitute.

Nonetheless, we can determine if the module is a document module in which cas
 
1:35 PM
Ahh okay, thank you both
 
1:47 PM
> A more complete solution could be in this form:

1) Add a `bool CanOpenDocuments()` and `bool OpenDocument(QualifiedModuleName module)` methods to the [`IHostApplication` interface](https://github.com/rubberduck-vba/Rubberduck/blob/c13d151132c32d175fe763d65264f176bee39d40/Rubberduck.VBEEditor/SafeComWrappers/VB/Abstract/IHostApplication.cs)
2) Implement virtual methods in [`HostApplicationBase` abstract class](https://github.com/rubberduck-vba/Rubberduck/blob/c13d151132c32d175fe763d65264f17
 
2:47 PM
> Today I was setting breakpoints rather than debug.assert statements, and would now like to revisit all the breakpoints to see what I was checking. Could there be a command to list all breakpoints, with a doubleclick on the list to go to each?
 
@Duga people casually asking for the holy grail, eh?
 
> Breakpoints aren't exposed anywhere in the extensibility API, and AFAIK they're one of the roadblocks to a custom code pane. If/when we crack that nut, we'll definitely have navigational enhancements for them though!
 
lol good luck with that
 
@Vogel612 that's what you get for doing magic things: people expect more magic things
@WaynePhillipsEA IKR!
 
@MathieuGuindon did you see the latest email that went to devs@ ?
 
2:52 PM
hmm
browses inboxes
 
how many different inboxes do you have?
 
retailcoder, mathieu.guindon, rubberduckvba, rubberduck-org
Moritz'?
"Git Repository"
that one had slipped through actually
(only noticed it now)
 
the temporary disable
@MathieuGuindon huh?
 
@Vogel612 nah that was an older one
@Vogel612 oh wow
 

« first day (1683 days earlier)      last day (1497 days later) »