« first day (1292 days earlier)      last day (1888 days later) » 

8:00 PM
Didn't I change that after removing the proxies?
 
HRNPGHH!! Don't tell me the member dropdown thingkey is dependent on where the cursor is... :grunt: I was looking in the right file, just the wrong class in the file.
 
it's... yeah
feel free to pull that class into its own file (should have been done a long time ago already)
 
:HangsHead: There's a middle dropdown....
Duck Check: Dropdowns in the header of files are Project | Class | Member?
 
click on the class identifier, Alt+ENTER > R# already knows what you want to do
something like that yeah
 
Don't have R# at work.
 
8:02 PM
pity
 
indeed...
 
Guys, for late bound unit testing, have you considered using a wrapper Assert class (and Fakes), using a predeclared ID. The Assert class might look something like this:
Private LateBoundAssert As Object

Private Sub Class_Initialize()
Set LateBoundAssert = CreateObject("Rubberduck.AssertClass")
End Sub

Public Sub AreEqual(Expected As Variant, Actual As Variant, Message As String)
LateBoundAssert.AreEqual Expected, Actual, Message
End Sub
With the predeclared ID, you could then make use of intellisense, so Assert.AreEqual would work just like the early bound version
 
@Mat'sMug ^
 
hmm, our late-bound setup code looks pretty much exactly like that, no?
 
You currently don't get any intellisense
 
8:05 PM
I guess the predeclared ID would be some attribute decorating the AssertClass interface?
 
No, it's the VB_PredeclaredID attribute
on a class named Assert in the VBA project.
 
Oh (facepalm)
 
so you want to wrap the access to Rubberduck's LateBound Assert in a VBA class module to enable IntelliSense?
sounds simple and reasonable
 
yeah
 
Yeah, I think it would offer the best of both worlds (late and early bound)
I'm just thinking out loud really
 
8:07 PM
it wasn't done because we wanted to interfere as little as possible with the users' code... but I don't think it's going overboard. I like it :)
#FunFact the original VBA implementation did use a predeclared ID Assert class
 
It would only add two class modules
 
The benefits of Rubberduckin out loud.
 
and we could even have an option for it
> [x] Create Assert VBA wrapper class
> [ ] Create Fakes VBA wrapper class
 
sounds plausible.
 
yeah, that way existing (user) code would still work
that said we're really starting to need per-project settings
 
8:11 PM
What are you using to invoke the methods? Application.Run?
 
depends on the host application, but yeah
 
Yeah, vbWatchdog doesn't use Application.Run, but I don't think I can expose how I got round that ;)
Have you thought about using class modules for the unit tests instead? I guess you probably have
 
absolutely
except...
couldn't get .net to create instances
that'd be like the holy grail
 
Oh, yes you should be able to do that
 
if we can do that then we can have an actual mocking framework
wait, how?!!?!
 
8:15 PM
grab the ITypeInfo from any IDispatch object implemented by your VBA project, grab the parent ITypeLib from that, and then enumerate all the ITypeInfos in the project. Once you find one, you can call ITypeInfo::CreateInstance
 
you gotta be kidding
 
No, that should work
 
@ThunderFrame needs to see this
 
Confirming - that doesn't require the obsolete tibinfo library, right?
 
should... can't guarantee it without actually implementing it. But unless VBA screwed up the whole ITypeInfo implementation, it should work
@this no
The IDispatch interface itself exposes members to grab the raw ITypeInfo
From there you get the parent (giving you an ITypeLib). And from there you enumerate the coclasses
 
8:20 PM
Assuming that works, then we would be able to do what we need from a class and implement all tests as a class which also avoid the host-specific implementation of Application.Run
 
@this it doesn't fix that ;-)
 
The only issue is getting a hold of the initial object from the VBA project.
 
I like how you make it sound trivial
well, it is
 
You'd have to have a stub routine that passes an object to your managed side so that you can then grab the initial ITypeInfo
 
you just need to get the VBA code to pass the instance, right?
yeah
 
8:23 PM
And so you'd still need Application.Run or equivalent to get it started. But it can be any generic VBA created object that you pass
 
a bit like we grab the VBE instance with parser.Initialize Application.VBE in the (experimental) reflection API
 
There is a cheat for getting the ITypeInfo actually
 
