« first day (1601 days earlier)      last day (1579 days later) » 

9:00 PM
One of the 2019 features is "Support for find all references in Razor (.cshtml) files."
 
Windows, if I'm closing an application, and it crashes on its face, I don't need you to restart it for me because I.... closed it.
 
MS' new build process seems to involve treating its users as free QA staff / guinnea pigs
 
Well, I'd hardly say that.
Most of them are still caught.
 
yet they push, what, weekly VS updates?
 
With little fixes. And one just to rebrand VSTS to Azure Dev Ops...
 
9:02 PM
and it still pukes its brains out on git checkout
 
LOL, git checkout works here :)
 
@MathieuGuindon just use tortoise and be happy.
 
I've no problem with git.. as long as VS is closed and I don't need to reload the solution
 
@this But... Even their logo is slow...
 
9:03 PM
@MathieuGuindon #WorksOnMyMachine...
 
yeah, well, try building RD now
 
@Hosch250 it works.
 
Did on my machine two weeks ago
 
that was prior to the new .csproj format
 
I still have to finish that inspection; so I'll be doing it again soon.
Hmm...
So that did it?
 
9:04 PM
Well, I don't think it's build per se.
 
I've been using the new format in other places just fine.
Wonder if something went wrong somewhere.
 
without wildcard version number
 
I think what happened is that after the change, it has Microsoft's code analyzer on by default
so it's been running Microsoft's code analyzer on every build
and generating a boatload of warnings
Vogel already ignores most of them so it's only 600 instead of whatever it was originally at
 
I don't mind that. what I do mind, is when the build fails and all I'm getting is a bunch of stupid CA warnings/"errors", and no clue whatsoever about the actual build error
 
oh yeah. That's annoying as hell
 
9:06 PM
@MathieuGuindon Oh yeah, I think it was 15.7.8.
I'll have to check after work.
 
10 mins ago, by Mathieu Guindon
19 hours ago, by Comintern
Current is apparently 15.8.7, unless different editions have different versioning, but I doubt that.
 
would be nice to ensure that if it fails, stops building altogether
 
Typo?
 
@MathieuGuindon No, that's right.
I just went to 15.8.8.
 
9:07 PM
don't keep on building because you have.... nothing.
 
Speaking of releases, we releasing 2.3 soon?
 
It was a typo on my side.
 
@mansellan soon.
for some values of "soon".
 
@this 15 minutes later - build failed. would you like to run the tests off a useless outdated build that succeeded some time last week?
 
IKR?
 
9:08 PM
I need a lull at work so I can get VS 2017 installed here.
 
@mansellan got anything pending for VB6?
 
More like I need a lull at work so I can take a damned vacation...
 
I'm willing to ship 2.3.0 without block-AC, but SCP has to be there
 
But for me I think the worst thing is when I try to build and I'm still running RD. Deployment then get stuck for long time.
and if I remember to shut the host down, VS fails anyway
 
@MathieuGuindon nothing that can't wait
 
9:09 PM
We should probably fix the quick-fixes first.
 
gotta prepare a quick summary for these 1.4K commits..
 
The inspection result bugs don't mangle code, but those do.
 
also there's a bunch of weird regression resolver issues that popped up recently
 
@MathieuGuindon "Hi. Stuff happened. Here's 2.3 version. Enjoy!"
 
9:11 PM
Gotta drive, bbl
 
later!
 
Oh, there's the UI thing too.
#4361 - IIR that involves the parser
 
i just thought up a funny
there are people out there that shouldn't be trusted to not get malware on a typewriter...
 
and hopefully we can fix the ghost process. That's the last (knock on wood) issue that prevents clean shutdown of RD. Who knows maybe we'll get lucky and we can close out the pUnk project. </pipedream>
 
Wayne made that change to force a the TypeInfo stuff to run on the UI thread, but that means if the code doesn't compile, things break.
That might be underneath a handful of the weird resolver bugs too.
 
9:14 PM
Why should it need to be compiled?
I mean, we can't parse uncompilable code anyway?
 
It doesn't.
 
Then I don't follow.
 
The problem on 4361 is that it requests a reparse from a non-UI thread. That causes validation to fail:
Exception thrown: 'System.ArgumentException' in Rubberduck.VBEditor.dll
2018-09-20 19:15:25.0397;ERROR;Rubberduck.UI.Command.ReparseCommand;System.ArgumentException: Expected COM object, but validation failed.
   at Rubberduck.VBEditor.ComManagement.TypeLibs.TypeLibWrapper..ctor(IntPtr rawObjectPtr, Boolean isRefCountedInput) in
