« first day (2056 days earlier)      last day (1124 days later) » 
00:00 - 20:0020:00 - 00:00

8:11 PM
which .NET development kits should I install (Not that I expect to be doing a lot of .NET on my work PC any time soon...)? I've got options from 4.6.1 to 4.8
 
what do you need to do?
if it's to develop RD, you need 4.6. If it's for you to develop your own thing, you need 4.8
No sense in installing every version if you aren't going to use them.
 
prolly not going to develop anything but a couple of SSIS packages, but it's fun to feel like one of the cool kids. ;)
 
OTOH, it can get annoying if you are downloading a random GH project and find out you can't compile it because it runs on 4.7.392.393482.344984 and you only have 4.6.1 or 4.8 and you must restart the Visual Studio in order to install.
 
INSTALL ALL THE THINGS!!!
 
In that case, SSIS is going to drive the framework... Gee, I can't remember if it let you choose a framework at will or not.
 
8:14 PM
thinks you've run into @this before
@MathieuGuindon I thought of that, then I didn't want to confuse myself too much
 
@MathieuGuindon I assume that should include C++ toolchains, Unity game engine, F#, UWP, and everything under the sun.
Should be only a couple of hundreds of TBs.
you never know when you need to use Unity game engine in your SSIS package
 
@this would that be for gaming the system?
 
^^
 
@this F# is, IIRC, only a few hundred MB.
 
8:19 PM
Question on looping vba components... is there a way to list all classes that implement an interface (i.e. have an "Implements" declaration without looping the declaration lines and simply looking for "Implements"?
 
This is where? In RD or VBA?
 
Rubberduck -> Find -> All implementations
 
sorry, VBA
 
vanilla VBE: Ctrl+F, "implements"
 
I don't think VBA has reflection, so if you need to do it programatically...
 
8:20 PM
oh, programmatically
#GoodLuckWithThat
 
mmm... sorry, programmatically...
yeah, that's what I thought :(
 
sounds like an X-Y problem
 
I don't think the RD declaration API really ever worked.
 
it did at once point
now it's just gone
 
Back when we were still finding declarations with regex :P
 
8:22 PM
X-Y problem?
 
@SmileyFtW It means you are solving the wrong problem, usually as a substep of solving a larger one.
 
I doubt the API declarations had the implementation information, unless it is provided by the parser itself.
 
Like, "I need to Frobnicate something. I know, I can do Foo, then Bar!".
 
135
Q: A car with square wheels

PatrickIf a question is posed How do I fit this square here on this here car so that it gives a smooth ride? and it comes with all the requisites to be a valid SO question (description, code, error messages, bolts & wrenches), do I then answer Fit it like so and make sure you tighten the bo...

 
@Hosch250 probably
 
8:23 PM
When the correct solution would be to install the Frobnication module and just frobnicate things.
 
Actually thinking about it, it probably did have the information but that might have not been exposed via the API as I think it had to be its own property.
 
1604
Q: What is the XY problem?

GnomeWhat is the XY problem? When asking questions, how do I recognize when I'm falling into it? How do I avoid it? Return to FAQ index

^ that's the one I was looking for
 
going away to read, now.. <G>
 
I've failed enough that I need to ask for help.
Using _uiDispatcher.Setup(m => m.StartTask(It.IsAny<Action>(), It.IsAny<TaskCreationOptions>())).Returns((Action argument, TaskCreationOptions options) => Task.Factory.StartNew(argument.Invoke, options)); as an example to lean on.
 
@MathieuGuindon you're basically telling me that all those math lectures where we solve a function for x, like the slope intercept y = mb + x are all bad.
 
8:25 PM
I've come up with _vbComponent.Setup(c => c.ExportAsSourceFile(It.IsAny<string>()).Returns((string folder) => folder)); which has an error on Returns.
> 'string' does not contain a definition for 'Returns' and no accessible exension method 'Returns' accepting a first argument of type 'string' could be found...
Declaration private readonly Mock<IVBComponent> _vbComponent = new Mock<IVBComponent>();
 
@IvenBach why are you still dealing directly with IVBComponent?
 
Within the test it's failing to return a string when ExportAsSourceFile is invoked.
 
@IvenBach You are missing a ).
 
Trying to have it return a string to the temporary file.
 
The Returns goes on the Setup member.
Not on the ExportAsSourceFile member.
_vbComponent.Setup(c => c.ExportAsSourceFile(It.IsAny<string>())).Returns((string folder) => folder);
 
8:30 PM
 
FML.
I feel am so stupid.
 
