« first day (1638 days earlier)      last day (1542 days later) » 

12:01 AM
RELOAD!
[bruglesco/fleet-command] 1 commit. 131 additions. 26 deletions.
[rubberduck-vba/Rubberduck] 8 commits. 6 opened issues. 3 closed issues. 17 issue comments. 980 additions. 414 deletions.
 
@MathieuGuindon Check out build-rubberduck-toc.xlsm. The idea is to use the VBA to build the TOC, add it as a static webpage to the site and link to it in the main menu. You would have to update it at the end of the month when the posts archive but that should only take about 10 minutes. It's a shame the the h2 tags don't have Ids. If they did you could use them as bookmarks. Anyway it's just an idea. — TinMan 1 min ago
 
12:37 AM
Nice!
And only 33 inspection results (couldn't resist).
 
LOL
any false positives?
 
Probably - there's a UserForm, so I'm guessing there were some on the controls.
 
Chiropractor in 20 minutes, haven't checked it out yet
 
That's a damned fine idea. All programmers should have chiropractors. After my last visit, I felt like Jell-O for a week (in a good way).
 
1:15 AM
Ummm.... _model.CanImplementLet = _view.ViewModel.CanHaveSet && !_view.ViewModel.CanHaveSet;
So that's a no then?
 
@Comintern oh wow!
 
R# didn't catch that, which kind of surprised me.
 
Weird indeed
 
1:55 AM
@Comintern why should it?
 
It normally picks up constant expressions
 
Because it's deterministically false.
 
oh #readingFail
 
[rubberduck-vba/Rubberduck] retailcoder pushed commit bf1840e3 to next: fixes #4554
[rubberduck-vba/Rubberduck] retailcoder pushed commit 92beed14 to next: added unit test for Call statement SCP
[rubberduck-vba/Rubberduck] retailcoder pushed commit b524fb73 to next: Ensure Refresh command from main menu is enabled at startup
Merge pull request #4569 from retailcoder/bugfix

SCP Fix
 
and I just faceplanted myself hard. Tried to build with a condition to build itself... #infiniteBuildingLoop
 
1:58 AM
[rubberduck-vba/Rubberduck] retailcoder is bored so why not move a project card
 
if (isRubberduckBuilding) { BuildRubberduck(); }
 
> I think the foreign identifier is a red herring. I can duplicate this with no code at all. The first time I open the metrics window with an empty workbook, Sheet1 shows nothing and ThisWorkbook shows 0 lines of code. After any change to ThisWorkbook, it doesn't show anything at all. It I add a module, it doesn't update the open metrics window. At the risk of sounding clichéd, that points to a caching problem.
 
@Duga also accidentally fixes the RD menu's Refresh command being disabled at startup
 
building
 
WTF?
            var userDeclarations = _state.DeclarationFinder.AllUserDeclarations
                .GroupBy(declaration => declaration.ProjectId)
                .ToList();

            if (userDeclarations.Any(
                    grouping => grouping.All(declaration => declaration.DeclarationType != DeclarationType.Project)))
            {
                return;
            }
What is that early return supposed to be testing? That there aren't any projects that contain projects?
 
it's like the release magically surfaces all the wtf code, eh?
 
[rubberduck-vba/Rubberduck] build for commit d5b900d0 on next: AppVeyor build succeeded
 
@Vogel612 It's actually what's causing it to fail on the bracketed expressions.
Spoke too soon in the comment. We build an "external" project to hold the BracketedExpression declarations, which trigger the early exit.
 
Followers: it’s been great contributing to the Excel/VBA community over the past two years. Due to new projects and time constraints, I’ll be taking my site, http://excelvirtuoso.net offline in the coming days. Thanks to all of you who have provided input.
 
^ There's the culprit.
Why do we build a pseudo-project for those?
 
2:26 AM
@MathieuGuindon yay for crawlers?
 
@MathieuGuindon I'll have to take a look in the morning
 
Max was working on #4579, right?
 
Would be interesting how much of maintenance costs for VBA this fits usually a much smaller estimate I think...qz.com/1474770/…
 
@Vogel612 it's the blog that prompted me to write a proper progress indicator
one less source of UserForm1.Show misinformation
@Comintern I think it spawned from the flawed assumption that they were "host-resolved expressions" ...they aren't always that
 
2:37 AM
@PeterMTaylor The unreported GDP amounts are likely outweighed by the lost productivity due to Javascript bugs...
@MathieuGuindon I fixed the CM window, but we should definitely address that.
I'm not sure we can do that until we have document module resolution nailed down completely.
 
@Comintern yeah true...
 
If we know what the interfaces are, we can simply look for an evaluate member on that interface and follow the scope tree.
Basically, the fix for #4557 will resolve it.
 
Would a pseudo project represent a leak of some kind?
 
@PeterMTaylor Just taking the obligatory JS stab there. The article is quite interesting - it points to the much wider problem of accounting for the value of unpaid services.
Reminds me of the perennial debate over how much value stay at home parent contribute to economic activity.
@PeterMTaylor Not really - we're doing that on purpose apparently.
 
Same in this country, we are playing catch up after the northerns nations taking the lead in some sectors.
Oh right a debugging skill then. :)
 
