« first day (1023 days earlier)      last day (2157 days later) » 

12:00 AM
RELOAD!
[Hosch250/Rubberduck] 39 commits. 18891 additions. 11112 deletions.
[rubberduck-vba/Rubberduck] 1 closed issue. 4 issue comments.
 
@Mat'sMug I think it is pretty good.
I've been adding to it as I need to.
 
Did you add your own unit tests and made code to confirm each section works with or with errors for both Excel and Access @ThunderFrame?
 
12:25 AM
typo in your Question Title "litgeral" — Ron Royston 4 mins ago
^ LOL comment of the day.
 
12:52 AM
[Hosch250/Rubberduck] Hosch250 pushed commit ae55bfd6 to RemoveParamsRewriter: Kill the extra parse in Extract Interface
 
@Mat'sMug Happy Birthday!
 
@PeterMTaylor This only relates to usages of controls on MSForms.UserForm designers. Host implementations/wrappers may and do differ. MSForms.Textbox on a UserForm <> Textbox on a worksheet <> Textbox on a PowerPoint slide <> Textbox on an Access Form/Report.
 
[rubberduck-vba/Rubberduck] build for commit ae55bfd6 on unknown branch: AppVeyor build succeeded
 
@Hosch250 huh??
 
heck, even Control on an Access.Form <> Control on an Access.Report, and Access.CheckBox <> `Access.[_CheckboxBoxInOption].
 
12:56 AM
I got the extra parse killed.
It's a joke around here when someone gets a big present, that other family members say "Happy birthday," regardless of the date.
 
> Note If these functions are passed NULL pointers, there will be an access violation and the program will crash. It is your responsibility to protect these functions against NULL pointers.
 
Controls are badass special PITA
 
KTHX, OleAut32.dll
 
This is not an answer. JS has as much in common with VBA as Java does anyway @JohnColeman ;-) — Mat's Mug 16 secs ago
@Hosch250 oh nice!
 
JS is actually easier to run from VBA, but stupider.
 
12:59 AM
@PeterMTaylor but yes, I invoked every IControl member against each of the controls, and captured all of the errors.
 
That is kind of a big PR.
Extract interface, remove/reorder params all updated. Module rewriter expanded. Grammar modified. Quick fix updated to use the modified grammar.
So, either try to review it, or just merge it and take a gamble.
> +3,537 −4,130 (33 files) (11 commits)
 
Just took a look at a crash dump - it seems that vbe7 is trying to free the memory that I'm allocating with Marshal.AllocHGlobal and falling on its face.
3
 
huh, why would it try to do that?
@Hosch250 my phone doesn't agree, and since it's a green build...
 
I'm not exactly sure. Looking through the oleaut docs right now to see if there's some standard that I'm missing.
 
1:09 AM
> For VT_BSTR, there is only one owner for the string. All strings in variants must be allocated with the SysAllocString function. When releasing or changing the type of a variant with the VT_BSTR type, SysFreeString is called on the contained string.
 
[rubberduck-vba/Rubberduck] retailcoder pushed 12 commits to next (only showing some of them below)
 
Global strings table?
 
Probably what's keeping "" from being allocated every time it's seen in code
 
[rubberduck-vba/Rubberduck] build for commit 1656ee9e on next: AppVeyor build succeeded
 
Probably. I wonder how it partitions access though.
 
1:17 AM
Ok this guy is getting on my nerves
Of course the size of a regex has nothing to do with its performance.. FWIW I do use regex when they're the right tool for the job - and I have a registered Expresso install on 4 machines, and a regex analyzer feature in my VBIDE add-in OSS project. I don't hate regex. But I use a screwdriver for screws and a hammer for nails. If String.split gets it done, a regex is not warranted. — Mat's Mug 22 secs ago
Reminds me of that "I know regex!" XKCD
"I suggest expanding your horizon with regex tools" ...seriously
I think I need a drink
 
I have no clue why he's harping about regex anyway. His answer is a sh!ttier version of the other answer suggesting split.
 
That's the thing - it's not even his answer!
 
LOL - I didn't even notice that.
 
I bet his code is littered with regex wherever he could see a use for one
 
1:33 AM
@sin - Looking forward to your faster, more maintainable regex answer. Also, I suggest you expand your horizons with xkcd. — Comintern 9 secs ago
 
Ouch
 
I'll bite. Talk the talk, let me see you walk the walk.
 
@Mat'sMug Your phone doesn't agree about what?
 
@Hosch250 reviewing a PR from a trusted contributor
 
Oh.
Is it time to redo IsBuiltIn, or is there something else?
 
1:40 AM
Well there's BZngr's pending PR...
 
Want me to do something about it?
 
Care to branch off of it and fix it up + merge?
 
Not until it is merged.
Does it touch IsBuiltIn at all?
 
not sure, but inverting the IsBuiltIn logic should be done without anything pending
 
In other words, never?
 
1:42 AM
lol
 
There are usually about three things in progress/pending.
Comintern, you, me, and various other contributors.
 
eh, I think I'm just semi-subconsciously trying to get you to review & fix that PR so it can be merged... I don't want it to remain open for another week like the previous one
 
OK.
 
@Hosch250 I'm not touching anything outside unit testing ATM.
Well, until I find the memory offset for the WaitForDebugEvent callback...
 
@Comintern wait, you weren't joking about hijacking debug.print?
 
1:51 AM
Nope, I've wanted to do that for years. There's a callback there somewhere.
; Attributes: thunk

_crt_debugger_hook proc near
jmp     ds:__imp__crt_debugger_hook
_crt_debugger_hook endp
I just need to get my claws into it.
3
 
Making RD work in VB6 is becoming harder by the minute ;-)
 
Nah, all you need to do is change the target library.
 
@Mat'sMug Reviewed. I hate those tests.
 
@Mat'sMug I've updated and re-synced since the comments yesterday
 
Huh, it doesn't notify the hook until you submit the review?
 
@BZngr It looks mostly good, except for the tests.
 
Extracting the input/expected into a separate static class makes more code to maintain, and it is less obvious what the test covers.
And, the value(s) are entirely irrelevant everywhere else in the project/solution.
And what happens when the test expectations change?
I just cleaned up some refactorings, which changed the whitespace expectations in the tests.
It was easy to go right to the failing test and fix it because the code was embedded in the test, but this would be much harder to fix.
I've got my nightly headache again, but I'll probably pull it into VS, inspect it with R# enabled, and give a more comprehensive review tomorrow.
 
2:00 AM
> Note The VariantCopy method is not threadsafe.
Is it safe to assume unit tests are only running on a single thread?
 
@Hosch250 ok- I'll re-org the tests.
 
@ThunderFrame - Would the SHGetPropertyStoreForWindow function be useful for collecting control properties at runtime?
 
2:16 AM
@Comintern You'd have to be able to get an hWnd though... You're assuming that [_GethWnd] returns something other than 0?
 
Yeah, I'd think it would. Let me check really quick.
Doh! It returns 0.
 
some controls return an hWnd, but not all
ListBox returns an hWnd, but Label/Textbox/Checkbox/others don't
 
@Hosch250 that's me. I thought we could possibly streamline the tests with a somewhat standardized set of inputs that we could reuse... might not have been a stellar idea now that I read your arguments against it
@Comintern should be. The VBE would puke itself if we ran tests concurrently... And AssertHandler couldn't handle it either
 
@Comintern RD's reference collector already knows the control-specific properties that are exposed. But, for example, myUserForm.TextBox1 extends all of the Textbox properties and all/some of the IControl members (as per the table I posted).
 
@ThunderFrame Yeah, I was thinking that it might be possible to grab a different interface from it. F3 or whatever it is has to be decorating it with something, otherwise you couldn't pass them as Object or coerce them into a Variant.
@Mat'sMug OK - I'm looking for some generic API function that returns an allocated Variant of just just about anything that I can grab the memory allocation from. Should work if I never marshal the pointer...
^ Famous last words. If you don't hear from me in a while, it was a horrible crash.
 
2:24 AM
I haven't found a control to test with, but MS anticipated that some control designers would implement member names that might clash with the IControl members. For example, if you had an ActiveX that exposed a Height property, then calling myUserForm.MyControl.Height would return the IControl.Height and myUserForm.myControl.Object.Height would return the control's Height member.
or, you could do:
Dim foo as myCustomControl 'or As Object
Set foo = myUserForm.myCustomControl
Debug.Print foo.Height
 
I wonder if we could just create "prototype" declarations to put in a lookup and then just call QueryInterface.
@ThunderFrame That code seems to indicate that it's passing a different *IDispatch depending on what collection it's held in.
Which makes sense, I guess - the collection would just be an array of interface pointers.
 
@Comintern wait, what?
you're deep in the rabbit hole man!
 
OK, so we just make a set of dummy interface Declaration, and "attach" to them when we resolve controls. Call QueryInterface, find out what interfaces it supports, then copy member specific Declaration for the control in question. VBA wants to run-time resolve them? Fine. We'll do the same thing.
 
That's why the ListView4.BoundControl is special/problematic. In the case of a ListView4 control, a ListView4 doesn't have a BoundValue property of its own, and nor does IControl seemingly extend BoundControl to a non-MSForms control. but if a custom control did have a BoundValue member, then it would be reachable as long as you weren't coding against an IControl instance.
 
That may just be a matter of where you're requesting an interface from. An IDispatch pointer can be specific to a parent interface. If we get the IUnknown, we can just ask the damned thing "what interfaces can I cast you to".
I have no clue why this didn't occur to me months ago. That's how COM is supposed to work.
 
2:34 AM
@Comintern Access a control using FormName.ControlName.MemberName and you get IControl members and the control's members. Same if you use FormName.Controls("ControlName").MemberName.
 
Right, but it depends on which IDispatch it's returning. Remember that IDispatch is a parent interface that lies in front of the derived interface in a vtable.
If an object supports 4 interfaces, whatever container it's in can basically feed you any of the 4 IDispatches that it wants.
All of them should point back to the same GetIDsOfNames implementation, but the members might very well not be available on any specific interface
 
but, if you Dim x As ControlType, or Dim x As Object, then Set x = FormName.ControlName, then you typically only get the non-hidden members of the ControlType
 
But... since they are 4 different vtables, any one of them could return different members for the same object, especially if they're being extended by a container that hosts them.
 
BoundValue and InSelection being 2 hidden members that are exceptions to that rule.
 
Basically, Dim x As ControlType and Dim x As Object could be pointing to completely different vtables for the same object.
 
2:41 AM
@Comintern Yes, but it seems VBA is extending individual, built-in MSForms controls with some/all of the IControl members, depending upon the control. For Custom controls (i.e. everything not defined in MSForms), it exposes a fixed set of members.
so we still need to special case the MSForms controls
 
^ absolutely.
I was mainly considering implementation of special casing.
Instead of hard-coding it, we might just be able to "ask" the control what declarations it needs us to build.
 
RD should know that accessing the Default (member named Default, not member with disp_id = 0), of a control is a run-time error for everything except a CommandButton
 
Thanks for that naming BTW, MS.
 
Wait does that mean we could connect the dots between Range and Range.Value? Because ATM the best we have is Range._Default being the default property of a Range
 
Actually, if we can get the control to cough up its typelib, we might just be able to pass it through one of the Com* objects.
@Mat'sMug AFAICT, no. Although, if we load the raw vtable we might be able to see if they point to the same function offset in excel.exe.
 
2:51 AM
I suspect that most ActiveX controls that were designed for VB6 would implement the interfaces required for OLEObjects ^.
 
Just ̶t̶h̶i̶n̶k̶i̶n̶g̶ typing out loud here... If we know the size of a pointer on the platform and the number of members on an interface, we could marshal the pointer into an array and have access to the vtable...
 
So COMCollector becomes COMHunterAndCollector?
 
COMHunterGatherer?
I wonder if I can point a native vtable entry to a managed delegate...
 
♫ Woke up this morning,
from the strangest dream
I was in the biggest VBA project,
The world has ever seen
We were marching as one,
on the road to the holy grail ♫
5
@Comintern yep, but couldn't help the band reference
 
I was thinking mocks. Screw emitting an interface - just hack the existing one to point at a Delegate[]. Like this answer on quack.
 
3:00 AM
why do I get the feeling that by the time @Comintern is done getting COM into managed code, he'll have managed code running in the VBE?
 
The VBE will be assimilated.
 
Neo?
 
Rubberborg
 
Follow the white rabbit
 
3:08 AM
Will you take the red duck or the blue duck?
2
 
What sort of lousy explanation is that? 1. Object is read-only. 2. How do I assign a property or method? 3. WTF?
It's like the author copied the text from somewhere and didn't understand the point of Object
 
lol
 
Huh. I wonder if I can fake ReDim. No clue why you would need that...
 
@Comintern Ooh, fake Preserve
 
3:13 AM
> The data is preserved for elements that exist in both the old and new array.
wtf do we have redim preserve for then?
...when you dig up dirt...
 
A bunch of the VBA functions are straight up passthroughs to oleaut.dll.
@Mat'sMug IKR?
A keyword that prevents a separate clear call?
Some of this stuff is @ss backwards.
Fakes.BinaryAnd.Returns H&FFFFFFFF
 
A: C#. VB.NET Linq syntax is a horror show.
 
@Comintern Yeah, if you use the method version.
If you write it in SQL-style, it isn't too bad.
 
I find predicates much easier to read.
 
3:20 AM
Me too.
VB.NET does support predicates, but that is a horror show.
And C# does support the other style too.
 
Yeah, every now and then R# will suggest SQL style for for-each loops. I usually take that to mean I need to optimize the predicate.
 
@Mat'sMug I assume VBA uses SafeArrayRedim when the Preserve keyword is present, creates a new array if Preserve isn't present.
 
IOW ReDim is a scam.
 
^
This is the asm:
loc_10200A28:
lea     eax, [esp+24h+psaboundNew]
push    eax             ; psaboundNew
push    dword ptr [esi] ; psa
call    ds:SafeArrayRedim
test    eax, eax
js      short loc_10200A48
 
Redim without Dim
 
3:27 AM
That's followed by a call to SafeArrayDestroy on one of the jump paths.
 
> Methods may return an instance of [ValueTask<TResult>] when it's likely that the result of their operations will be available synchronously and when the method is expected to be invoked so frequently that the cost of allocating a new Task<TResult> for each call will be prohibitive.
12
A: Why would one use Task<T> over ValueTask<T> in C#?

Stephen ClearyFrom the API docs (emphasis added): Methods may return an instance of this value type when it's likely that the result of their operations will be available synchronously and when the method is expected to be invoked so frequently that the cost of allocating a new Task<TResult> for each call ...

We have a few places in RD that would benefit from that, although I can't think of any off-hand.
 
@Comintern Isn't it CreateErrorInfo that you want?
 
Both I think. I need CreateErrorInfo to create the object, SetErrorInfo to pass it.
Trying it now.
 
And that will create an error without raising one
 
I'm about to find out. :-D
 
3:38 AM
I'm so tired... bedtime
 
'night
 
Night.
 
 
1 hour later…
5:09 AM
@Comintern good luck raising these dead objects 💀 if this method works with their errors info that RD will provide.
 
 
6 hours later…
 
3 hours later…
2:24 PM
[rubberduck-vba/Rubberduck] retailcoder pushed 26 commits to next (only showing some of them below)
[rubberduck-vba/Rubberduck] BZngr pushed commit 928a8780 to next: Updated test to exactly match #2873 issue description
[rubberduck-vba/Rubberduck] build for commit a1a8ec21 on next: AppVeyor build succeeded
 
 
3 hours later…
5:41 PM
Starting on IsBuiltIn.
Personally, I don't see what's wrong with it, but...
What does it matter if we ask it whether it is built in or whether it is a user declaration?
Is IsUserDefined a good name?
 
6:04 PM
This is going to break any serialization that's already done...
 
 
1 hour later…
7:28 PM
[Hosch250/Rubberduck] Hosch250 pushed commit 410c9892 to RemoveParamsRewriter: Change IsBuiltIn to IsUserDefined. Also clean up the code some.
 
You wouldn't believe how many instances I found of state.AllUserDeclarations.Where(d => !d.IsBuiltIn)
Also, I make AllUserDeclarations cache the results until the next reparse.
So, it refreshes the list when it hits Ready. Oh, it needs to refresh the list when it hits ResolvedDeclarations.
Oh, well, I was wrong on both counts.
It currently refreshed any time the state changed...
I changed it to only refresh on ResolvedDeclarations.
That should speed up the inspections significantly.
Hmm, that broke three tests.
It worked fine when it just refreshed on parser state changed, maybe I should go back to that.
Doing it on just Ready breaks the unit tests and code explorer.
Ah, it is breaking the annotations and undeclared variables to just do it on ResolvedDeclarations.
Why it breaks the annotations, I don't know--those should work just fine...
Oh, I see:
ReDim orgs(0 To items.Count - 1, 0 To 1)
 
@Hosch250 because it's not "built-in" - it's anything coming from any referenced library. the initial implementation was too naive, there was user stuff and then "built-in" stuff, which was all hard-coded
 
It doesn't break the annotations, it just breaks the undeclared variables.
@Mat'sMug OK.
 
@Hosch250 just that probably gave us a perf boost
 
So, I need to run it on ResolvedDeclarations for some of the features.
Then, on Ready, I need to add the undeclared variables.
I can probably just do Add(declarations.Where(isNotDeclared)).
 
7:41 PM
@Hosch250 ideally undeclared stuff should go in as soon as possible; some inspections just recently started picking them up. use meaningful name comes to mind
 
@Mat'sMug The inspections run on Ready.
 
Can you make them triggered by the coordinator?
 
So, I'm running this when the state changes to ResolvedDeclarations and again when it changes to Ready. Before I fire StateChanged.
@Mat'sMug The coordinator?
I'm in OnStateChanged in RubberduckParserState.
 
The ParseCoordinator, the big chief
 
OK, make what triggered by that?
Selecting the user-defined declarations?
 
7:44 PM
An explicit call; launch the inspector task before hitting ready state
 
@Mat'sMug No, I can't.
Because we need to hit the ready state before we have our list of declarations.
I mean, if I'm going to keep the caching, that is.
It goes like this:
 
we need to get inspections under the coordinator for next release though; it's the only way we can get them to cancel properly
 
1) Something triggers/requests a state change
2) Update AllUserDeclarations, if applicable
3) Fire the StateChanged event.
I see.
Well, that'll be a big-enough project in itself. Shall we merge this first, or no?
Yes, I can do that.
 
sure
 
[Hosch250/Rubberduck] Hosch250 pushed commit c2a5fa78 to RemoveParamsRewriter: Reduce overhead when updating AllUserDeclarations
[Hosch250/Rubberduck] Hosch250 pushed 28 commits to RemoveParamsRewriter (only showing some of them below)
[Hosch250/Rubberduck] BZngr pushed commit 0c64b1b7 to RemoveParamsRewriter: Some attempts at optimization
 
7:49 PM
right now if you trigger a reparse from the inspections toolwindow you can get multiple threads doing the same thing.. it's quite a killer
 
Don't merge that.
I forgot to pull @BZngr PR.
Oh, NVM, it looks fine.
 
I had merged it already
 
Yeah, I know.
I hadn't brought it into my fork.
 
[rubberduck-vba/Rubberduck] build for commit f61a1568 on unknown branch: AppVeyor build succeeded
 
Looks like it's fine ^
 
7:51 PM
Woot!
 
I went through all the Declaration implementations and moved them to C# 6.
 
good job @Hosch250
 
I did a partial update for RubberduckParserState and a bunch of other stuff as I was in it, too.
 
[rubberduck-vba/Rubberduck] build for commit 967c8134 on next: AppVeyor build succeeded
 
7:54 PM
@Hosch250 There is a spot in the ParseCoordinator where we are technically in the Ready state but it is not set yet.
 
Yeah, I know.
 
That would be the ideal spot to launch inspections, no?
 
It's the point where the undeclared declarations get added.
IDK
 
We may need to introduce a new "Inspecting" state
 
It is in ResolveAllReferences.
 
7:56 PM
@M.Doerner then just after that =)
 
@M.Doerner That's the tricky point.
 
That would be cleaner.
 
You see, we set the state on each module individually.
And in RubberduckParserState, we fire the StateChanged event when they are all Ready.
So, technically, as soon as the last module is ready, it fires.
 
I know, and I made it possible to postpone the evaluation of the overall state to an explicit call.
 
OK, so this is what I think I'll do.
 
7:58 PM
It does not fire after the last module is ready.
 
Or we split the ParserState enum into ModuleState and ParserState, and no longer need to hack up module states
 
I think we do need an inspecting state.
 
I already postpone firing the state change in order to handle the undeclared variables and the module to module references.
^
I prefer the inspection state.
 
private const int _maxDegreeOfParserParallelism = -1;
@M.Doerner What in the world is that?
 
That can become some advanced setting.
 
8:00 PM
Task.Run already uses the optimal number of threads. A Task is not a thread.
 
It controls the degree of parallelism in the Parallel.ForEach for module parsing.
 
We don't need an advanced setting, because .NET is already smarter than all of us combined.
 
-1 is automatic mode.
When I change it to 8 on my machine, parsing takes 10-15% less time.
 
Because you are basically starving other programs.
 
I still never get beyond 80% CPU usage.
 
8:03 PM
My system rarely goes above 50% on two of my 8 half-cores (whatever they are called).
I don't know why, but I'm guessing it is to prevent heat buildup.
 
hyperthreaded cores
I have 8 of them, too.
 
It gets hot enough on two--it cracked my wooden table.
 
I have a desktop PC in a big tower. So, no problem there.
 
Well, I won't change it, but I think we should probably just keep it at the standard level.
 
-1 is the default.
 
8:05 PM
I know.
 
Still, at some point we might expose it as an advanced setting. I agree, for now, we should not do that.
 
@Mat'sMug Did you already merge the inspections refactoring?
If you did, I can do that inspection I assigned to myself and start the quick fix refactoring.
 
There's no pending PR ATM
 
One more reason why I think we should get an 'Inspecting` state, which should have the refresh button activated, is that atm the user has no idea whether the inspections are still running or not.
 