or equivalent - e.g. get ahold of the VBA runtime's CallByName method, and invoke it
 
No that needs an object too
 
something tells me there's black magic going on :)
29 mins ago, by Vogel612
 
8:27 PM
0
Q: Handling lazy-loading webpages using vba

ShahinAfter a long try I've been able to create a script in vba which can successfully handle webpages with lazy-load. It can reach the bottom of a slow loading webpage if the hardcoded number of the loop is set accurately. I tried with few such pages and found it working flawlessly. The one I'm pastin...

 
Yeah, and I'm not sure if you'll go with it.
 
if it involves injecting precompiled assembler into user code, ...yeah not sure we want to go there ;-)
 
not yet anyway ;)
no, it's not that bad
If you grab the VBE.ActiveProject.References COM object, and grab the 5th pointer from the object pointer, that's the ITypeInfo
but I didn't tell you that
 
huh
lol
just curious about how you'd possibly find out these kinds of things
 
don't ask :)
 
8:30 PM
I didn't!
 
@Mat'sMug I never thought I'd hear this come from Mug.
 
@IvenBach lol, I know nothing
 
That's an easy way of getting the ITypeInfo without having to get any live object instance
 
Nothing is relative...
 
And that has worked since the first version of VBA6 (and VB6 as well I think)
 
8:33 PM
@WaynePhillipsEA you do know that this is "public record"?
 
Actually sorry it's obviously not the ITypeInfo( which is instance specific), it's the project ITypeLib
 
yeah was going to say :)
 
Well I could be anyone pretending to be anyone
;)
 
I could nuke it from orbit if it's too sensitive
 
@Mat'sMug Breadcrumb got me there. Not sure what it should correctly display though.
 
8:35 PM
No, it's fine. It's self obtained info, so I'm with it.
If it possibly helps you out, I don't see why I can't share it.
 
:D
thanks a bunch. FWIW vbWatchDog is quite possibly the only VBIDE add-in we couldn't eat lunch if we tried
 
Some stuff I wouldn't be willing to divulge, but tidbits like above are fine
well I'm honored to hear that :) And FWIW Rubberduck is probably the only addin I would openly recommend to all VBA developers
9
apart from my own of course haha
 
that's... wow.
 
You've made great improvements since when I last looked at it
 
Mug will now print that out and hang it on his wall, next to wedding and children's photos.
 
8:40 PM
so.. wait a minute.. if we can get the ITypeLib for the active VBA project, then we don't need to parse anything to grab module & member attributes, do we?
no mug, no we don't
 
what type of attributes do you mean?
 
e.g. VB_Description and VB_PredeclaredId/VB_Exposed
which we're already picking up in the type libs we're COM-reflecting
 
Yeah, they should be accessible
 
i.e. that code is pretty much already written
this simplifies so many things
without needing to implement a code pane from scratch
 
ouch you're not planning that are you?
 
8:43 PM
well....
 
you've got your work cut out!!
 
the idea is to have custom syntax highlighting, code folding, tearable tabs, and put the "intelli" back into "intellisense"
 
wow. that's going to be quite involved.
 
@Mat'sMug For those that don't have a description and error out I want to log them. I'm stumbling a little bit. Once you're done.
 
@WaynePhillipsEA yeah. hopefully we'll be done before Microsoft figures out a way to put the VBIDE out of service
:)
 
8:46 PM
@Mat'sMug you're ambitious, I'll give you that
 
"Bring the VBE into the 21st Century"
^ mission statement :)
 
Well, yes, a new code pane would certainly help with that
 
Some would call us duckbrained.
 
the only problem is that it would have to be design-time only
'cause no way I'm going to get my hands into the debugger
 
But.... perhaps vbWatchdog could expose some stuff to help you out
 
8:49 PM
you'd give us some compiled blackbox API to play with?
 
just thinking out loud. obviously, we'd have to be careful with regards to the non OSS nature of vbWatchdog
But if I were to expose a few things, and Rubberduck could optionally hook onto them, perhaps that could work.
@Mat'sMug, yeah, something like that. Much like the VBE itself
 
except with a better API :D
 
naturally
 
one problem is that having a .dll like that in RD's repository would make it very easy for anyone to grab and play with
 
true, but we might be able to come up with some sort of solution.
 