2:43 AM
There's a definite bias toward hanging a "price tag" on everything though.
 
Yes true thinking of how Steve job sets his products the price tag...
 
3:19 AM
Wait, could @MSPowerBI have saved Jurassic Park? https://twitter.com/doryowen/status/1068161031128653825
 
3:55 AM
from the Rubberduck.Deployment.csproj:
  <Target Name="InnoSetupConfig" BeforeTargets="PreBuildEvent">
      <CreateProperty Value="&amp;  '$(ProjectDir)PreInnoSetupConfiguration.ps1' -WorkingDir  '$(ProjectDir)'">
      <Output TaskParameter="Value" PropertyName="PowershellCommand" />
    </CreateProperty>
    <RubberduckPreBuildTask WorkingDir="$(ProjectDir)" OutputDir="$(OutputPath)" />
    <Message Text="Ran Rubberduck prebuild task" Importance="normal" />
  </Target>
  <Target Name="Register" AfterTargets="PostBuildEvent">
    <GetFrameworkSdkPath>
Powershell's fired.
4
 
> Did a bit of digging into this, and found something interesting. It is definitely related to default member resolution, but there is a little bit of a twist. When I first attempted to replicate this, I was lazy and tried to use a `Collection` instead of adding a reference to DAO. That did *not* trigger the false positive. So I added DAO, and... replicated:

```
Sub Bad(foo As DAO.Recordset)
Debug.Print foo("Field") 'Only Fields has an identifier reference, not foo.
End Sub

S
 
@this Does the VBE always call an indexed default member "Item"?
 
I was thinking about that - it has to be only a convention.
help me out - don't we see something similar with .Cells() implicitly referencing Range.[_Default]?
 
IOW, the method invokes an object that has a default member that itself is an object, and has a default member, then we will get that default member of that object.
 
4:01 AM
I thought that was just on our toolbar.
 
Wouldn’t the indexed default vary between access and excel being 0 or 1? @Comintern
 
Check out the tool-tip on my 4496 comment
@PeterMTaylor It should always just be member 0.
 
I gather it’s not always the case til Option Base 0 or Option Base 1 is enforced.
 
Range's tooltip is correct.
 
no, referring to the .Cells()
that will still show _Default tooltip, IIRC
 
4:04 AM
 
@Comintern that is messed up
 
DAO.Recordset doesn't even have an Item member.
 
Intellinonsense
 
LOL
 
Well give it time with
 
4:06 AM
@PeterMTaylor I'm referring to the ordinal of the function. The default member is always at ordinal 0 in the vtable.
 
neither does Cells have a Range
 
with Ducksense it will be
 
The point being that if it refers to an object that has an default member access to another object that itself has a default member, we get the final member
not the intermeritary
in Recordset's case - the default member is Fields, which then contains a Item
That's why I don't think that's just a DAO thing - that's a VBA thing - multiple default member accesses lead to fun times.
 
Huh, does Range not have a default member?
 
it does. [_Default] is the default member
 
4:10 AM
> Search "id(0x00000000) " (0 hits in 0 files)
There is no DISPID 0 on the Range Dispinterface.
 
That's one other mystery - IIRC, it's on globals
 
WTF? Does Excel extend that at run-time?
 
I'm not sure exactly - ThunderFrame and I was talking about that earlier
I was shocked to find out that it's actually the Globals that's the appobject
as I always thought it was Excel.Application but it ain't.
 
The hidden IRange interface doesn't have a default either.
 
@Comintern wait what? How is OB picking up _Default as a default member then??
 
4:13 AM
Hmmm... That means we might need to put some host specific hacks in the default member resolution for Excel.
@MathieuGuindon I have absolutely no clue.
 
VBA: take everything you think you know, shatter it to pieces
 
Oh, it's because I'm an idiot.
 
It's there.
[id(00000000), propget, helpcontext(0x000232f2)]
VARIANT _Default(
                [in, optional] VARIANT RowIndex,
                [in, optional] VARIANT ColumnIndex);
[id(00000000), propput, helpcontext(0x000232f2)]
void _Default(
                [in, optional] VARIANT RowIndex,
                [in, optional] VARIANT ColumnIndex,
                [in] VARIANT rhs);
I was searching for a hex string (0x00000000).
 
@Comintern if you're an idiot,....
lol
 
4:15 AM
OK, OK, OLEView is the idiot. :-)
 
@Comintern tweeted w/creds
 
That was mainly a curiosity - I think we just skipped properties in the resolver entirely.
Either that or we're handling them in some weird way that we shouldn't.
 
I knew the dflt prop was 'fields', but hasn't realized quickinfo was making stuff up
 
let's see if I can rebuild....
@MathieuGuindon it's simply following to the final member
 
4:19 AM
?
 
which IIR, Comintern or Max told me that's how it should behave
Recordset -> Fields -> Item
 
Oh Fields class has a default prop named item
 
yes
 
[rubberduck-vba/Rubberduck] build for commit 73c950d0 on unknown branch: AppVeyor build succeeded
 
facepalm
deleted tweet
 
4:20 AM
so it's kind of confusing but not unprecedented (like that .Cells() example)
 
resolving def.props isn't confusing at all, no.
 
:double facepalm:
Still a resolver issue.
 
    defaultMember = (IParameterizedDeclaration) members.FirstOrDefault(member =>
        member is IParameterizedDeclaration && member.Attributes.HasDefaultMemberAttribute()
            && (isAssignmentTarget
                ? member.DeclarationType.HasFlag(DeclarationType.Procedure)
                : member.DeclarationType.HasFlag(DeclarationType.Function)));
We have a winner?
 
4:23 AM
I think that may only be on assignment contexts though.
 
yeah
wait no
 
No, that's lexpression too.
 
I need to catch some sleep. Hopefully my merging of the SCP fix didn't introduce 12 new stupid bugs.
 
Well if it did, we'll net 8 added - I just whacked 4.
 
well done =)
I think SCP is actually as solid as it's going to get in the VBE code panes. I've been thinking, Avalon might end up requiring a second implementation on top of it.
 
4:32 AM
Why would that be? I thought Avalon gave you complete control?
 
For one, it would be opt in experimental for quite a while.
 
^^
And this kids, is why interfaces matter
'night!
 
true
night!
 
'night
WTH is a CtLExpContext?
 
Rubberduck can cleanse these dirty empty if blocks from your life. er, your code. https://twitter.com/TheRegister/status/1068291367653191680
 
4:38 AM
complexType...
 
4:50 AM
That's why we don't use hungarian notations...
 
^
I'm starting to think that any recursion in the default member access is skipping IdentifierReferences.
That is, we recurse when we're binding, but don't unwind it when we resolve references.
It's been a while since I waded in here though...
 
5:05 AM
nice, i now can clean & rebuild
 
@this Jealous...
 
still have to put it through the litmus test, though...
 
The Iven test?
 
I honestly doubt it'll make a difference - this is for Deployment, which is too late for him.
AV
one thing i don't understand is if I try to Build the RD.Deployment, it insists on building all other dependent projects, even though those were successfully built.
 
5:12 AM
I noticed that too.
 
> Just spit-balling here, but would it make sense to add a "Cancelling" parser state to account for this type of situation? If we set the state to Cancelling and then immediately to Ready afterward, we'd at least be able to respond to that event in the listeners.
 
5:36 AM
> Do not mind the man behind the curtain. Something something about deployment and firing powershell.
[rubberduck-vba/Rubberduck] build for commit 65afffa7 on unknown branch: AppVeyor build failed
BUILD FAILURE!
 
Yeah, figures that AV'd be a wussy about that. Will have a think about that tomorrow.
Good night!
 
I have someone dropping by the pond at some point.
> I am a computer science student aspiring to be a programmer specializing in the languages of either c++ or c#. I was just wondering if you had any opportunities (like an internship or volunteering opportunities) that I could participate in to help gain practical experience.
I'm responding with a link to the GH repo and our war pond.
 
5:56 AM
Cool @IvenBach. Matt will provde the handshake if confirmed
Night folks
 
night.
 
6:50 AM
> I have to say that I do not really like that idea. This would introduce a new source of state changes outside the ParseCoordinator that could change the overall parser state anywhere in the parsing process because it would possibly be triggered from another thread.
 
@Comintern I did not plan to fix #4579, but should be easy to get it on this night.
 
7:14 AM
Actually, I would have to base the fix on my case corrections PR. Otherwise, I will not be able to build.
 
 
2 hours later…
9:57 AM
@MathieuGuindon oletools is neck-and-neck, at 698
 
10:34 AM
> In MS Word, given this code:

`ActiveDocument.CustomDocumentProperties("SomeProperty") = "SomeString"`

Code Inspections yields the following false positive:

**_Object variable 'CustomDocumentProperties' is assigned without the 'Set' keyword_**

Environment:
Version 2.3.0.4235
OS: Microsoft Windows NT 10.0.17134.0, x64
Host Product: Microsoft Office x64
Host Version: 16.0.11001.20108
Host Executable: WINWORD.EXE
 
11:07 AM
[rubberduck-vba/Rubberduck] build for commit ad117daa on unknown branch: AppVeyor build failed
BUILD FAILURE!
[rubberduck-vba/Rubberduck] build for commit ac75e4b1 on unknown branch: AppVeyor build failed
BUILD FAILURE!
 
11:40 AM
> This is a duplicate of #3827 and #4037.

The problem is that the inspection does not correctly take into account the multiple default member accesses.

Without default member access, the call would look like this.
```vba
ActiveDocument.CustomDocumentProperties.Item("SomeProperty").Value = "SomeString"
```
 
12:24 PM
"So sorry, already sent an email asking if the letter has been received. I can retract if someone tells me how." This is what happens when you let doctors manage things. :/
 
12:39 PM
@Vogel612 @MathieuGuindon, yeah, but this doesn't look promising:
either that or I don't know how to use the WBM...
 
[rubberduck-vba/Rubberduck] MDoerner pushed commit b6fdeefe to next: Fix case for image references in Resources
[rubberduck-vba/Rubberduck] MDoerner pushed commit 8ee81f55 to next: Fix casing in build action
[rubberduck-vba/Rubberduck] MDoerner pushed commit 1e1cc061 to next: Fix library case and minor reference versions in tests
[rubberduck-vba/Rubberduck] MDoerner pushed commit e73ecefa to next: Deactivate SCW release messages
Merge pull request #4580 from MDoerner/CaseCorrections

Case Corrections
 
12:54 PM
@IvenBach Hosch 2!
@MathieuGuindon github.com/rubberduck-vba/Rubberduck/issues/… What's that one false positive remaining? I'm still getting plenty of them on .4235
 
@FreeMan involves default member access?
Arrays and variants no longer fire results, ..or do they?
 
@MathieuGuindon ah, gotcha! No, I don't believe I'm getting any false positives on arrays or variants. though... I added an '@Ignore on one yesterday for a built in Excel property that takes a variant - let me see if I can find it. I don't believe there was any default involved
 
Neither of these gives me an error:
Private Sub foo()
  Range("a1").Interior.ThemeColor = xlThemeColorLight2
End Sub

Private Sub bar()
  With Range("a1").Interior
    .ThemeColor = xlThemeColorLight2
  End With
End Sub
However this does:
Public Sub BlankCol(ByVal theRange As Range, ByVal Color As String)
Dim Theme As Long

    Theme = xlThemeColorLight2
  With theRange.Interior
    .PatternColorIndex = xlAutomatic
    .ThemeColor = Theme
    .TintAndShade = Tint
    .PatternTintAndShade = 0
  End With

End Sub
@MathieuGuindon ^
 
Uhm, there are 5 assignments. Which one is it?
All of them?
 
sorry... .ThemeColor
 
Huh interesting
 
didn't trim quite enough code from my actual vs the MC(not)VE
add that to one of the many false positive issues?
 
1:19 PM
(not M)CVE ;-)
Yeah
 
yeah, yeah, yeah
yup
 
Feels more and more like the inspection itself is doing fine, and all that's left to fix is the member resolution
#GettingThere
Actually... I see the difference between the two
Wait no, I don't
If you select Interior you get an actual type description in the RD bar in both cases, right?
 
wait... @M.Doerner just closed that issue. Let me DL & install the latest build to confirm.
 
1:28 PM
@MathieuGuindon some very upstream repo on npm was taken over by a bad actor
and of course everything went to shit
it's not like that debate is new, but holy carp it's overdue
 
Does npm have any corporate backers?
 
npm itself has, the vast majority of packages on npm doesn't
 
ouch
 
ARGH!!! Excel crash on exit. Those seem to be happening with increasing frequency
 
then again there's an npm package for everything
 
1:30 PM
@FreeMan if that's RD's fault, we'll want to know why.
 
because the js language and stdlib is so extremely underdeveloped
 
and overtooled
 
it's in a way similar to the left-pad disaster a while back
 
I'd say that it's a big feat to find someone who actually writes vanilla JS
 
1:32 PM
"The web was created by amateurs" - Alan Kay
 
@FreeMan Let's hold off on a hotfix until next is actually more stable than 2.3.0
 
like... holy crap the web is one fugly hack on top of a hack on top of a hack [...] on top of something a physicist slapped together to allow interlinking docs
 
@this, @MathieuGuindon - here's the end of the RD log post-crash, pre-restart:
2018-11-30 08:29:34.4609;ERROR-2.3.0.4235;Rubberduck._Extension;System.Exception: RemoveWindowSubclass Failed
   at Rubberduck.VBEditor.WindowsApi.SubclassingWindow.ReleaseHandle() in C:\projects\rubberduck\Rubberduck.VBEEditor\WindowsApi\SubclassingWindow.cs:line 73
   at Rubberduck.VBEditor.WindowsApi.SubclassingWindow.Dispose(Boolean disposing) in C:\projects\rubberduck\Rubberduck.VBEEditor\WindowsApi\SubclassingWindow.cs:line 125
   at Rubberduck.VBEditor.WindowsApi.FocusSource.Dispose(Boolean disposing) in C:\projects\rubberduck\Rubberduck.VBEEditor\WindowsApi\FocusSource.cs:line 45
 
and it's near-impossible to get rid of all the effing baggage
 
lemme know if I need to post a new issue.
 
1:34 PM
Please yeah. Phone can't handle that log in chat =)
Even if I rotate!
 
ya, phone chat doesn't handle code even remotely well
 
@Vogel612 he's got a very valid point! Chris wandered off after he no longer had an interest in VBA. Everyone else here will eventually burn out, lose interest, have health issues :tear:, or otherwise. RD isn't mission critical, but...
 
and we definitely shouldn't be getting exception in that location
 
@MathieuGuindon lol! will do
 
@FreeMan I've slowed down a lot in the past... year(?) to avoid that.
 
1:41 PM
> Over the last several weeks, I've had an increasing frequency of Excel crashing on exit. I'm running Win10, Excel 2016 (desktop) and have had several incremental builds installed. Currently, I'm on .4235, and was shutting down to install .4244 to test another fix.

Here's the complete log after one such event.
[RubberduckLog.txt](https://github.com/rubberduck-vba/Rubberduck/files/2633368/RubberduckLog.txt)

This was with one XLSM opened.

I clicked the "red X" to close Excel, then told
 
Then I get facebook notifs about how inspiring we all are and how we're making the world a better place, and damn, all the RD bugs don't feel so overwhelming any more
 
I think we did make a lot of progress. It was nice to see the # of bugs fixed rise higher than the # of bugs queued in the bug tracker project, too.
 
@MathieuGuindon yeah, well, eventually it will happen. Or your wife will get tired of you not coming to bed, or your kids will get involved in things that take more of your time, or, you know, something else will become a higher priority. We'll all understand, nobody will blame you, but... you'll be gone some day.
 
(yes it's artificial metric but I'm silly like that)
 
and we'll all have a sad, then either we'll carry on, or the project will wither.
 
1:44 PM
Hopefully former. Python didn't exactly roll over and die when Guido stepped down.
 
@this I'm doing my best to keep your artificial metric looking ugly! ;)
 
@FreeMan i know. That's why the rubberduck-vba GitHub org now has 5 admin-level members
 
OK, off that rant. Time to shut down Excel again (reopened to confirm my latest changes were saved) then test out .4244 to see if it fixes the false Missing Set issues.
 
6
5.5 actually, given Chris is more like, uh, symbolic
 
wait, so Chris' a half-person?
 
1:50 PM
Some of the negatives attributed to FOSS software apply equaly to purchased. Me thinks he doth protest too much.
 
Well, there's an analogy for that.
If you've ever gone on a road trip, you probably have made pit stops, right? Noticed how establishments that offers free bathrooms are usually clean and well-maintained? In contrast, if you dare to stop at those dinky former-service-garage-now-gas-station where they hand you a key to the bathroom chained to a large brick or a toilet seat, the bathrooms are horrid and gross.
Wait, wasn't the key supposed to keep the riff-raff out?!?
 
minor detail, there, this - I've never paid (explicitly) for the clean free bathroom or the key/brick filthy one
so there's that...
On the other hand, we did pay a couple of times in Europe out of desperation, and those weren't any nicer than the free ones.
 
Still it's a bit illogical - they lock up the bathroom because it's around the back yet it somehow manage to be in a state of filth and abuse that it's good stand-in for a haunted house.
 
> This "real world" (yet minimized) example produces a false positive in build .4244:

```VBA
Public Sub BlankCol(ByVal theRange As Range, ByVal Color As String)
Dim Theme As Long
Theme = xlThemeColorLight2
With theRange.Interior
'@Ignore ObjectVariableNotSet
.ThemeColor = Theme
End With
End Sub
```

as is evidenced by the `'@Ignore ObjectVariableNotSet` annotation I had RD install for me.