I'm tempted to say "sending stupid vibes your way", but that wouldn't be nice :P
Don't worries, mocking isn't easy to learn.
I've done a TON of it to be able to see that like that.
 
@MathieuGuindon Well, that was great guidance.. When I was about to write what "X" is and ask help in doing it, the answer became self-evident... I guess I needed a rubberduck's patient listening...
 
I'm trying so hard to understand how to correct these tests that are now failing. I just don't know the material well enough to work with mocking adequately.
 
In fact, I'm being considered to be in charge of the unit tests for a team for a client of ours.
Also, Intellisense is your friend.
 
8:35 PM
@IvenBach does your refactoring's ctor take a AddComponentService parameter now?
because that is what you should be mocking I think
 
It did. I initially updated it to take one but when I updated the code to use the service it still didn't produce a string after invoking the ExportAsSourceFile member.
 
by working with the IVBComponent wrappers you are essentially reinventing the wheel
 
The failure occurs on this line: github.com/IvenBach/Rubberduck/blob/….
That member is called from github.com/IvenBach/Rubberduck/blob/….
 
again, that code is not needed. the refactoring is doing work that's already implemented elsewhere
 
Then I don't know how to properly update it. I tried using the service github.com/IvenBach/Rubberduck/blob/… in place of what's shown but that didn't work either.
 
8:40 PM
all the refactoring needs to do is come up with the string content of the new module, and pass that (along with the component name) to the AddComponent method
 
Do I set up what should be returned as the string result as part of the the Mock.Setup<T>(...)?
 
    public ExtractInterfaceRefactoring(
        IDeclarationFinderProvider declarationFinderProvider,
        IParseManager parseManager,
        IRefactoringPresenterFactory factory,
        IRewritingManager rewritingManager,
        ISelectionProvider selectionProvider,
        IUiDispatcher uiDispatcher)
    :base(rewritingManager, selectionProvider, factory, uiDispatcher)
not seeing the AddComponentService parameter...
 
I never pushed anything to the remote because I couldn't get it working.
I previously IAddComponentService addComponentService to the ctor after IUiDispather.
 
Making sure to store it to a backing field.
 
8:43 PM
readonly :)
 
yes yes yes. I bindly followed what was there as my example.
 
Duck check: you know what readonly does?
 
Then instead of using the current using (var interfaceComponent = components.Add(ComponentType.ClassModule)) I replaced it with addComponentService.Add(...).
readonly only allows the field to be accessed. You can't assign or change what it stores after the ctor (I'm guessing pedantry pete says initialization) has been completed.
 
correct
@IvenBach why do you need the interfaceComponent after it's created?
 
7 mins ago, by IvenBach
That member is called from https://github.com/IvenBach/Rubberduck/blob/Issue5346_Extract_interface_creates_private_classes/Rubberduck.Refactorings/ExtractInterface/ExtractInterfaceRefactoring.cs#L141.
 
8:46 PM
@MathieuGuindon The method you have to call actually depends on whether you want to create based on the attributes code or the code pane code.
 
That's what is passed in to the AddExposedAttribute(...) member as the IVBComponent.
 
yeah. in this case you want the attributes code, and the string would include the VB_Exposed attribute and value
i.e. AddExposedAttribute is redundant, the component is already created with all the attributes it needs
 
The idea of the AddComponentService is that you build the entire module text, let it create the component and not touch it again afterwards.
 
The point of the abstraction is that stuff outside VBEditor should touch com wrappers as little as possible; their cleanup is way to easy to get wrong.
 
8:50 PM
How is it redundant if when the class is added it doesn't have the attribute?
 
it's the refactoring's job to provide the content for the AddComponentService to do that
that includes any attributes it should be created with
the class is added without the attributes because you're adding it via IVBComponents and not AddComponentService
 
Please note that you will have to provide the file header along with the attribute.
 
VERSION 1.0 CLASS
...
 
Have a look at an exported class and build it up based on that.
 
Mkay... I was just about to ask that.
 
8:56 PM
Hm, does the VBE add the standard attributes, if they are not there?
 
0
Q: Rubber ducky code in js Error "Unexpected identifier"

JackClarI am working on a rubber ducky script written in java script and I am getting an Unexpected identifier error, here is the line of code: type("(for /f "tokens=*" %i in (b.txt) do @echo SSID: %i & netsh wlan show profiles name="%i" key=clear | findstr /c:"Key Content" & echo.) > Log.txt\n") ...

 
@StackDuck uh, no
 
^^^ I don't know.
 
That is not RD.
 
removed
 
8:58 PM
@MathieuGuindon Comment flagged as being rude.
 