8:54 PM
that does sound wonderful, but maybe we should go one step at a time :)
it's not like we have ~400 feature requests on our hands that also want their share of attention :)
 
lol
 
nobody will notice if you give them a shiny new code pane and debugger
nobody will care :)
 
Sep 21 at 16:41, by Mat's Mug
Mar 3 '15 at 19:11, by skiwi
So when will you drop the IDE in which you are building the plugin, and writ eyour own IDE?
 
Yes, that might be an idea
 
Aug 21 '16 at 20:44, by ThunderFrame
Aug 14 at 11:58, by RubberDuck
Hey guys. You know how we're always joking about writing our own IDE? I bet (if we could ever find time to write code for fun again) we could fork VS Code. http://opensource.stackexchange.com/a/4292/775
so many instances of "own IDE" in the transcript of this chat..
my favorite:
Apr 17 '15 at 15:41, by RubberDuck
Yeah. Given that, you can't @RichardFoxton. Not unless you want to build your own IDE from scratch. Even the Mug and I aren't that crazy. — RubberDuck 9 secs ago
 
8:58 PM
I'd be up for that. I wrote my own frontend C++ compiler, so I've got experience.
 
ouch
 
using the superb LLVM optimizing backend compiler.
I guess we're now a little off track. sorry about that.
 
eh, happens all the time, no worries :)
 
how many core devs on this team?
 
4-5ish?
 
9:00 PM
cool
 
a handful... there's @M.Doerner, @Hosch250, myself (haven't committed anything meaningful in a long while though), @this, ...lots of recent newcomers, and even more fly-bys
 
All at varying levels.
 
I don't think Rubberduck likes parsing my vbMAPI class modules
 
hmm, parser bugs are down to near-zero by now... what's it complaining about?
 
It's taking a long time for about 20 classes
 
9:03 PM
just parsing?
I bet SLL mode is failing
(there would be a warning in the logs for it)
 
It's sitting there eating CPU%
 
that's embarrassing
no parser error reported?
 
Are there long chains of boolean expressions?
We had one bug report where this was causing an incredibly long parse time.
 
I wonder how/whether Antlr4.7 is going to improve that
 
Actually, it might, or rather the necessary grammar changes.
I think it was constantly backtracking because of the large amount of Not operators.
 
[rubberduck-vba/Rubberduck] build for commit 25ba0642 on unknown branch: AppVeyor build failed
BUILD FAILURE!
 
@Hosch250 was making progress on the Antlr upgrade, I wonder how close to a PR he's at
@Duga why are you trying to copy to the debug folder ffs
 
I'll be amazed if this eventually completes. I would guess an infinite loop, since CPU is using one core, and RAM use is static.
 
My yml looks exactly the same as the one on next.
The word Debug does not even appear in it.
 
9:11 PM
@WaynePhillipsEA doesn't MAPI generally have cyclic properties?
 
@M.Doerner I know - fwiw that comment was directed at appveyor, not you ;-)
 
maybe that's what sending the parser down a rabbit hole
 
I tested with the code. At about half the number of conditions, it completed in 2 minutes.
 
@WaynePhillipsEA and I thought @ThunderFrame's code was evil!
 
@Mat'sMug do you want me to leave it running
 
9:13 PM
@Mat'sMug did I hear Antlr4.7? :D
 
@Mat'sMug just to clarify - that's MAPI OM, not his classes that exposes it. The MAPI itself is evil, IMHO. :)
 
oh
 
Btw, each module is parsed on only one thread; the paralellism is in the modules.
 
I honestly don't think there's much evil code.
 
so it's the COM Collector that's crawling then
 
9:13 PM
Not by my standards
 
'Project Name = MyProject
'Module Name = MyModule
Option Explicit

Private MyVar As MyProject
Private MyVar1 As MyModule

Private Type MyProject
  MyModule As String
  MySub As String
End Type

Private Type MyModule
  MyVar As String
  String As MyProject
End Type

Private Type MySub
  MyVar As MyModule
  MyVar1 As MyProject
End Type

Private Type MyVar
  MyProject As MyModule
End Type

Sub MySub()

  Dim MyProject As MyProject
  Dim MyModule As MyProject.MyModule.MyProject
  Dim MySub As MySub
