« first day (717 days earlier)      last day (2463 days later) » 
00:00 - 21:0021:00 - 00:00

00:00
RELOAD!
[rubberduck-vba/Rubberduck] 2 commits. 4 issue comments. 2250 additions. 529 deletions.
 
2 hours later…
02:06
@Hosch250 @gleachman parsing arbitrary snippets will get you a parse tree, but you'll have to offset all line positions in every token - and that won't give you declarations and identifier references, but tokens and ParserRuleContext objects; so far across all functionalities of RD it never occurred that we needed to parse a snippet.. I'm not sure you need to do that, whatever problem you're contemplating a solution for.
I think they would have done it long ago if they could
I'm personally not so sure about that. My best guess is that it includes code that they might consider a Windows security risk.
For example, you could probably use it to crack Outlook open like a clam.
02:23
Yep. Makes sense. As long as Office ships with VBA they won't open source VB6
And they're not killing VBA anytime soon I think
I shudder at the amount of work it would take to replace it with, say .NET.
Funny how all comments say "let it die" though
Yeah, MS has a long track record of maintaining backward compatibility. I doubt they'd want to break every single piece of VBA code in existence.
It's kind of scary how much infrastructure is build around on Access VBA alone.
...and, I don't think they really want to revisit the whole VB -> VB.NET "autoconversion" any time soon.
@Comintern mid-to-long term, Rubberduck will need to be able to compile VBA code. At that point, we'll be able to pretty much generate .net code... I think.
The main problem is that there are some constructs that just don't exist in .NET - like Mid() as a LValue.
02:34
Scary
I'm thinking that might have been a bug an unintentional feature.
Question is, who's using it that way anyway
There we go. WTH is the strike markdown different in chat?
True enough, but there was a ton of code that the .NET conversion tool that shipped with 2003 choked on.
They didn't have access to the grammar :-/
Mid to long term, RD will have to compile VBA code to determine whether a block of code is heuristically unreachable
3
02:43
If work stays slow I can see what it might take to generate pcode.
Totally unrelated, but any thoughts on how to approach unit tests for the Indenter? There are in the neighbourhood of 16! settings combinations.
Granted, not all of them inter-relate with one another.
IMO it would need a massive refactoring ;-)
Working on it. ;-)
take a look at @gleachman's work on extract method; he turned each sentence of the spec into a testable function. Same approach would make a fully tested indenter
I guess I should come up with a spec then...
Feel free to put it up in the wiki, under 'research' :-)
I'm out, 'night!
02:51
Night
 
1 hour later…
03:54
@Mat'sMug That won't be a problem. We won't need those selections for anything but navigation once I'm done with it.
And we'll still run a reparse for navigation after we edit any code.
@Comintern Don't test every combination.
What I would do is test it with the general settings, then make a test changing a single setting value from the general settings for each setting option.
 
1 hour later…
05:18
@Mat'sMug Need to move to a protected internal rather than private method approach. And set the attribute on the project to allow mstest to see the internals. msdn.microsoft.com/en-us/library/…
05:51
@Hosch250 If you take that approach, you might lose tests that would have spotted conflicts.
 
2 hours later…
08:01
hey @Vogel612
heya @gleachman
Zak
Zak
@Mat'sMug How would I know if my Git config file looks healthy or not?
08:25
lol @gleachman I just found an answer of yours on SO
:)
When did I post it?
what was the question?
.. That's like a needle in a haystack. I've only answered 2 questions.
posted may 4th
what split column text, or read text file... ? both equally pathetic.. I've really got to improve the quality of my responses
Much like my first release into RD.... painful!
@Vogel612 What you working on?
currently my maths homework due in 3 hours
or to be more correct: the written portion of that :D
 
3 hours later…
Zak
Zak
11:42
Question about RD unit testing: Is there a way to unit-test a function which will (internally) throw an error on incorrect input? I don't want to have to throw 20 errors just to unit-test that the errors are, in fact, being thrown.
12:33
@Zak - Is this what you're looking for?
Zak
Zak
And how would I write that in an RD Unit-Test?
be good to have a @ExceptionTest
12:59
Ah, my bad - thought you were talking about unit test for RD, not with RD. I'm exploring how to hook into the debug signals.
Zak
Zak
Is there somewhere to submit feature requests?
You can submit it as an issue on the RD git page.
Zak
Zak
Shouldn't issues be used for, well, issues?
> Having some way to `Assert` that a method raises a particular exception when given incorrect input.