Once AddComponenWithAttributes(...) is invoked where/how can I access that added component from? When first tried it wasn't added to the target project.
 
Oh wait, I deleted my SO account. I can't flag anymore.
 
@Hosch250 sue me
:)
 
@MathieuGuindon I won't. SO might.
 
@IvenBach adding the component should be the final step, there shouldn't be any reason to access the created component afterwards
 
9:00 PM
:argh: Will have to pick this up. Meeting.
 
OK, I just tested it.
You only need the following header for a class with standard attributes.
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
However, I would like to suggest to also provide the VB_Name attribute.
Otherwise, the VBE will base the class name on the filename, which might not be legal for a temporary file.
 
that's the bare minimum though - in this case I think we'll want to have the VB_Name, VB_Exposed and VB_Creatable (private=not exposed but creatable, public=exposed but not creatable) attributes specified
 
Why VB_Creatable?
The standard value is False.
 
ok so not that one
I thought it would have been True for a private class
 
No
It refers to whether the class is creatable from outside the project.
 
9:05 PM
It just doesn't work in VBA
However, it might in VB6.
 
actually when I say "doesn't work", I should mean "it is ignored by VBA"
 
I think you mentioned before that there are more instancing options in VB6.
 
hmm I wonder if ODE would have allowed you to do just that.
Yeah, up to 6 and I had understood that they are basically a combination of all those attributes
@mansellan do you happen to know if you can do PublicCreatable class using ODE?
 
Hm, I am experiencing consistent silent restarts of Excel again.
Win10 x64, Excel 2019 x64
 
9:10 PM
@M.Doerner steps to reproduce?
 
@this from memory, you can't do anything in ODE that you can't do with normal office for normal VBA projects. ODE just lets you create a subset of the VB6 project types (ActiveX Dll) etc without needing the full VB6 IDE.
 
Ok. So I guess we don't need to support it in VBA's side then.
 
So, if you wanna make a dll then sure, it can have PublicCreatable. But you can do that in VB6 anyway, so...
@this agreed
 
so... the refactoring does need to provide a value for it
 
at least for VB6, I guess.
 
9:12 PM
oh crap no
no no no
just no - all interface classes generated by RD should be non-creatable, full stop
 
:derp:
you're right.
got nerdsniped by the attribute that I lost the big picture.
 
^^
(dang Fr-CA keyboard keeps switching on me)
 
That said, it'd make for a interesting inspection - alerting when an interface has PublicCreatable flag or something that just shouldn't be
IIRC, we already have an inspection warning against newing up an interface, right?
 
9:28 PM
hm, we have one flagging concrete implementations in interfaces, but I don't think we're flagging interface classes being New'd up
 
hm, ok. I am pretty sure we had an issue for that.
 
in a similar vein, #264 wants in
hm, and in the meantime we devised the means to work out whether the class has a predeclared instance, so the edge case is coverable now
 
> Linking #264

Also, as a possible bonus, we can consider separately flagging the case where an interface has an attribute indicating that it is creatable outside its project. That would only be applicable to VB6 projects but would at least avoid shipping a VB6 DLL that gives out false promises about its external contract.
 
@MathieuGuindon should this affect every known controls?
    <ControlTemplate x:Key="ControlTemplateStyle" TargetType="Control">
        <ControlTemplate.Resources>
            <ResourceDictionary>
                <ResourceDictionary.MergedDictionaries>
                    <ResourceDictionary Source="{DynamicResource local:StyleSelector.StyleDictionary}"/>
                </ResourceDictionary.MergedDictionaries>
            </ResourceDictionary>
        </ControlTemplate.Resources>
    </ControlTemplate>
 
huh, we can just do that and automatically have all the shared styles included in????
 
9:39 PM
That's what I hoped to do.
does nothing, though.
 
would it not be TargetType="UserControl"?
 
I can try - I was not sure if I need to make sure to style the WPF's builtin controls
besides, not all XAMLs are UserControl
we have a Button, a DataGrid and one more I am forgetting
 
actually with an x:Key it wouldn't be applied unless it's explicitly specified
 
it complained about not having x:Key
 
like, ControlTemplate={StaticResource ControlTemplateStyle}
 
9:43 PM
probably because it's defined in a shared ResourceDictionary, which requires every elements to have a x:key
 
and we don't have equivalent of Application.Resources, right?
 
we don't have an Application :)
 
right - I got away with it by having all XAMLs use a shared ResourceDictionary
UserControl didn't work either
 
10:06 PM
@Hosch250 depends on what you call "country"
 