**HOWEVER** these two MC(n)VEs do NOT generate an inspection result:

```VBA
 
1:56 PM
because it's around back they forget to go clean it?
 
I'm wondering about the alternative...using the analogy, I guess we should use a shrub?
 
With the establishments that offers you clean free bathrooms, they explicitly do it as a part of business -- you might not be paid to use it but you almost certainly will buy other stuff from them and that justifies the operating costs.
 
^^ winner!
 
Be sure that nobody sees you and thus call you in for indecent exposure.
 
a big shrub
 
1:57 PM
girls, generally, aren't as thrilled with the shrub option. Don't know why
 
^
 
@Duga WTF? Is Dispose getting called on the SubClassingWindow twice?
 
And so...coming out of the analogy...FOSS is always a valid option when it meets the need and especially when there are no better alternatives.
 
@Comintern I hope I didn't bork it up.... :-\
 
That's an intentionally thrown exception that basically means we couldn't unsubclass.
@this It's just as possible that I did when I was overhauling the dispose implementations.
 
2:02 PM
@BZngr and given the choice , it's better to have a stale FOSS that you can fix yourself over a stale POS software that you have no chance of fixing yourself.
 
@BZngr Bingo. If the author wants to whinge about his free stuff not working, the solution is to either contribute yourself or use other tools that suit your needs. The attitude that "my free lunch wasn't very tasty" doesn't get much traction here.
 
> All this matters to NASA because, by 2018 or so, astronauts are returning to the Moon.
 
@Hosch250 well they better do it within 31 days.
 
@Hosch250 Woah! Tight schedule at this point.
 
"One giant leap for Javascript?"
 
> Unlike Apollo astronauts, who never experienced lunar sunrise, the next explorers are going to establish a permanent outpost. They'll be there in the morning when the storm sweeps by.
 
Unless they did in fact spend months of planning it ain't gonna happen. It isn't exactly a Sunday afternoon picnic.
so it'll have to be "or so"
 
eh, they could whip up an Apollo 18 mission pretty quick. HHCIB?
Yay! only 141 meaningful names to go!!
duh check: If I pass an object to a method ByRef I'm passing in the actual pointer the calling method is holding, thus all changes made in the called proc effect the caller's object. If I pass the object ByVal, I'm passing a copy of the pointer, but it's pointing to the exact same object in memory, so the called proc is still impacting the caller's object. Right?
 
2:26 PM
[rubberduck-vba/Rubberduck] build for commit 54cf6eeb on unknown branch: AppVeyor build succeeded
 
Is there any benefit/preference to ByVal or ByRef when passing object that you expect to be side effected?
 
@FreeMan "We choose to go to the Moon in 2018 and do the other things, not because they are easy, but because HHCIB?"
 
@FreeMan In C++ yes. C# too, now that they have ref. Not sure about VB* languages.
 
@FreeMan the only thing it changes is whether the parameter can be Set locally. If it's byref, method can set it to nothing and caller loses the object. ByVal/ByRef have no bearing on whether the object's state is "carried"
 
@FreeMan If the procedure doesn't effect the parameter, it should be BvVal.
^^ emphasis on "parameter".
 
2:33 PM
There's almost never a reason to allow a method swap or nullify an object parameter
Hence ByRef default is dumb
 
> To fix the false-positive above we will require a expression type evaluation engine. The problem is that the LHS is Variant and we do not properly evaluate the RHS.

Generally, I would prefer to error on the conservative side and do not generate an inspection result, if we cannot determine properly whether the assignment requires a `Set`.
 
@MathieuGuindon My guess is that having ByRef be the default was simply laziness - IIR in COM the caller is responsible for managing the memory of a Variant passed to another procedure. Passing everything ByRef simplifies the memory management tremendously.
 
@Comintern Yes, Mr. President.
 
@Duga damn, is there a single line of code I write that isn't a bug? ...considering my next gig to flip burgers, or wrap groceries.
 
2:44 PM
So, ByRef allows the called proc to destroy the actual object, while ByVal doesn't, therefore ByRef is "safer". Otherwise, the main difference is that if I pass ByRef that's a hint to future users to expect something in the object to change vs ByVal is a hint that nothing should be changing. Baring that, flip a coin as to which I want to use. In VBA, of course.
^^ envisions burgers on the floor...
:)
 
@Duga The documentation says that Interior.ThemeColor is Variant.
 
@Duga @M.Doerner I'm not sure I understand the comment "I would expect it to work for all call statements and all non-traditional index expressions." Is the problem that it's working from the CallStmtContext?
 
ah, but the evaluator is trying to evaluate RHS if it's trivially an object
 // todo resolve expression return type
 
@MathieuGuindon at least the reason for your bugs is that the problem domain is highly nontrivial
 
Should be // todo implement expression evaluation engine
 
2:57 PM
> Need to dig into this - that's supposed to be handled here:

var simpleName = expression.GetDescendent<VBAParser.SimpleNameExprContext>();
if (simpleName != null)
{
return declarationFinderProvider.DeclarationFinder.MatchName(simpleName.identifier().GetText())
.Any(d => AccessibilityCheck.IsAccessible(project, module, reference.ParentScoping, d) && d.IsObject);
}

`xlThemeColorLight2` wouldn't have `Is
 
@Comintern do we need to, though?
AFAICT we don't need to actually evaluate the expression itself, only it's type
 
^
...which makes evaluating the actual expression fall in the "eh might as well" category
 
Foo = IIf(Bar(), GetSomeObject(), GetSomeVariant)
Set required?
 
@Comintern 10K volts required
 
LOL
 

« first day (1638 days earlier)      last day (1542 days later) »