Currently, I can't test method behavior with incorrect input because the method itself will raise an exception.
> Private Function ITestRunner_AssertErrorThrown(obj As Object, ByVal method As String)
Dim errThrown As Boolean
On Error Resume Next
CallByName obj, method, VbMethod
If Err.Number <> 0 Then
errThrown = True
End If
m_Reporter.report errThrown, "error not thrown"

End Function
> Private Function ITestRunner_AssertErrorThrown(obj As Object, ByVal method As String)
Dim errThrown As Boolean
On Error Resume Next
CallByName obj, method, VbMethod
If Err.Number <> 0 Then
errThrown = True
End If
m_Reporter.report errThrown, "error not thrown"

End Function


Is one way to implement.
> Private Function ITestRunner_AssertErrorThrown(obj As Object, ByVal method As String)
Dim errThrown As Boolean
On Error Resume Next
CallByName obj, method, VbMethod
If Err.Number <> 0 Then
errThrown = True
End If
m_Reporter.report errThrown, "error not thrown"

End Function


Is one way to implement.
Zak
Zak
@Duga Thanks. It would still be nice to have that integrated into the Test Explorer.
13:14
@Comintern Emensely imprsd
@Zak "issues" that are actually feature requests will be tagged as such.
13:41
> I just want to refactor that `If` block to

```
errThrown = Err.Number <> 0
```
^^ Inspection results as gmail-friendly HTML
^^ XML Spreadsheet, HTML and CSV pastes into Excel.
RTF just needs some column headers, and then this is getting close to a PR...
13:59
> right back at you
m_Reporter.report (Err.Number <> 0), "error not thrown"

:)
> right back at you
m_Reporter.report (Err.Number <> 0), "error not thrown"

:)
@Duga :)
@ThunderFrame slick!
is it just me, or are there a crazy number of VBA questions on SO today?
@Duga I think grleachman was too embarrased to hang out here after his first release went so badly.!
:)
14:04
all's well that merges well...
4
@Gareth I'll raise you m_Reporter.report Err.Number <> 0, "error not thrown"
@ThunderFrame I'll Call your hand
sorry CallByName your "hand" vbMethod
started to not make much sense
Zak
Zak
@ThunderFrame Just wait, I'm about to be putting a big VBA class on CR.
speaking of not making sense, it's 12:15am here. TTGTB...
@Zak - must be the 25 year anniversary...
@Zak I'm hoping to post a few to CR later in the week too.
14:22
CR ?
what's that
for me tonight, so no RD tonight!
@Gareth Underwater field hockey?
yep
So that's what they do at hockey rinks in the summer when the ice melts & the sticks shrink from all the water...
14:41
IceHockey => HeatTransform( x ) => Underwater Hockey...
Yes I like that
> The 'expected error' test method template was made for this. A VBA runtime
error looks like any other useless COMException from managed code, it's
simpler to handle them in VBA and fail the test when the error raised isn't
the expected one (or if no error is raised at all).

Sent from my Samsung mobile
On May 23, 2016 10:02 AM, "ThunderFrame" <[email protected]> wrote:

> Where'd you go @grleachman <https://github.com/grleachman> ?
>
> —
> You are receiving this because you are subscrib
15:17
> @ThunderFrame @grleachman the difference is that the "expected error" test template will only pass the test when a specific error is raised; passing the test when any error is raised doesn't seem very solid to me.
> @ThunderFrame @grleachman the difference is that the "expected error" test template will only pass the test when a specific error is raised (in a way similar to a `ExpectedException` attribute in .net); passing the test when *any error* is raised doesn't seem very solid to me.

We *could* have an `@ExpectedError` annotation, and have the runner expect a COMException, but there's no way to tell thay error from, say, one that's thrown when the method doesn't exist.

If a test should raise a
15:35
@Gareth That is a problem. However, we can't realistically write 16! tests for it.
I'm hoping the task run/continue thing works for testing. I'm not too sure because the code uses events--will it wait for the event handler?
0
Q: Class: 2D Variant Array

ZakI do a lot of data analysis with spreadsheets. VBA has no in-built array functions (sorting, filtering etc.). This is a problem. So, I took my accumulated collection of Array-manipulation methods, cleaned them up and turned them into a Class: CLS_2D_VarArray. It is also supposed to be paired w...