@Cyril huh? If you wear a cowboy hat and plunk some strings, that's all you need to be "country"
oh, and the songs must be about losing something.
 
you just described Ludacris
 
@this alternating bass pattern and simple "bass-strum-bass-strum" rhythm pattern
 
#REF!
 
also the strings need to be steel strings and it gets better with some twang in the vocals
 
10:08 PM
I see.
Too bad - this doesn't work, either:
    <Style x:Key="ControlTemplateStyle" TargetType="UserControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="UserControl">
                    <ControlTemplate.Resources>
                        <ResourceDictionary>
                            <ResourceDictionary.MergedDictionaries>
                                <ResourceDictionary Source="{DynamicResource local:StyleSelector.StyleDictionary}"/>
                            </ResourceDictionary.MergedDictionaries>
@Cyril oh a singer I never heard of. toss him in the same mental bin with other singers he won't have heard.
 
i mean... Earl Scruggs
masterful picker
billy ray cyrus... that fact that you're still around gives me an achey breaky heart
@Vogel612 "the walking bass line"
and steel guitars... very useful in bluegrass, alongside a banjo, for a specific type of sound
 
FWIW, I did like The Ballad of Buster Srcuggs. There's no accounting for taste.
 
but people like michael cohn were "country" but didn't fit that mold.
@this lol
foggy mountain breakdown is an honest to goodness classic
 
@Cyril so you're a country snob? ;-)
 
i would say i'm an afficionado with a nostalgic take ~_* lol
 
10:16 PM
erm, right. A snob, then.
 
lol
not sure if folks know it or not, but michael cohn sang the song "walking in memphis" about elvis, which was a pop, country, gospel, and soft-rock hit. Purists don't consider it country, but it hits on the main elements about past experiences and having a definitive message
love that song, and a few of his others; particularly his later-in-life work with allison kraus (sp?) and union station
 
I don't think I will be able to do this with only the style XAML. I probably will have to modify the top level element to include the dynamically selected resource dictionary. :\
 
@this just googled that; have never seen it, but looks pretty funny
 
It is. If you still can, watch it on Netflix. (I think it's exclusive to Netflix)
 
copy
coen brothers... hm
added to my wife's list
cast looks pretty solid, too
thanks for the tip on that one
 
10:20 PM
if she doesn't like horrors, she might not appreciate that.
 
oh, was reading it like a dark comedy
 
Yes it is
it does have some unsettling elements, hence the reference to horrors
 
copy
alright, wife is finishing dinner and i need to clean up kids to eat. have a nice night, all
 
@this Just as it always is. Once I try to figure out the steps to reproduce, it stops restarting.
 
have you tried looking at it sideways? ;-)
 
10:36 PM
Maybe it just did not like it last time that I tried to import a malformed component.
 
could be
might have corrupted the IStorage somehow, leaving the host app somewhat unstable
 
10:47 PM
[rubberduck-vba/Rubberduck] build for commit 18774ce2 on unknown branch: Coverage not affected.
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/5347?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`next@c38ddae`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `n/a`.


```diff
@@ Coverage Diff @@
## next #5347 +/- ##
=======================================
Coverage ? 61.67%
=================
 
11:04 PM
[rubberduck-vba/Rubberduck] build for commit eb9c9e08 on unknown branch: AppVeyor build succeeded
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/5347?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`next@c38ddae`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `0%`.


```diff
@@ Coverage Diff @@
## next #5347 +/- ##
=======================================
Coverage ? 61.67%
==================
[rubberduck-vba/Rubberduck] build for commit eb9c9e08 on unknown branch: 0% of diff hit (target 60%)
INFORMATIONAL CODECOV FAILURE!
[rubberduck-vba/Rubberduck] build for commit eb9c9e08 on unknown branch: 61.67% (target 0%)
 
11:35 PM
That makes no sense. Why should a build fail if the coverage of the diff does not exceed the min threshold simply because the entire diff is excluded from the coverage calculation?
 
You're not alone. My PR failed for the same reason
 
coverage status should be "informational"
so even if the criteria were failed, it should still report green
at least that's what the docs say
 
Yet, Duga hollers failure
 
actually codecov does, soo ..
might be that the informational directive should be inside the patch or project keys
@M.Doerner could you try the following diff for codecov.yml
-     informational: true
...
      patch:
        default:
+         informational: true
...
      project:
      default:
+         informational: true
-         target: 0 # don't force a minimum coverage
+         target: 60
 
00:00 - 20:0020:00 - 00:00

« first day (2056 days earlier)      last day (1124 days later) »