« first day (2485 days earlier)      last day (695 days later) » 

00:02
RELOAD!
[rubberduck-vba/Rubberduck] 2 commits. 2 additions. 2 deletions.
[Zomis/Games] 1 commit. 1 opened issue. 1 closed issue. 3 issue comments. 2801 additions. 50 deletions.
[Minesweeper] Games Played: 247, Bombs Used: 150, Moves Performed: 31292, New Users: 11
 
2 hours later…
 
1 hour later…
03:49
I'm deeply concerned about RAD Basic, to the point where I just had to post this. Perhaps I'm being paranoid, but my spidey-sense is going into overdrive. Doesn't help that the Kickstarter is due just before twinBASIC is due to go into public preview.
such a killjoy lol
speaking of killjoy, not sure I understand the implications of this:
> Managed Debugging Assistant 'NonComVisibleBaseClass' : 'A QueryInterface call was made requesting the class interface of COM visible managed class 'Castle.Proxies.IAppTimerProxy'. However since this class derives from non COM visible class 'Moq.Internals.InterfaceProxy', the QueryInterface call will fail. This is done to prevent the non COM visible base class from being constrained by the COM versioning rules.'
oh
oh wow
so you can't do mocked.Object.DoSomething, you gotta cast mocked.Object to the mocked interface first
ooh I see the mocked invocation
this is so bloody freakin' awesome
I messed up the parameterization, but #progress
'@TestMethod("Mock")
Private Sub MockTest()

    'mock the factory interface
    Dim sut As Rubberduck.ComMock
    Set sut = Mocks.Mock("IAppTimer", "AmbientContext")
    sut.Setup "ExecuteMacroAsync"

    'invoke SUT method
    Dim mocked As IAppTimer
    Set mocked = sut.Object
    mocked.ExecuteMacroAsync

    'assert that the method was called
    Assert.IsTrue sut.Verify("ExecuteMacroAsync", Mocks.Times.Never)

End Sub
test currently blows up at sut.Verify
something something linq expression args something
actually... AssertHandler is static for a reason, no?
Verify could be void and invoke AssertHandler.OnAssertFailed..
04:28
I think I need a CreateExpression overload that takes the ITimes argument
ugh, tired
05:06
@mansellan @mansellan, yes this is planned. not priority at the moment, but it will come
 
1 hour later…
06:34
@BigBen @HackSlash If you want one let me know by sending me an email. It can be found in the RD log and filtering by author.
 
8 hours later…
14:26
@WaynePhillipsEA thanks! Looking forward to the 7th :-)
14:54
@mansellan thanks! me too ;)
 
2 hours later…
16:28
I might be Excel illiterate but it's annoying that I can't arrow keys my way around formula without Excel getting in the way
how do you deal with it?
Press F2
16:47
Interesting, was not aware of that keystroke changing the behavior of arrow keys within formula. thank you!
Software entropy. When the app has so many options that any key press has the possibility =to change the operating mode of the app in entirely unknowable ways.
yeah and there's no good way of discovering this
with menus at least, you can discover possible keyboard shortcuts but on a formula bar?
Ah, you press.......
I think you mispelt "pound"
17:33
F2 edits the formula the same way that F2 edits a filename in Explorer. So it's a Microsoftism. I have no idea where I learned it but I use it so.... Yeah? Did I just guess? I don't remember reading it anywhere.
no, not quite the same behavior. In file explorer and the like you F2 to make a non-editable textbox editable
but in Excel formula you are already editing a formula -- there, F2 changes how the arrowing behaves.
> **Rubberduck version information**
Version 2.5.1.5736
OS: Microsoft Windows NT 10.0.18363.0, x64
Host Product: Microsoft Office x86
Host Version: 16.0.13801.20294
Host Executable: EXCEL.EXE

**Description**
Rename for other parent objects finds all references to the object and renames them. At the Project Rename it does not