You don't have anything in your fork?
@M.Doerner Well, the inspections UI spins.
 
8:12 PM
But you have no idea when you just reparse and do not want to look at the inspection results.
 
Then the user doesn't care whether the inspections are running.
 
Well, them running basically means that you should not start a new parse unless you want to completely drain your system.
That is, until we are finally able to cancel the inspections.
 
That's precisely what I'm going to do.
Heck, you know what?
Maybe we should expose the parse cancellation token in the event?
That way, anything running on the handler can just use it.
 
I think, when we finally trigger the inspections from the ParseCoordinator, we should allow to pass a flag to the ParseCoordinator, possibly via the event args of the ParseRequestedevent, that indicates that the inspections do not have to run.
Running the inspections after a refactoring, inparticular during the ExtractMethodrefactoring, does not seem to be too useful.
 
So, maybe we'd want to cancel updating the Code Explorer, or whatever.
@M.Doerner We have to run them to update the selection info, at least.
On the other hand, we need to be able to run them on a single module.
Don't you think, @Mat'sMug?
Or a collection of modules.
So, maybe an Inspect(IEnumerable<IVBComponent>)?
 
8:20 PM
That brings me back to the point that I still want to pass an IDataForInspections to them instead of the state.
 
Hmm, what would that data include?
Would it basically be to inspect a collection of modules, or would it be a selection of targets, or what?
 