@Zak that's MASSIVE!
3
@Mat'sMug I just sent you an updated weekly report--I finally figured out Aggregate last week.
@Hosch250 events run synchronously AFAIK
Yeah got it
Also, what's up with release? I want to get these goodies out.
I know they run one-at-a-time, but don't they fire across threads?
15:44
Nope. Handlers run synchronously on the same thread the event is fired.
Oh, interesting.
Marks that as something new learned.
So that is why we need to use delegates!
Zak
Zak
@Mat'sMug I'll take that as a compliment?
lol, if you will... did you see the 'expected error' test template?
Zak
Zak
And yeah. I've just been writing these things as I need them for the last 6 months. I've got a quiet period while we wait for this company we're acquiring to agree and sign the final contract. So, I figured, now's a good time to build a proper class out of this mess.
@Mat'sMug You mean the GH comments?
15:48
@Gareth OK, about getting text out of the tree--tricky part is finding the node you want. I'll assume you know about BFS and DFS and when to use each. After that, just call .GetText().
Sorry about taking so long for that.
If you need to combine code from multiple nodes, Linq Aggregate is awesome for that.
Zak
Zak
@Mat'sMug I didn't quite get everything that was said.
@Hosch250 I'm not home until later tonight; I need to pull the changes and see exactly where we stand. I understand that the resolver has seen a number of fixes recently, and now deals with With blocks.. we might be ready for a beta, but I want to build, run and test it myself :-)
Zak
Zak
@Mat'sMug Quick Gut-Check, does it look like a solidly-put-together Class?
@Zak when you add a new test method, there's 2 options: "new test method" and "new test method (expected error)" - the expected error template was made specifically for that
foreach (var newTarget in list)
{
    UpdateCallsToOtherModule(newTarget.References);
    RemoveField(newTarget);
    break;
}
That is an interesting loop...
15:52
@Hosch250 where's that?
In one of my refactorings.
I'm changing it to FirstOrDefault.
Doesn't it skip all but the first iter... yeah
Zak
Zak
@Mat'sMug Huh. How did I miss that.
It's pretty much the only way to make a test pass when a specific error is raised. There are ways to make it pass when any error is raised, but I don't want to do that
Zak
Zak
@Mat'sMug Cool. thanks.
So, Gut-Check on that class?
16:03
It doesn't wait for events.
@Hosch250 parser events? they're raised on a background thread...
Parser state, yeah.
What in the world happened?!
A bunch of code is commented out, and when I uncommented it, the parser types don't exist anymore.
Are we releasing tonight, you ask?
Maybe if I can get this working again.
@Hosch250 probably a stray brace that voids the rest of the file
16:13
Nope.
This used to be working.
It was commented in @awgaya Speed Up Parsers PR.
Source Control > Undo changes
No, I'm going to find the new types are rewrite it.
I don't want to make the parsers slow again.
I'm not sure what you're working on
Boy, Trump, you ruined that phrasing for me...
Move Closer To Usage.
The tests didn't catch it because I can't get the task to wait for the parser state event, so there isn't a test for it.
Oh I wanted to ask about that one.. does it work for locals too? Or just for fields?
16:16
Locals too.
cool
Last I checked it was only enabled on fields thougj
Last I checked it was only enabled on fields though
Damn 3G fallback network
@Hosch250 it's not the only test that needs a ready state... what's different about that one that's never been done before?
Umm, none of the stupid tests that call an asynchronous reparse work.
They are all either commented out or not written.
That's why I've been asking for a blocking parse call that returns a state.
Got a green light for it?
It will run async in the call, but it will block until it returns.
Sure... just don't break the parser lol
@awgaya @Mat'sMug foo doesn't resolve to anything.
It doesn't have any references, I mean.
@Hosch250 long assumption!. No, but I think I saw something on the wiki.
16:24
Huh?
@Hosch250 ugh. Does it work it foo is a public field in a standard module?
@Hosch250 this is very worrying phrase.. You should be able to test any part of an application in isolation in unit testing. There really isn't a need to do unit testing with events firing.
@Mat'sMug too
@Hosch250 I don't know anything about BFS or DFS.
Oh.
Not too tricky, really.
I learned it from Wiki.
@Gareth pretty much everything is coupled with the parser state, we'd need to refactor and mock up declarations and identifier references for 700-some tests to do that
oh hum Depth vs Breadth first searches.. Right
the parser state is a bottle neck
to testing?
@Mat'sMug well little steps
16:32
It's the duck's brain
hasn't @Hosch250 just rewritten the parser
NO!
That is such a spaghetti mess I'm scared to touch it!
For some reason I thought you had :)
I just heavily refactored the cache.
Cortex
16:34
OK, well if the parser is a bottle neck, and it's the guts of this application. then you really do need to get it under test, and refactored so people aren't scared to touch it.
3
I'm quite annoyed that I can't parse a code snippet
sure, but not hours/days before a beta release...
@Gareth that's a grammar limitation
I was relieved to see that I could parse a codeModule on it's own
hi @Vogel612
@Gareth I was actually able to refactor it without breaking things and without unit-tests
but that's mostly because everything builds on parser results and so the thing basically is under test transitively
so you basically went on gut, and managed not to break anything.
yep..
so you break anything and it all falls apart
16:36
I went on well-known small verifiably correct steps
@Vogel612 :) Not having a go at you. or implying bad practice.
I know nothing about the parser. so after 844, I'm going to investigate the parser for a little
also I changed it from "Synchronous" Parsing to proper parallel parsing
I did notice that
sequential was the correct word :/
Parallel For Fear In TheParser :)
16:39
You mean "Unparalleled Fear"?
:)
So views on moving away from private methods to protected internals
It would really help me
Fine by me. But don't change any of the other refactorings or quick fixes yet.
As I said, I'm going to completely rewrite them after 2.0 is out, and I don't want to break a bunch of white-box tests just because I rewrote it.
Ahh that's what you were completely doing...
My poor laptop. I now have a broken letter C. so annoying!
Is it the keyboard or the driver?
My keyboard sometimes starts acting up, but a restart will fix it, so I'm guessing it is the driver.
c for care
16:45
Don't know about your system, of course--I hear it is older than you.
Score. I think I may have just gotten the VBE to spit me out an Object defined in an Excel Class Module.
@Comintern what you instantiated a class module?
From the CLR.
@Comintern or is that getting too excited and ahead of myself.
At least I got what appears to be a pointer back from sending this call directly to the VBE7.dll:
rtcCreateObject("VBProject.Class1", string.Empty)
16:52
@Comintern what t-shirt size are you?
I'm a large
NO WAY!
I know a duck that's about to eat his hat...
5
what about VBE6.DLL? Please say so
@Comintern so wait a minute, does that mean C# code can now know that ThisWorkbook is a Workbook object?
16:57
I'd have to think about that - right now I'm just getting a raw pointer. I'm cooking up a test now to see if I can pass the pointer back to rtcCallByName.
I'm going to have to try this myself. Gosh Amazing effort
@Gareth - the calling convention should be exactly the same going way back.
This is my hell :
[TestClass]
public class WhereAVariableDefinitionIsInternalToTheSelection : WhenExtractingFromASelection
{
[TestClass]
public class AndTheVariableIsOnlyUsedWithinTheSelection : WhereAVariableDefinitionIsInternalToTheSelection
{
[TestMethod]
[TestCategory("ExtractMethodModelTests")]
public void shouldRemoveTheDefinitionFromItsPositionAndPlaceItAtTheTopOfTheNewMethod()
{
@Comintern :)
Assert.Fail()
@Comintern so I take it you're a few minutes short of having a wrapper function that instantiates a VB object =)
LOL, yeah right. The problem is that there's no way to build anything from it in the CLR because it can't be marshaled.
Any idea what a windows exception c0000027 is off the top of your head?
17:06
NVM, that is c0000009
I suspect it's related to how I'm calling rtcCallByName. Maybe I need to pass it a null argument list.
@Mat'sMug Where is this test?
17:27
@hosch250, looks like your example doesn't resolve because thisworkbook isn't marked as having a default instance variable
Should it work, or no?
it's a bug, so in the current implementation it doesn't work but it should
I'll take a look and send a PR if necessary
anything else you found?
looks like the attributes are not exported when parsing the attributes, can't find the issue now but I think there's a similar issue in Access or somewhere?
Document modules basically don't have attributes... unless you get them from the internal IStream
How about we just make document modules classes with a default instance? Would that play well with rename?
Hmm... I think it would
@awgaya let's just do that, it's the simplest solution and works well with probably 99% of use cases.. the remaining 1% being whatever @ThunderFrame comes up with to break it :-)
17:44
kk sounds good
@Hosch250 nice!
here's a site you might find useful working with bootstrap :P hackerthemes.com/bootstrap-cheatsheet
The inspection list needs to be updated (we have 37!), and the screenshot :-)
@awgaya Thanks.
@Mat'sMug I updated the list.
17:46
Awesome
I have hardly started though.
I like that features dropdown
I did a basic description of the refactorings, and that's about it.
Other than this menu. Took me a bit to get it to drop down on hover instead of click.
Well done
Next up: Make the drop down open a horizontal list instead of vertical.
17:47
[rubberduck-vba/Rubberduck] build for commit cb37aaf0 on unknown branch: AppVeyor was unable to build non-mergeable pull request
BUILD FAILURE!
@Duga hmm conflicts?
no idea what's wrong, pushing the changes took around 5 minutes
removed the logger dependency in the vbeeditor project so that at least everything else has logging + merged the latest changes
I merged Gareth's extract method PR yesterday, was quite massive, did you pull next?
yeah
[rubberduck-vba/Rubberduck] build for commit cb37aaf0 on unknown branch: AppVeyor was unable to build non-mergeable pull request
BUILD FAILURE!
18:03
> Looks like I broke something? It was a simple find and replace commit anyway, I'll create a separate branch and come back later :)
the only google results related to this problem link back to this chat lol
3
Darn.
That popup stays in the element, not out of it:
shrug Apparently Imgur edit doesn't work.
I'll leave it like that for now.
perhaps you need the bootstrap js?
stupid question :p
should vbext_ComponentType.vbext_ct_ActiveXDesigner also be treated as default instance variables?
18:23
@awgaya perhaps... I don't even know what those are :-/
Could those be the damned Access forms and reports??
both of those seem to be documents
I hate Access
...and Access hates me apparently
I'll mark everything except stdmodule + class as default instance, ok?
huh?
18:35
Access isn't cooperating with anything we're doing lol
what are you trying to do then :P
Offline, bbl
@awgaya declare a fake field variable for every control :-)
18:50
[rubberduck-vba/Rubberduck] build for commit 3948c67d on unknown branch: AppVeyor build succeeded
Solved it.
Well, sort of.
If I make the menu always stay open (which doesn't look bad now it is displayed as a horizontal list) it works.
Grrr... this would be easier if System.__ComObject wasn't declared as internal.
@Mat'sMug Does that look nice?
19:45
[rubberduck-vba/Rubberduck] build for commit 257257c6 on next: AppVeyor build succeeded
> Implemented in #1563 and #1571.

There's a "enable detailed logging" option in the general settings now that enables Debug+Trace log messages. When disabled only messages with Level Info or above are logged. This is for files.
The event log only records error messages. The debug output window always shows everything.
> Implemented in #1563 and #1571.

There's a "enable detailed logging" option in the general settings now that enables Debug+Trace log messages. When disabled only messages with Level Info or above are logged. This is for files.
The event log only records error messages. The debug output window always shows everything.
> Fixed with #1563.
> Fixed with #1560.
[rubberduck-vba/Rubberduck] build for commit f4d7638e on next: AppVeyor build succeeded
closed some issues, the last one can be closed according to @INOPIAE, hope that's ok :P
@Hosch250 yeah... wasn't it right-aligned?
saw an ad for rubberduck on stackoverflow today lol, did you put that up mat's mug?
20:19
@Mat'sMug Yeah, but the collapse thing was messing the dropdown up.
@awgaya Yeah, the community proposes them and people vote.
And it looked kind of funny right-aligned when it was dropped anyway.
20:41
@awgaya yep. There's one on CR as well :-)
> Is there an option to switch off logging altogether?
@awgaya You forgot to uncomment the Move Closer To Usage thing.
> No, there's only an option to reduce logging, the idea being that we still want to be notified of the worst things that happen. The log is configured so that each file is not bigger than 5MB and should I think be overwritten after 9 log files after created (I haven't tested that last part though).
It didn't break any tests because I don't have that snippet under test because I can't get the test to wait until the events finish (yet).
move closer to usage thing?
20:50
The refactoring.
You commented a big chunk out, and didn't reinstate it.
Did you merge your re-written grammar?
The types I was using don't exist anymore.
Don't worry about it, I'll fix it later.
you're right, missed that one, sorry
yes the grammar is rewritten
there are no valuestmts anymore, no ICS_S_MembersCallContext anymore either
the replacement starts here, more or less: github.com/rubberduck-vba/Rubberduck/blob/next/…
the formatting is a bit off, but anyway, valueStmts are expressions now in most places
I can fix that commented out part now if you want?
not that you're changing it and we'll have merge conflicts
20:59
Sure.
00:00 - 21:0021:00 - 00:00

« first day (717 days earlier)      last day (2463 days later) »