**To Reproduce**
Steps to reproduce the behavior:
1. Project Name is Foo and compiles
2. Have an object Bar declared whose parent is Foo
3. Have in procedure
Oh, I see what you are saying when compared to just typing with a cell highlighted. Maybe I press F2 every time and never noticed that. You can also click in to the formula bar so that the focus is on the formula bar instead of the sheet. That's the difference. When you press F2 the formula bar becomes the active object. When typing in a cell the cell is still the active object it's just sending text to the formula value.
17:50
@WaynePhillipsEA So this RADBasic guy claims to be working on a WinForms editor that will be compatible with any form. I think I read that you haven't started working on that part. Have you reached out to collaborate? If you both are working on the same thing maybe there is some synergy here? That would also get to the bottom of the concerns people have about it being a fake kickstarter.
18:09
The various modes shown in the status bar
wtf
MockException:
Expected invocation on the mock once, but was 0 times: x => x.Drives

Performed invocations:

Mock<FileSystemObject:1> (x):

IFileSystem.Drives => Mock<Drives:1>
Implementing mocking for RD?
@IvenBach TYVM
so, ComMock.Verify works, propagating the exception to AssertHandler works, ...but the invocations are ...happening against a different interface than the mocked one?
@IvenBach the Verify part :)
@MathieuGuindon verifying --- you have a Mock created for the drives?
18:14
@this didn't think I'd need one?
but yeah
well within ComMock, it's supposed to create mocks fo all derived interfaces
so if you are working with FileSystemObject, we have to mock IFileSystem, iFilesystem3 and whatever
so I'd double check that the Mock.As<> is called on the object correctly
        [Test]
        [TestCase(IID_FileSystem3_String)]
        [TestCase(IID_FileSystem_String)]
        public void Mock_Verify_WithSetup_WithExpectedInvocationCount_Passes(string IID)
        {
            var pUnk = IntPtr.Zero;
            var pProxy = IntPtr.Zero;

            const int expectedAssertsCompleted = 1;
            const Rubberduck.UnitTesting.TestOutcome expectedOutcome = Rubberduck.UnitTesting.TestOutcome.Succeeded;
            var assertsCompleted = 0;
            Rubberduck.UnitTesting.TestOutcome outcome = Rubberduck.UnitTesting.TestOutcome.Unknown;
ooh
yep, that part:
                foreach (var setupData in setupDatas)
                {
                    var builder = MockExpressionBuilder.Create(Mock);
                    builder.As(setupData.DeclaringType)
                        .Verify(setupData.SetupExpression, Times, setupData.Args)
                        .Execute();
                }
yeah, you may need to do it for all tyeps
18:19
oh sheet
ok hold on hold on
            try
            {
                foreach (var setupData in setupDatas)
                {
                    var builder = MockExpressionBuilder.Create(Mock);
                    builder.As(setupData.DeclaringType)
                        .Verify(setupData.SetupExpression, Times, setupData.Args)
                        .Execute();
                }
            }
            catch (TargetInvocationException exception)
            {
                if (exception.InnerException is MockException)
I need to invoke OnAssertFailed if all invokes fail
ok, good and htis in fact mocks all the interface, right?
should yeah
I think I know what's going on
drumroll...
    var throwingExecutions = 0;
    MockException lastException = null;
    foreach (var setupData in setupDatas)
    {
        try
        {
            var builder = MockExpressionBuilder.Create(Mock);
            builder.As(setupData.DeclaringType)
                .Verify(setupData.SetupExpression, Times, setupData.Args)
                .Execute();
        }
        catch (TargetInvocationException exception)
        {
            if (exception.InnerException is MockException inner)
            {
bingo
i haz a green test
18:35
Congrats!
You've unlocked the arcane knowledge of com mocking!
woot!
meta-meta-meta-programming ftw
LOL
the only uncertainty I have whether we could have verifications happening on different interfaces.
that would be an edge case anyway
yeah, just not sure how likely it will happen -- I do not expect the interface to change when calling same method again
however, if you assigned the SUT variable to different variable types, that might cause a problem (but why are you doing that nayway?)
@this can I push my commits into your branch/PR?
that PR getting merged ought to bump the RD version to 2.6 or something
18:49
did you address the conflicts? if so yes, go ahead. I will need to get back to it on a new PR anyway
a thought, though - we ought to consider bumping the current prerelease as green
then make the com a prerelease as to not include highly experimental feature and get it tested by our band of hard core duckheads
I also want to verify -- you haven't gotten any errors about a type can't be cast to another type?
(rather, cast to the same type)
I was working on a type cache to avoid this problem
not yet
but, good idea
IIRC, one easy way to verify this is to make a small change (e.g. add a member) to a VBA type and then try to run the unit tests.
if type cache is working, ti'll pass no matter how many time you make unrelated changes to the type.
but if it's not, then it throws can't cast <MyVBAType> to <MyVBAType>
only problem, is that the commits are already in my [next] lol
aaand reset
woopsie, something broke on push
use the --force, Luke
19:00
Luke: "but Obi wan, why would we want to decrement from force? Won't it make it weaker?"
> This PR picks up where #4681 left off, fixing merge conflicts and adding support to `Verify` invocations on mocks.

This PR should be merged immediately (or shortly after) the version bump to v2.5.2.

`ComMock.Verify` is swallowing `MockException` and invoking `AssertHandler` static methods instead, to make a test pass or fail if the method is invoked.
@this does --force draw from the dark side?
if so, then force++ would...
then what is force?
19:07
if it's an int, then you'll get into problem as it approaches the int.MinValue or int.MaxValue
then again, maybe it's all about keeping the balance, lol
can't have the Star Wars universe come to a sudden stop when it overflows, right?
is it only me or is Github slow?
@HackSlash I did reach out to him in December. We did have some friendly discussion, but unfortunately it didn't amount to anything. I don't think it's fake, but I do think the roadmap on his website is massively off given the current project state seen in his latest videos. It will be interesting to see how well his kickstarter campaign does.
hey @MathieuGuindon not seen you around the last few times I was in
Nice, @MathieuGuindon - I like you added descriptions to the mock class. :)
making progress on mocking I see
19:13
aye!
yeah, Mathieu got tired of me wandering around for that shiny object...
Glad to see some progress as well. :)
@WaynePhillipsEA lol, and you, look at you there, making progress on checks notes ...reimplementing VBA??!! man that twinBasic project is going to blow so many minds, it's ... it's everything VB should be in the 2020s!
well you know, a man gotta have a little side project
wait, if that's your "side" project, I'd hate to know what is your main project! LOL
19:17
market it as "works with VSPets" and you'll make a fortune
:)
right? it's all in VSCode?
that's the best part tbh
lol
yes, VSCode is just superb
so when are you starting work on porting rubberduck to support twinBASIC?
@WaynePhillipsEA I'm wondering - will the tB ship with vCOM technology?
@WaynePhillipsEA Rubberduck for VSCode? Ha! ... heck, why not?
@WaynePhillipsEA does it need to be if it's already COM-visible?
(obviously having it in tB avoid the .NET dependency so there's that)
[rubberduck-vba/Rubberduck] build for commit 7fa0e325 on unknown branch: AppVeyor build failed
BUILD FAILURE!
19:21
oh noes
of course I borked a test lol
@this possibly... I mean it would be awesome.... but then that tech could be very misused by malware writers.
hmm yeah, you wouldn't want to be the enabler of bad actors. Didn't consider that.
and then if that were to happen, anti-virus scanners might start flagging vbWatchdog etc
but it might make an appearance. being able to embed both 32-bit and 64-bit binaries into the VBA would make deployment a breeze
yeah - the reference system of VBA is horribly broken and we do want to make it easy as possible to use external DLLs
BTW, you know how you use conditional compilation to change between early and late binding in VBA?... twinBASIC can do better than that ;)
19:30
oh c'mon, man. you're making me impatient for April 7th already!
yes I'm going to make you wait :)
that's unusual & cruel punishment.... :D
19:55
@this so the failing test is Verify_Compiles, ...tbh I'm not sure how to setup that test to properly evaluate whether Verify ..compiles
I guess I could assert that it throws a TargetInvocationException given a deliberately off Times parameter
the test is more concerned about validating that the expressions being fed are correct
if verify is throwing an exception, that would stop the test, no?
be back soon
so I should be asserting on its side effects on AssertHandler state
no
argh
[rubberduck-vba/Rubberduck] retailcoder synchronized pull request [#5699: [Re-]Introducing Moq Wrapper](github.com/rubberduck-vba/Rubberduck/pull/5699)
[rubberduck-vba/Rubberduck] retailcoder synchronized pull request [#5699: [Re-]Introducing Moq Wrapper](github.com/rubberduck-vba/Rubberduck/pull/5699)
20:24
[rubberduck-vba/Rubberduck] build for commit 45e69f52 on unknown branch: AppVeyor build succeeded
20:38
Nice job, @MathieuGuindon!
[rubberduck-vba/Rubberduck] build for commit 7d0b34d0 on unknown branch: AppVeyor build succeeded
@Duga hmm why this twice?
pushed 2 commits :)
@this so, it seems IComMock.Object is returning the mocked interface in the .NET side, but VBA only gets to see a IComMocked? Or I'm missing something, am I not?
@this lol, had to think about that one!
@MathieuGuindon Correct -- I cannot expose the actual Moq Mocks -- those are not COM-visible
on the VBA side, it must only deal with COM interfaces being mocked.
20:47
@this Just put it in an unchecked block. Everyone knows the force is more powerful when it's unchecked.
yeah no I mean if the mock is a Dictionary, I'd expect to be able to cast IComMock.Object to Dictionary, no?
no, you shouldn't
because it has a ICustomQueryInterface
@WaynePhillipsEA OK good to know. I wasn't flat-out calling him out on VBF, it's just that those vids do a poor job of demonstrating "realness" imo
Sorry, that's actually the ComMocked that does this:
If you look at the code, it will restrict the casting (on the COM side anyway)
so you can't get a Dictionary back out from the Object; only a IDictionary (assuming that interface is a COM visible interface). Does that help?
or am I missing soemthing?
ah, yes. not very intuitive from a VBA POV though
20:51
hmm but you can freely cast on the VBA/COM's side, no?
it's the .NET side that you may find yourself constrainted
I'm getting a type mismatch
@mansellan LOL
ahhhh
Private Sub Test1()
    Dim dicMock As ComMock
    Set dicMock = Mocks.Mock("Class1", "VBAProject")
    dicMock.SetupWithReturns "Foo", 42

    Dim idic As Class1
    Set idic = dicMock.Object
^ boom
(ignore the names, I've tweaked the mocked type 200 times lol)
Ok - just to verify...
shut down the program enitrely
restart it and then run it once - does it boom?
hm there's no program, just a class and a test module lol
type END?
20:54
uh, Excel?
(still type mismatch)
yeah
no need to totally unload Excel & Rubberduck
End won't do it, I think
restarting (and damn, file wasn't saved, makes a difference?)
no, not relevant - my concern is that the type caching is not right
because .NET's type equivalence is broken
by restarting, we clear the memory of any cached types
interesting, no type mismatch, but "something went wrong while trying to run @moduleinitialize"
20:56
what do we have in that?
'@ModuleInitialize
Private Sub ModuleInitialize()
    'this method runs once per module.
    #If LateBind Then
        Set Assert = CreateObject("Rubberduck.AssertClass")
        Set Fakes = CreateObject("Rubberduck.FakesProvider")
        Set Mocks = CreateObject("Rubberduck.MockProvider")
    #Else
        Set Assert = New Rubberduck.AssertClass
        Set Fakes = New Rubberduck.FakesProvider
        Set Mocks = New Rubberduck.MockProvider
    #End If
End Sub
hmm
do we ahve more details on what exactly goes wrong?
no debugger attached atm, so no
I guess probably due to Set Mocks = ....
which would normally point to a problem with library registration or soemthing....
maybe try rebuilding?
something is off - it's not hitting a breakpoint in ModuleInitialize, so it's not being invoked
yeah
and attaching debugger lol
of course, no repro
and test passes
no type mismatch
so, #blamecaching?
21:02
add a new member to the Class1
then try to run the test again
and here we go
(type mismatch)
yep definitely need to fix the cachin
this has detailed explanation on how it should work
ideally, when you modify a VBA type, you should flush the cache because it's no longer the same type and we need to make sure Moq doesn't try to re-use that original type
parsing should flush the cache, no?
but that's different with types coming from referenced libraries which should persist for entire session.
hmm
yeah, but we only parse VBA modules that need to be parsed anyway, so.. should flush type cache for that module
21:07
hmm I'm not seeing a invalidate method.
the little cache that could
lol
btw, why are reference stuff in the diff?
no idea, I just grabbed your branch and merged next into it
the ReferenceModel seems bogus
unless I'm actually moving the RegisteredLibraryFinderService.cs
I'm out of the loop in a couple areas.. that would be one :)
21:10
Ok, yes I think I did refactor that one -- it was originally with ComIntern's Add/Remove reference stuff
but I needed it so I moved it out
btw y'all noticed v2.5.1 beat 10K downloads recently?
ignore my prattling then - was just worried it was undoing a recent PR that we might not want undone
@this ah that's what I thought it was
No, didn't realize, nice!
hit 10.2K yesterday
21:12
@MathieuGuindon when I saw the ReferenceModel diff and the deleted file, it looked funny. I kind of wish it would be able to show that a file was moved & modified rather than a deletion with addition somewhere else in the PR
we should bump 2.5.2 and see how fast it takes
Yeah. Gotta review what merged since last August
Lots of nice little things left & right
i'll blow dust off my branch and see where I was on the type caching. I remember I was re-re-re-re-factoring the type caching to be more smort before I got frustrated with the missing members issue
it's annoying that they don't allow type redefinition
Feel free to sync it up with my fork
21:16
I'll
Unrelated -- found an interesting compiler quirk.
delete the Foo, re-type it back in. It then compiles!
but, ?ThisEnum.ThisFoo yields a error about needing a constant expression.
huh, this compiles & works:
Public Const Foo As Long = 42

Public Enum ThisEnum
    ThisFoo = Foo
End Enum
I guess it doesn't like having a module reference since it might not be the same module -- it can be only be within the module even if both are defined Public
 
1 hour later…
22:44
@this JBYCDMYS.
@IvenBach agreed but that won't stop others from doing it when they shouldn't.
That's like an intentional misuse.
one man's use is another man's abuse?
I guess. I did legitimately find one a Thunderframe easter egg while running unit tests.
23:03
thankfully that is pretty tame - in my tests, cyclic references just won't compile
(which is a good thing)
23:33
Is it 7th April yet :-)
Speaking of edge-cases, I think (when time permits, hah!) I'd like to trawl the webs for the most non-trivial VB6 projects I can find, throw them at RD, then raise issues for anything that gives the duck indigestion. Pretty sure there's edge-cases for VB6 as compared to VBA that we haven't logged yet (but happy to be proven wrong!)
@WaynePhillipsEA I suspect that VB6 forms and .Net WinForms are similar abstractions over the same underlying tech (GDI+ / COM / ActiveX) - do I have that right? If so, it sounds like a VB6 VSCode forms designer could be (easily?) adapted to support WinForms for .Net? Is that another opportunity, or do I have this all backwards?
[rubberduck-vba/Rubberduck]: 1294 stars vs. [decalage2/oletools]: 1484 stars

« first day (2485 days earlier)      last day (695 days later) »