IIR there was a reparse requested in there too.
 
That should really not be a problem.
 
@Hosch250 got a link about Thermite as software right? Google tells me that Thermite is a self destructing hard disk!
 
9:17 PM
In all places, the TypeLibWrapper is used, the execution should be pushed to the UI thread.
 
Hmmm..., I could have sworn I wasn't on the UI thread there.
 
Thermite () is a pyrotechnic composition of metal powder, which serves as fuel, and metal oxide. When ignited by heat, thermite undergoes an exothermic reduction-oxidation (redox) reaction. Most varieties are not explosive, but can create brief bursts of heat and high temperature in a small area. Its form of action is similar to that of other fuel-oxidizer mixtures, such as black powder. Thermites have diverse compositions. Fuels include aluminium, magnesium, titanium, zinc, silicon, and boron. Aluminium is common because of its high boiling point and low cost. Oxidizers include bismuth(III) oxide...
 
However, that is something the caller must ensure.
 
Yeah, using UiDispatcher
 
Sep 21 at 1:17, by Comintern
I'm not on the main thread.
 
9:18 PM
Exactly
 
C-4 or Composition C-4 is a common variety of the plastic explosive family known as Composition C. A similar British plastic explosive, based on RDX but with different plasticizer than Composition C-4, is known as PE-4 (Plastic Explosive No. 4). C-4 is composed of explosives, plastic binder, plasticizer to make it malleable, and usually a marker or odorizing taggant chemical. C-4 has a texture similar to modelling clay and can be molded into any desired shape. C-4 is metastable and can be exploded only by the shock wave from a detonator or blasting cap. == Characteristics and uses == ==...
 
@Hosch250 oh not a software got it. Thanks :)
 
No, blowing them up.
And burning the remains afterward.
(Or before--whichever you prefer.)
 
Any call to the TypeLibWrapper should be put into a lambda and passed to one of the methods on the UiDispatcher.
 
Really, I think we need to start caching the data from the typelib
so that those data can be collected as part of the COM collecting
then the background components should not need to directly access the typelib API as much, right?
 
9:26 PM
We are already caching the conditional compilation constants.
 
i'm not sure what the extract interface is trying to do there without seeing the code.
 
Well, the test engine will still require it.
 
Yes, but that is actually OK since it'll have to be on UI
 
I think it end by requesting a parse on a new task.
 