To see wht is needed, I would have to have a look at the inspections.
When we pass an interface, we could for example could pass just the declarations on a restricted set of modules instead of all declarations.
The inspections should not care.
In my eyes, that would be a first step to run the inspections only on modules that have changed.
 
I think we should just pass a collection of IVBComponents. That way, we could get only the declarations/parse trees for those components.
 
I would use QMNs instead.
 
Oh, makes sense.
Except I think we are trying to reduce our usage of those.
 
8:26 PM
Basically everything uses them as keys.
 
Those, IIRC, are really expensive.
Maybe it was something else.
The ones we only use for unit testing, and so we lazily load them.
 
The only thing that is expensive is their reference to an IVBComponent.
Still, I do not see the great benefit of passing the collection along with the state to the inspections.
I would rather get rid of the direct coupling between the state and the inspections.
 
Everything uses the state.
 
In both cases, we have to change all inspections, but with the interface in between, we never have to do it again when we want to change the data passed to the inspections.
That is the problem.
 
Well, we are changing the inspections anyway, but I see no reason to not let them use the state.
We designed it so it would have everything needed to get rid of the dependency on the direct parser.
Basically, the state is Rubberduck's community library.
 
8:32 PM
You directly query the declarations from the state. So, what the inspections see is direclty dependent on what we save in the state. There is no way to trim down what declartions the inspections see without changing them.
 