^ resolves fine
 
Yeah, I've got a project with similar stuff to that. Loads of edge cases for my decompiler
 
@Mat'sMug to be fair, while that's evil, it's not really cyclic. I seem to remember that with MAPI, they have list of properties that can be themselves properties to another properties that is already self-referenced.... At least that's how I remembered it.
 
but vbMAPI is nothing like that.
 
it's a type library?
 
9:17 PM
No, it's similar implementation to vbWatchdog. But that resolves fine now in the latest release.
 
@WaynePhillipsEA what about Max's question? If the library has to make use of expressions that requires lot of left-recursions that can wreck the parser.
or at least make it go really slow
 
Yeah, maybe. I'll leave it running to see if it completes
 
either it does, or some call stack ends up blowing
 
If it doesn't complete, I'll try to reduce it down. But that might be a few days before I get to it.
 
@Mat'sMug so the parser will do recursion, not loops?
 
9:22 PM
Just did a quick test with my personal 'evil' project. only 3 parser errors, which ain't bad really.
 
@this IDK. pretty sure at least some of the parser logic is recursive though
 
@this as far as I got into antlr, it is recursive almost by definition, isn't it?
 
@WaynePhillipsEA different errors? or 3 instances of the same grammar bug?
 
3 different errors
 
interesting
I can smell the colons from here :)
(right?)
 
9:24 PM
@NelsonVides I'm generally the guy who try to implement recursions as a loop... generally speaking. Sometime you really can't avoid recursions but whenever you are able, it's better to use a loop so that you never have to worry about stack overflow, only the hard drive capacity of your PC. :)
 
and line continuations?
 
But TBH, I don't think I have the brainpower to improve what ANTLR guys did soo.. there's that.
 
One looks like a colon bug, yes
 
@this most likely the problem is with our grammar, not with Antlr itself
 
@this I'm aware of the issues with recursion and stack overflows. But that's how grammars work for the most part, with heavily nested recursion.
 
9:26 PM
Dim AObject As Object
AObject.Line -(3, 4)
Line is a special method
and the above is valid, at least at compilation level
 
Rule A have some branching, decides to take Rule B, which has some more branching and it might decide to take Rule A again (and it might then take a different path C the second time it enters A, or the third, or the fourth...
 
@WaynePhillipsEA @ThunderFrame would love that.
 
@WaynePhillipsEA hmm I clearly recall seeing a parser rule specifically for that weird-syntax special instruction
 
The idea of recursion is later very well improved by compilers, sometimes. Haskell and family for example, has a very awesome implementation of tail recursion that virtually solves the stack overflow problem, making the stack frame reuse itself every time, therefore, you have a binary loop but your code is organised as recursion, which is very elegant
 
i.e. it's supposed to be handled
 
9:30 PM
@NelsonVides that's cool. I didn't know that about Haskell.
 
If True Then:
End Sub
 
@WaynePhillipsEA inside a procedure?
 
Huh
 
Sorry, yes, I didn't copy in the Sub
Sub Blah()
AObject.Line (1, 2)-(3, 4), , BF
 
@WaynePhillipsEA That's evil code. I'll slap a colleague who writes that in production. But don't take my words wrong, evil is motivating.
 
9:34 PM
hmm, it is legal
 
has to be- since that's a single line If statement, followed by an empty line then End Sub. Earlier @M.Doerner pointed out that something like If 1 = 1 Then: Debug.Print "true": Else Debug.Print "false" would be actually a "single-line If statement", in spite of the colons supposedly separating the instruction.
 
Both of these:
AObject.PSet (1, 2)
AObject.PSet (1, 2), 555 ' FLAG 2 means Color has been specified
And this: AObject.Scale
 
the good news is that they're all quite obscure edge cases :)
 
AObject.Print AVariant; Spc(5); Tab; Spc(6); AVariant, Spc(0); Tab(55)
Oh yes, absolutely.
 
@Mat'sMug The post build action is in the project file of Rubberduck.Inspections, and it has been there forever.
 
9:37 PM
@M.Doerner I know.. I don't understand why AppVeyor is trying to copy to the debug folder when it's building a release config
 
It is literaly written in the project file.
 
> Hello all. I am getting Procedure 'ButtonX_Click' is not used in the Code Inspections window on the latest release. I've only started developing the UI for the app I've been working on for the last few months and it seems all the control events are being flagged this way. I can easily stop inspecting for them but I'll lose visibility on dead code. I *think* I saw a related issue here on github but now I can't find it. Is this a regression or am I doing something wrong?

Access 2016 64 b
 
from an earlier passing build:
> RubberduckTests -> C:\projects\rubberduck\RubberduckTests\bin\Release\RubberduckTests.dll
copy Rubberduck.Inspections\bin\Release\Rubberduck.Inspections.dll RetailCoder.VBE\bin\Release\Rubberduck.Inspections.dll
1 file(s) copied
 
Well, that is probably from the action in the yml.
 
anyway, gtg. 'night all
 
9:41 PM
'night!
and thanks again!
 
thanks a lot! :)
 