(I wrote UI originally but thinking about it, it's more that we need to avoid coding code that runs in background to access typelib API)
 
9:28 PM
I think the test engine actually does the wrapping, IIRC.
 
with test engine it's not a problem because someone has to click the button to start the tests.
but if we run a background task and it may access the typelib stuff, that should not be done.
 
Oh, the problem is not in the parsing process; it is the ReparseCommand.
 
but @Comintern said he wasn't on main thread anymore?
 
It calls _typeLibApi.CompileProject(project).
 
hmm.
i guess to ensure that refactoring can be run, I suppose.
 
9:32 PM
No, the refactoring requests a reparse in a new task it spinns off.
 
since it would mangle hte code if the code can't be compiled.
ah
 
Don't most of the refactorings do that?
 
so it's at the end of refactoring.
 
I think most of them just request a reparse.
 
9:32 PM
A refactor obviously invalidates at least one parse tree.
 
They do not put the request into a new task.
That is useless anyway.
 
Ah... gotcha.
 
The ParseCoordinator parses in a new background task anyway.
 
hmm. Given that we have a setting to compile before parse, forcing a compile is potentially redundant.
 
Still, the ReparseCommand should send the typeLibAPI stuff to the UiDispatcher.
The problem is in the code doing the compilation prior to the parse.
 
9:35 PM
I see.
 
Indeed.
That would be my bad
I think I naively assumed that it would be always on the UI thread since it would be from a button but that need not be the case.
 
OK, what am I doing wrong? I have an interface that extends another interface and a concrete class implementing the extending interface. Then I have a call to a method of the extended interface on the concrete object where the argument passed is dynamic.
What I get is a runtime binder exception stating that the method is not on the interface.
Using the extended interface directly works.
 
Why can't you just cast the dynamic?
 
Actually, what I am trying to do is split one method out of another interface.
The dynamic not my code there.
Specifically, I want to split Rewrite out of the IModuleRewriter into an IExecutableModuleRewriter in an attempt to change teh organization of rewriting.
Btw, I have no idea why the code uses dynamic in the SplitMultipleDeclarationsQuickFix.
 
9:51 PM
to be clear, Rewrite would no longer exist in the IModuleRewriter but now in IExecutableModuleRewriter?
 
Yes
 
and the class SplitMultipleDeclarationsQuickFix would implement the IExecutableModuleRewriter, right?
 
The problem is that it complains that Replace is not on IExecutableModuleRewriter.
No
That class just gets one from the parser state.
and uses it on a dynamic target, that might as well just be a ParserRuleContext.
 
TBH, I'm not sure you can do that without an explicit cast
 
My idea is to hand out rewrite sessions instead of executable rewriters. The session hands out IModuleRewriters and saves the corresponding IExecutableModuleRewriters. Calling Rewrite on the session, does so on all rewriters requested.
 
9:55 PM
because from little I know, what dynamic may be at the runtime may not be what you want it to be, and must be cast if you wish to use a specific method that may not exist on the main object.
 
Just to be clear, I am passing the dynamic thing to the rewriter, which is declared as IExecutableModuleRewriter, which extends IModuleRewriter, which has the method required.
Explicitly casting the rewriter to IModuleRewriter avoids the exception.
 
But that's the thing - dynamic only knows that it's IExecutableModuleRewriter
I don't think you get to access all possible interfaces with a dynamic and for that reason, an explicit cast is needed.
 
That is kind of strange. I always thought of extending an interface as making it castable to the other interface and including all its members.
 
I don't know - I have not worked with dynamic that much but from my brief exposure, I found that explicit casting them helps to avoid problems, and with pattern matching in the switch it is less of a problem than it was.
 
Casting both arguments helped as well.
 
10:07 PM
do we actually need a dynamic, though?
 
10:18 PM
Actually, pattern matching would work as well.
 
10:34 PM
@Hosch250 Thermite is cool stuff.
 
@IvenBach ...and it's easy to make.
 
Shhhh... Don't let others know.
 
Especially not today...
 
11:19 PM
so I was investigating and I found out that for both UF and Access form, the VBComponent.Properties are inaccessible.
but they give out different error messages.
for Access.Form:
?application.VBE.ActiveVBProject.VBComponents(1).Properties.Count
---------------------------
Microsoft Visual Basic for Applications
---------------------------
Run-time error '35026':

Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic
---------------------------
OK   Help
---------------------------
for the userform:
?application.VBE.ActiveVBProject.VBComponents(2).Properties.Count
---------------------------
Microsoft Visual Basic for Applications
---------------------------
Run-time error '-2147467259 (80004005)':

Automation error
Unspecified error
---------------------------
OK   Help
---------------------------
 
.NET shouldn't care about the interface restriction, no?
 
Does anyone know if there's a chance that the errors are actually the same? It seems too concidental that the same command via VBIDE API would yield an error.
no, but we are getting it because we are going via VBIDE API.
in .NET, we are doing this: using (var properties = component.Properties)
where component is a IVBComponent
As you saw above, I was doing the near-equivalent from the VBE directly and I get the same error
 
Well the HRESULT on the UF is "Unspecified failure". Very helpful there...
 
lurk
 
^ doing it wrong?
 
11:24 PM
^
@Comintern that's why I was wondering if MSForms was actually wrapping the original error or something silly like that
cos the error number & message has nothing to do with each other but they are both present if either are "open"
 
I'm not getting any help from Google on RTE 35026.
 
but I can confirm that if either are open in design view, Properties works as expected
The problem, however, is that the original code has a dumb ol' try/catch block with no-op for catch
hhhmmm.
i better test that.
 
Huh. Could it be that the OLE wrappers or compositor just aren't running when it isn't in design mode?
 
that's what I'm thinking originally but I need to see what it does w/ UF open in normal view
cos the report was that Access ghosts when we run the code w/ an open form. AFAIK, this hasn't been reported for UFs
 
Heh. ?Err.Raise 35026 in the immediate window confuses the VBE.
 
11:32 PM
oh really?
 
Yeah, it gives a compile error - argument not optional.
 
ah, no wonder
UF never happens. It's not a document
WTF?
ah, no you had ?
it's not a function.
Err.Raise 35026 just gives that application-defined or object-defined boilerplate message
Ok, so here's what I know so far....
 
Yeah, that's what I got too. I was hoping to get luck with a description.
 
Once I hit VBComponent.Properties for that document, the no-op catch swallows it but at this point, Access is now ghosted.
We already have the properties in using, so it's being disposed
I even tried disposing the component (which I am not supposed to, BTW), didn't help
 
Can you test in VBA while it's in design mode, or does that just fail?
 
11:37 PM
test what?
 
Accessing properties to see if it ghosts.
That would narrow it down to RD hanging onto a resource as opposed to Access face planting.
 
i can quit just fine
so VBE somehow know enough to release whatever
or maybe it's not actually releasing
 
Right. It probably just spins down the reference count.
 
but if that were the case, my silly component.Dispose() should have worked, no?
 
Oh wait - it is the COM server. It can go down whenever the hell it wants.
 
11:40 PM
but once rD has parsed, it can't....
 
Not if it causes Access itself to leak something internally.
 
hmm.
 
Didn't we discuss at one point just not parsing when it's in design mode?
 
yes, what I wanted to avoid was adding host-specific stuff
because to know that information, you have to get it via Access API
rather than VBIDE API
 
Right.
 
11:43 PM
btw, i tested differently
Public Sub derp()
On Error Resume Next
    Debug.Print Application.VBE.ActiveVBProject.VBComponents("Form_Form1Form").Properties.Count
End Sub
this still quits cleanly
 
Interesting. That's using the compiled interface instead of the native one.
 
if you mean native = Access.Form, all Access.Form are exposed like that
e.g. VB project only see them as Form_***
 
Is the property call trying to force it to instantiate the form? I.e., call CoCreate.
 
hmm.
 
That would definitely leak.
Not entirely sure how to avoid it though.
The designer holds a running instance of the form, right?
 
11:47 PM
I would think so.
 
Spy++ seems to think so.
 
if form isn't open: The expression you entered refers to an object that is closed or doesn't exist.
 
It even has a window handle.
 
Access form itself, yeah it should
I can only actually get the count when the form is in design. If not opened or is in normal view, no go.
 
Does the underlying class holding the hwnd change when it's in design mode?
 
11:48 PM
hmm, good question.
 
I don't think the UF designers do, but I've never checked.
 
no
?forms(0).Hwnd
 2034886
 2034886
first was while it was in design; second while live
 
Makes sense. I suspect OLE voodoo.
 
I think so. ActiveX stuff has additional interface for design time, no?
I'm pretty sure those interfaces shouldn't be available when it's not design time.
and for whatever reasons, this affects the VBComponent.Properties
 
I don't think so - otherwise you wouldn't be able to, say, embed into a running spreadsheet or Word doc.
 
11:51 PM
One host-agnostic fix for this is to inspect if the interface is restricted and just not try to take the properties
but I don't think we expose that information via the declaration. AT least I coudln't find it.
 
Isn't that interface always going to be restricted though?
 
nope, remember, it works when it's in design view
 
That's a typelib flag, so I'm not sure how it could change.
 
only when it's in live view, then I can't access it.
oh... I would have to get it live
(i was assuming it got changed in between, since it's a dynamic class)
 
Can you just call query interface on it, or does the member always resolve?
That might be implementation specific, but dollars to donuts they just built it with the ATL libs.
Although... Access.
 
11:54 PM
not sure what you mean there.
 
ATL has a standard QI implemenation.
 
we are doing this:
var component = _projectsProvider.Component(qualifiedModuleName);
string parenthesizedName;
using (var properties = component.Properties)
using (var nameProperty = properties["Name"])
 
It's like COM boilerplate in C++\MFC.
And component.Properties is the failing call, right?
 
the properties => IVBProperties, which wraps the COM Properties
yes
in the first attempt at least
next attempt, it will get past that, but then fail on properties["Name"]
 
I was thinking of casting it to an unmanaged IDispatch or IUnknown and interrogating it about its Properties member.
 
11:56 PM
(for reasons not clear to me, the routine get called more than once).
hmmm.
so use dispatch binding....
let's see....
 
That seems a bit heavier than a host specific hack though.
 

« first day (1601 days earlier)      last day (1579 days later) »