The inspections don't just work off a single declaration, you know.
Several of them use several declarations.
Especially the ones that work with events and interfaces.
 
I know, but if you want to inspect just one module, you only need the declarations from that module and from the modules referenced by the module.
 
I think we should expose a new method in the state that takes a QMN and returns the declarations for that QMN.
Or something like that.
Then pass the QMN's to the state.
 
That is already on the DeclarationFinder.
 
Cool.
 
8:35 PM
Members
 
Oh, that's slow.
IIRC, that iterates all the declarations.
If it was in the state, we could get the declarations for that QMN out of a dictionary.
 
Really? It is a dictionary lookup.
 
OK, maybe I was wrong.
Ah, you are right.
Basically, my concern is this:
I've seen enough instances of collections of declarations being passed around to callees that expect a different set that I don't want to go that route.
I've seen some expecting only collections of user-defined declarations, and some that only want declarations of a certain declaration type (say, variables)...
It always seems to work best if you just pass the state in and let it work off that.
 
8:51 PM
That interface was supposed to have functions for these different functionalities of the DeclarationFinder, basically of all the inspections use. (That is why I said that I would have to look at the inspections to determin what would be on the interface.) The basic implementation would just forward to the DeclarationFinder on the state. BTW, all but the inspections using parse tree listeners should actually run off the DeclarationFinder; it caches everything in suitable dictionaries.
 
9:20 PM
@M.Doerner No, because those ones don't even use declarations...
Oh, I didn't see the "but".
 
 
2 hours later…
11:20 PM
@Mat'sMug,@Hosch250 Now there a thought... doing job interviews through pull requests when you submit not an issue but your cv hackernoon.com/…
This idea was mentioned near the bottom of that article. ^
 
11:33 PM
user image
3
needs a better quality ducky source? maybe bigger, smoother?
 
11:49 PM
It's dizzy looking at it. @ThunderFrame
 

« first day (1023 days earlier)      last day (2157 days later) »