@Duga dupe then
 
issue #2016 has been closed
 
> Not sure if fixing #389 (damn, that's an old one!) would help.
> Okay, I do think that I am experiencing #2016 so I'll just take your advice and '@IgnoreModuleProcdureNotUsed on my forms. Thanks!
 
9:54 PM
You still here Mug?
 
yeah
4:54PM and not much done workwise today :(
 
Could you help with a few breadcrumbs on a logger for when a resource file doesn't have an entry?
 
IIRC we have unit tests covering that already
IOW adding an inspection without its FooInspectionName resource key should make that test fail
also one for FooInspectionMeta
 
ObsoleteErrorSyntaxInspectionName didn't exist.
I wasn't getting any failing tests from it either.
 
ok, so we need two tests that do just that
ugh
        [TestMethod]
        [TestCategory("Inspections")]
        public void InspectionName()
        {
            const string inspectionName = "OptionExplicitInspection";
            var inspection = new OptionExplicitInspection(null);

            Assert.AreEqual(inspectionName, inspection.Name);
        }
ok, we need better tests for that
 
9:58 PM
that test is horrendous, btw...
 
'tis
and there's basically one of such for [most] inspections
 
It should be dead-simple to run that on all inspection types
 
@IvenBach if you're up for some more technical debt payment, that would be two very good tests to write
and fairly easy too
(and then you can nuke all these shitty InspectionName() tests)
 
I just need code writing, period.
 
@WaynePhillipsEA interesting way of finding the ITypeLib. I was getting close to finding it through the Project Explorer.
 
10:03 PM
bookmarked:

Ideas from Wayne

2 hours ago, 1 hour 38 minutes total – 244 messages, 9 users, 6 stars

Bookmarked 27 secs ago by Mat's Mug

 
by the way, coming back to the libgit native binary, I just found this: github.com/libgit2/libgit2sharp/issues/…
what I want to say: I have no idea why VS is not copying this .dll along with all the others.
 
@Vogel612 What about it makes it horrendous?
 
because it's ad 1: mostly noise and ad 2: shouldn't need to be typed out for every damn inspection
 
mostly 2
 
@Vogel612 Would the preferred manner be something of a foreach loop to check names?
 
10:10 PM
use reflection to discover all IInspection implementations, loop over them
 
^^ that
 
I've only read about reflection, never used it.
 
[rubberduck-vba/Rubberduck] build for commit 5f97d91b on unknown branch: AppVeyor build succeeded
 
@Mat'sMug I see there's a lot of these tests for the Name and Type. Is the technical debt to consolidate them all into 1 location?
 
10:17 PM
yes
17 mins ago, by Mat's Mug
(and then you can nuke all these shitty InspectionName() tests)
 
Working on understanding how to consolidate them.
 
10:33 PM
does anybody knows why VS is not copying Rubberduck.Inspections.dll into the build folder when building? :(
 
@IvenBach you'll want to get the Rubberduck.Inspections.dll Assembly. once you have the Assembly object, use GetTypes to get all the types in it. when use LINQ to filter
@NelsonVides Ctrl+Shift+B?
if you're only building Rubberduck.dll, then Rubberduck.Inspections.dll isn't being built
i.e. build the solution, not the project
 
@Mat'sMug yeap
@Mat'sMug that's what I'm doing, and with a successful build
 
post-build events in Rubberduck.Inspections.dll should include a copy operation
 
only to Debug :(
 
you're running release config??
 
10:41 PM
yeap
 
[rubberduck-vba/Rubberduck] MDoerner pushed commit 2021073b to next: Added COM release on shutdown to menu items and the command bar.
[rubberduck-vba/Rubberduck] MDoerner pushed commit 2289637b to next: Tweaks to DockableWindowHost to ensure event unsubscription.
[rubberduck-vba/Rubberduck] MDoerner pushed commit 4b899074 to next: Reverted to having the release on the SafeComWrapper and added logging.
[rubberduck-vba/Rubberduck] MDoerner pushed commit 403a9e5e to next: Writing failure to unsubscribe from DockableWindowHost's parent subclassing windows CallBackEvent to debug.
[rubberduck-vba/Rubberduck] MDoerner pushed commit a398ebbc to next: Merge branch 'next' into ShutdownIsuueAgain
[rubberduck-vba/Rubberduck] MDoerner pushed commit 25ba0642 to next: Tweaked COM release logging.
Merge pull request #3615 from MDoerner/ShutdownIsuueAgain

COM Release for menu items and command bar
[rubberduck-vba/Rubberduck] IvenBach pushed commit 919dde7b to next: Address sorting order issues
[rubberduck-vba/Rubberduck] IvenBach pushed commit eea22686 to next: Reorder to match new sorting order
[rubberduck-vba/Rubberduck] IvenBach pushed commit 36925d7d to next: Revert ordering and add explicit sort
[rubberduck-vba/Rubberduck] IvenBach pushed commit 43e75ddc to next: Merge branch 'next' of github.com/rubberduck-vba/rubberduck into Issue3485_Inspection_Sorting_Order
[rubberduck-vba/Rubberduck] IvenBach pushed commit 5f97d91b to next: Filter capabilities
Merge pull request #3622 from IvenBach/Issue3485_Inspection_Sorting_Order

Sort inspections in settings dialog
 
@Duga But but.... I'm not done with it...
 
[rubberduck-vba/Rubberduck] build for commit 008da370 on next: AppVeyor build failed
BUILD FAILURE!
 
@Mat'sMug that's what you get for merging PRs with failing build...
 
[rubberduck-vba/Rubberduck] build for commit 65b93c00 on next: AppVeyor build failed
BUILD FAILURE!
 
10:50 PM
@IvenBach Iven, if you're using git CLI, put git remote -v on your RD repo
it should show something like
 
@NelsonVides I'm not. I use VS push and sync to do it.
 
@NelsonVides -v stands for verbose? It just tells you what's going on?
 
yeap, it just give you more details
 
:+1: Thanks.
 
10:52 PM
git remote will list all the remotes connected to your repo
 
These simple things take me a long time to get familiar with.
 
to be more correct: -v is a common POSIX shorthand for the long-opt --verbose
 
as you can see in my example, there's an origin pointing to my account's repo, and an upstream pointing to the common RD repo
basically, you pull from upstream, and push to origin
 
ok where the F is that stupid command coming from
 
@NelsonVides That, so far, I've been able to understand and am comfortable with.
 
10:53 PM
one of the reasons I hate g++/gcc is that long-options have only a single dash before them... but some don't...
 
like, git pull upstream and git push origin
 
g++ --std=c++17 -lstdc++
 
git push upstream should give you urticaria as soon as you read it :)
 
and that's why I call the "central" remote blessed
 
I have no idea about VS's github's addin, so I cannot help you there, but the CLI is surely a piece of art if you want to try :)
 
10:56 PM
@NelsonVides VS's addin is a load of bullcrap
but it works enough for "sync", commit, push and actually can even switch remotes
 
@Mat'sMug I've gotten to this point. I'm mucked up on the typeof(IInspectionModel).Assembly. Trying to debug my test to see what's going on but getting a System.Io.FileNotFoundException
 
not that you could add a second remote from the UI ...
@IvenBach what about Assembly.GetCurrentAssembly()?
 
@Vogel612 wouldn't that be RubberdduckTests.dll?
 
sure, but we should be referencing into the loaded assemblies anyways
that makes the test a tad more resilient
 
@Vogel612 Doesn't contain a definition for that member.
 
10:59 PM
GetExecutingAssembly()
my bad there ...
 

« first day (1292 days earlier)      last day (1888 days later) »