text:
Bugfix introduced into bb08fe8113e37a6a44dc3ab4ca64fcf8a3ec200e

This is work on Pull Request #803 and help of @johanhammar and @fewieden

Great, then maybe we can close/decline #803?
I would really like to add a test for this but am finding it hard to mock moment.js.

Sometimes It's really hard work with dates in Javascript ;)
I think the good approach will be create a new pull request with test for that. I'll can help you with that.
For other hand, there are a stranger behavior I mentioned in review https://github.com/MichMich/MagicMirror/pull/803#pullrequestreview-30370685

Hi @johanhammar
There something weird for this case if we use moment-timezone in the test suite. You can see more information about this in

https://forum.magicmirror.builders/post/19276
https://forum.magicmirror.builders/post/19279

If you are interested to push on something on this will be great

I'll take a look at this later this week

Hi @roramirez
There seems to be a problem with the moment module  which doesn't seem to load correctly. I don't know the details of how modules are loaded (especially when running tests).
I've attached a screenshot showing moment not beeing loaded when running the test.

Hi @johanhammar
Are you setting nodeIntegration ?
For me this  is the stranger case, if I set nodeIntegration give me the same error like you show in the picture before.

authors: johanhammar roramirez

repo: MichMich/MagicMirror


text:
Prevent WebClient Launch

Is it somehow possible to publish an extension and NOT restart the webclient?
I found out that if I leave the windows client open everything works just fine. I can debug in the windows client and my users are using the windows client.

Hi Mark! At the moment it is not possible, but it clearly makes sense. We will look into supporting this scenario in a future update.

This has been implemented in the latest preview builds. By adding "launchBrowser" : false to launch.json you can prevent starting a new browser session.

source: gharchive/issue

authors: StanislawStempin atoader markbrummel

repo: Microsoft/AL

license: MIT

license_type: permissive

license_source: github-api


text:
Workflow Subscriber does not allow to publish

I've created a codeunit which subscribes to the Workflow Integration Events e.g OnApproveApprovalRequest,OnAddWorkflowEventsToLibrary,OnAddWorkflowTableRelationsToLibrary,OnRejectApprovalRequest, OnDelegateApprovalRequest.
This codeunit does not allow to publish the Extension. Its throws error A task was cancelled.

Could you please provide more details? A code sample + the exact error message and the actions that you took would be helpful

authors: Chris-Dsilva StanislawStempin


text:
When debugging "webclient" missing from url so page does not open

This is in NAV2018 RTM on-premise
When debugging (F5) my extension the URL produced does not work
http://localhost:8088/dynamicsnav110/?page=51100&debuggingcontext=f97983c8-e4cf-44f5-91bd-ff2192b867c7&sk=f97983c8-e4cf-44f5-91bd-ff2192b867c7
so the browser says:

Sorry, that didn't work
An error has occurred
Restart

This happens with the HelloWorld sample app as well.
Interestingly if I run the app without debugging (Ctrl+F5) then the URL is works.
http://localhost:8088/dynamicsnav110/?bookmark=11%3bYgAAAAJ7&page=51100&company=CRONUS%20UK%20Ltd.&dc=0
Other information:
Web Client Base URL: http://localhost:8088/DynamicsNAV110/WebClient
Launch.json
{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "al",
            "request": "launch",
            "name": "Your own server",
            "server": "http://localhost",
            "serverInstance": "DynamicsNAV110",
            "authentication": "Windows",
            "startupObjectId": 51100
        }
    ]
}

Any suggestions?

Is <NetFx40_LegacySecurityPolicy enabled="false" /> in the *Nav.server.exe.config file?

@kalberes, thanks
No it wasn't and, after setting it to false, now it works.
The documentation seems a little vague on this setting to me.  I wasn't trying to debug anything (or intending to use the debugging features), so basically this is a required setting.

Yes, it is required if you want to debug. F5 creates a debugging session with the server and that needs dynamic  operations to be performed. The CAS security  policy enforcement setting would not allow that.
If you just want to publish Ctrl F5 can do that and the setting can be as defaulted.


text:
How to update a Sandbox environment with unlocked methods?

Hi,
Is there a way to upgrade a sandbox with the latest release?
Do you have a documentation for that?
Thank you.

If you reset the sandbox it will be provisioned with the latest available cloud release.
For details on dockers versions please read this blog issue.
https://blogs.msdn.microsoft.com/freddyk/2018/04/16/which-docker-image-is-the-right-for-you/

authors: GHDevNav kalberes


text:
Handle partial success (response code 206)

Handle partial success
Add retry logic and exponential back-off

dang... I've just noticed David's first commit message. I'll squash and update the RP.

:shipit:

I cleared commit messages history and sent a new PR #276.

source: gharchive/pull-request

authors: dnduffy kamilszostak

repo: Microsoft/ApplicationInsights-JS


text:
Move local storage logging severity from CRITICAL to WARNING.

Our telemetry has shown local storage support to be quite good. These logs can be quieted down a bit.
Also make the recently added session storage logging distinct from local storage logging.

:sheep: it

authors: MaxShehovtsov OsvaldoRosado


text:
Convert to Python3

using : find . -name '*.py' | xargs 2to3 -w

@ralic,
Thanks for your contribution.
To ensure that the project team has proper rights to use your work, please complete the Contribution License Agreement at https://cla.microsoft.com.
It will cover your contributions to all Microsoft-managed open source projects.
Thanks,
Microsoft Pull Request Bot

Thanks for the effort here, but the library is supported by python 3.  There are currently issues with tests in Python >3.4 that ought to be addressed (see #19), but the library is otherwise fully-functional.  In this instance, 2to3 suggested fixes that are already handled (imports) or are aimed at corner-cases that are irrelevant in our code (iterating over list(dict.items()) rather than dict).
Closing.

authors: jjjordanmsft msftclas ralic

repo: Microsoft/ApplicationInsights-Python

license: mit

license_source: bigquery


text:
Is it safe to upgrade to ubuntu 16.10

Hi, I'm wondering is it safe to upgrade to 16.10 please or will that cause problems. I am asking since another LTS release won't happen for another year.

We have not been testing 16.10 internally so you will likely run into some issues.

Oh, thanks for replying.

16.10 primarily suffers from #1005 as of this writing.

You will also probably run into #555 if you go to 17.04 because of the strace update.  But yeah, #1005 is the big blocker on a lot of stuff, since they seem to have switched to using it in a ton of GNU devtools.

@therealkenc, is the failure on 16.10 the same clone call with CLONE_VM|CLONE_VFORK|SIGCHLD?  If so do you have a strace of an example failure on 16.10 that we can review?

Correct that's the pattern, not the namespace stuff (which got subsumed in there).
I believe, but haven't proved conclusively, it's a glibc thing. For example clang also gets the same error on 16.10 (message) but not on 16.04.
I've updated the test case in #1005 so it actually compiles clean with recent gcc and included the strace. I didn't include the strace at the time because it is just:
[...blah blah blah]
clone(child_stack=0xacef60, flags=CLONE_VM|CLONE_VFORK|SIGCHLD) = -1 EINVAL (Invalid argument)
[...blah blah, not working]

You don't need to install 16.10 to run the test case because I'm deliberately calling clone directly.

Thanks for the follow-up!  I was able to get a repro of this on 16.10 and updated the code to handle clone vfork (i.e. CLONE_VM|CLONE_VFORK|SIGCHLD) the same as vfork.  As part of this change we realized we have some differences in vfork and those will be patched up later.

@stehufntdev thank you :)

I tried Yakkety (16.10) today and all appears well so far on 15046. The apt-get dist-upgrade with an updated sources.list was utterly painless and didn't spew so much as a warning (that I noticed anyway). I thought strace might break because of #555 (also reported in #1578), but the strace version shipped with Yakkety is 4.12, and strace won't fail on #555 until version 4.15. I'll post again if I come across anything glaring, but I think you can put a fork in this issue because it looks done.

@therealkenc thanks for the update!  Closing this out as fixed for insider builds.

I suppose I should follow up on this one since it was marked as fixedininsiderbuilds at my behest; which, it technically was at the time due to #1005 being addressed. Unfortunately as of 16176, upgrading to Ubuntu 16.10 is "not safe" per issue title, due to #1878 and friends. I don't think it is necessary worth re-opening this issue (we have plenty), but it bears clarification in case anyone lands here in a tracker search.

authors: benhillis fpqc paladox stehufntdev therealkenc

repo: Microsoft/BashOnWindows


text:
[QnA Maker] Issue with recognizing emojis / emoticons

Problem description:
I would like to train my QnA Maker model, so that it correctly recognizes emojis (or group of emojis) and returns the relevant key which I will then handle further in my code. As a simple example I added following inputs and associated them with the QnA answer smalltalk.emoji.grin:
😀, :D and grinning face
This is how it looked like after I finished the training (notice that I can search the knowledge base using unicode emoji):

However when I tried to test the knowledge base, QnA did not recognize the 😀 and neither the :D:

I also tried to call the QnA Maker's Generate Answer API directly by passing the both raw and UTF encoded emoji, but that did not work neither:
{
  "question": "😀",
  "top": 3,
  "userId": "Default",
  "isTest": true
}

{
  "question": "\ud83d\ude00",
  "top": 3,
  "userId": "Default",
  "isTest": true
}

Response for both of the above scenarios:
{
  "answers": [
    {
      "questions": [],
      "answer": "No good match found in KB.",
      "score": 0.0,
      "id": -1,
      "metadata": []
    }
  ]
}

Question
How do I correctly train my QnA model so that it can correctly handle the emojis (both unicode and textual) or any other complex unicode characters? This seems to be supported by LUIS as it correctly categorizes the intent in case that I input emoji into it.

As you've discovered, QnAMaker doesn't know how to handle emojis coming in an activity from the bot. Therefore, you need to build in the functionality. This example demonstrates setting up via Node, however the implementation would essentially be the same for C#. There are nuget packages that can be installed, like Unicode.net. (I've purposely kept this demonstration simple. Alter as needed.)
For Node, you can download and install the NPM package node-emoji which has a number of nicely packaged methods. Once installed, add the following into your onTurn handler along with the necessary QnA bits. You can also setup to allow user's the send literal emoji's which QnA Maker can also match on (see pic below).
See inline comments for further explanation.
async onTurn(turnContext) {
    if (turnContext.activity.type === ActivityTypes.Message) {
        await turnContext.sendActivity(`Try sending ':heart:' or ':pizza:'`);

        // Strips out ":" from the user text to get the raw input
        let userText = turnContext.activity.text.replace(/:/gi, '');

        // Adds ":" to the new variable to compare if the original text input is an emoji
        if (':' + userText + ':' === turnContext.activity.text) {
            let emojiMsg = emoji.emojify(turnContext.activity.text);
            await turnContext.sendActivity(`Looks like I have that emoji! ${ emojiMsg }`);
            await turnContext.sendActivity(`Checking QnAMaker for a response to the image.`);

            // Perform a call to the QnA Maker service to retrieve matching Question and Answer pairs.
            const qnaResults = await this.qnaMaker.generateAnswer(emojiMsg);

            // If an answer was received from QnA Maker, send the answer back to the user.
            if (qnaResults[0]) {
                console.log('QNA Results: ', qnaResults[0].answer);

                // Assigns the emoji response and sends as an activity message to the user
                let emojiResponse = emoji.emojify(qnaResults[0].answer);
                await turnContext.sendActivity(emojiResponse);

            // If no answers were returned from QnA Maker, reply with help.
            } else {
                await turnContext.sendActivity('No QnA Maker answers were found. This example uses a QnA Maker Knowledge Base that focuses on smart light bulbs. To see QnA Maker in action, ask the bot questions like "Why won\'t it turn on?" or "I need help."');
            }
        } else {
            await turnContext.sendActivity(`You said: ${ turnContext.activity.text }`);
        }

    // Sends a quick greeting message to the user.
    // :heart: exists as an emoji but isn't in QnAMaker, so it responds "No answer".
    // :pizza: exists as an emoji and has a matching QnA pair and returns the :grinning: emoji (😀)
    // Because the user text in parsed and matched, simply typing "pizza" returns "No answer"
    } else if (turnContext.activity.type === ActivityTypes.ConversationUpdate &&
                turnContext.activity.recipient.id !== turnContext.activity.membersAdded[0].id) {
        await turnContext.sendActivity(`Try sending ':heart:' or ':pizza:'`);
}

I convert both :pizza: and "🍕" to "🍕" and always return "😀" . Because I parse the user text, if I simply type "pizza", nothing is returned. Without the parsing, "pizza" would match on :pizza: and return the second response.

The flow is far from perfect, but then that wasn't the point. Hope of help!

authors: Stardox stevkan

repo: Microsoft/BotBuilder-CognitiveServices


text:
You have to specify TLS version during create WebSocketSharp.WebSocket in C# sample code.

My issue is about DirectLine sample code of BotBuilder SDK for .NET, which is located at:
Samples/blob/master/core-DirectLineWebSockets/DirectLineClient
SDK platform is .NET
URL of Code Sample
https://github.com/Microsoft/BotBuilder-Samples/blob/master/CSharp/core-DirectLineWebSockets/DirectLineClient/Program.cs#L40
Problem Description
When I use above code to create a WebSocket to connect DirectLine I always get below error:
WebSocketSharp.WebSocketException: An error has occurred during a TLS handshake. ---> System.NotSupportedException: The requested security protocol is not supported.
at System.Net.SecurityProtocol.ThrowOnNotAllowed(SslProtocols protocols, Boolean allowNone)
at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
at WebSocketSharp.WebSocket.setClientStream()
--- End of inner exception stack trace ---
at WebSocketSharp.WebSocket.setClientStream()
at WebSocketSharp.WebSocket.doHandshake()
at WebSocketSharp.WebSocket.connect()
Actually, the root cause is  web server of DirectLine service forced TLS v1.2 but WebSocketSharp doesn't specified yet.
How to fix
Add below line after created WebSocketSharp.WebSocket object:
// You have to specify TLS version to 1.2 or connection will be failed in handshake.                 WebSocketClient.SslConfiguration.EnabledSslProtocols = System.Security.Authentication.SslProtocols.Tls12;

Would you like to submit a PR to add this code to the sample?

OK, I will do it soon.

@EricDahlvang, to get the PR ready.

Closing since this was apparently already merged: https://github.com/Microsoft/BotBuilder-Samples/pull/281
https://github.com/Microsoft/BotBuilder-Samples/blob/v3-sdk-samples/CSharp/core-DirectLineWebSockets/DirectLineClient/Program.cs#L44

authors: CoHealer EricDahlvang micli

repo: Microsoft/BotBuilder-Samples


text:
Bot Skype in review

Bot Info

SDK Platform: Node.js
Active Channels: Skype,
Deployment Environment: Azure Bot Service

Issue Description
My bot is in Review since several weeks with no information, no message or mail.
Is this normal?

@Polaris-BS Please share the Bot Handle and Microsoft App Id, so we can escalate this to the proper team.

Yes :
Microsoft App Id : ad902637-9704-47a3-ada0-140809db6d6b
Bot handle : ByeAndUse

Thanks @EricDahlvang  !

No news ? It's in review , no change :/

@Polaris-BS On February 8th, the response was: "We currently have some backlog with the Bot reviews and hence the delay . Will review the Bot and share feedback ."
I've pinged the review team again.  Thank you for your patience.

Thx EricDahlvang .
My solution must be in production in 15 days. It's been 8 months since it's in development is all operational except the revision. Many investors are becoming impatient. My first revision date of November 2017 :/

The following is the feedback:
The bot must have links to a valid Privacy Policy and Terms of Use, currently its giving 401 error.
Bot avatar image must be with non-black and non-white background color, now it has white background.
Once customer has addressed these issues resubmit the bot again for review.

ok i will do the necessary

authors: EricDahlvang Polaris-BS

repo: Microsoft/BotBuilder


text:
Changed Math.round to Math.floor to fetch random array element

Nice feature introduced in 0.9.0. Just tested this and got an "undefined" as bot reply. Found this cause.

Good catch.

authors: FedericoElles Stevenic


text:
'http://localhost:3979/api/messages' failed: [500] Internal Server Error

Hi, I keep getting failed: [500] Internal Server Error.
Using:

bot emulator v3.5.35
Bot SDK 3.14.1.1
C# bot
OS Windows 10

Could you provide a sample of your code and screenshots,I might be able to help you.

Hi @adamdharris
Internal Server Error generally indicates an issue with the bot's code.  Are you running the bot in debug mode in Visual Studio?  Do you see an exception or stack trace in the output window?

Hi @EricDahlvang
I am running in debug mode.  Is this the exception you are referring to?
Exception thrown: 'System.ArgumentNullException' in System.dll
Exception thrown: 'System.ArgumentNullException' in mscorlib.dll```

Interestingly sometimes it connects after a few minutes if I keep sending messages.  Other times it does not and keeps throwing the error.

I am in Australia and luis is published to Australian region.

Hi @Quico20
        public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
        {

            Common.CommonConversation.Connector = new ConnectorClient(new System.Uri(activity.ServiceUrl));
            Common.CommonConversation.CurrentActivity = activity;

            Activity reply = null;

            if (activity.Type == ActivityTypes.Message)
            {
                var userId = Common.CommonConversation.CurrentActivity?.From?.Id;
                // var token = _credentialStore.GetToken(userId);

                var userInput = await Helpers.InputHelper.ParseUserInput(Common.CommonConversation.CurrentActivity.Text);

                    if (userInput.intents.Where(w => w.score > 0.3).Count() <= 0)
                {
                    await Conversation.SendAsync(activity, () => new QnaDialog());
                }
                else
                {
                    UserIntentType userIntent = UserIntentType.None;
                    Enum.TryParse(userInput.intents.First().intent, true, out userIntent);

                    switch (userIntent)
                    {
                        case UserIntentType.greeting:

                            await Conversation.SendAsync(activity, () => new LuisDialog());

                            break;

[LuisModel("******", "*****")]
[Serializable]
public class LuisDialog : LuisDialog<object>
{

    [LuisIntent("greeting")]
    public async Task Greeting(IDialogContext context, LuisResult result)
    {
        string reply = "Hello...";
        await context.PostAsync(reply);
        context.Wait(MessageReceived);
    }

While running the bot in debug mode, can you set a breakpoint in the Post method you shared above, and step through the code, to determine exactly where the error is occurring?

Seems to be in WebApiConfig, take a screengrab for you
###WebApiConfig snippet

###bot emulator snippet

@EricDahlvang My bot emulator settings for reference

What is the exception in WebApiConfig?

I am not seeing the exception, is there a setting I need to activate in the exception settings?  Sorry only fairly new to VS

@EricDahlvang I have found the error, the code Intent["greeting"] and for QnA dialog is not recognizing greeting or QnA dialog

@adamdharris That sounds like a coding issue.  This repository is specifically for Emulator bugs/issues and feature requests.  Please post your question on StackOverflow with the botframework tag stackoverflow.com/questions/tagged/botframework and the Bot Framework Support engineers will assist you there.

authors: EricDahlvang Quico20 adamdharris

repo: Microsoft/BotFramework-Emulator


text:
Scrolling issue on desktop Chrome: Suggested actions cover last received message

When the most recently-received message includes suggested action buttons, those buttons end up covering the message. It seems that the window doesn't scroll up far enough to make the latest message visible. This only happens on Google Chrome on Windows or MacOS when zoom is set to something like 110%. It seems to be OK with a zoom of 100%.

I'm getting this same issue regardless of zoom level.

I’m now seeing this issue on Firefox and sometimes on Safari as well. It depends on the size of the window.

I'm also seeing this issue on the Emulator now (for MacOS).  I downloaded the latest released version – 3.5.36.

I'm also experiencing the same issue on the Emulator v3.5.36, but on Windows. Something broke in the latest update.

I think it may be related to https://github.com/Microsoft/BotFramework-WebChat/commit/e5069bd313c9a61831c994ee5217297e0007375f, the fix for suggested actions pushing the top message out of bounds. In History.tsx the tolerance for scroll detection is set to 40 when a suggested action appears, but I'm seeing values of up to ~51 on that last Math.abs() when there are already messages off-screen (although I couldn't say why that's the case). Bumping the suggested action detection tolerance up to 51 seems to sort it, but I haven't done any sort of extensive testing on this. Use workaround at own risk.
componentWillUpdate(nextProps: HistoryProps) {
   let scrollToBottomDetectionTolerance = 1;

   if (!this.props.hasActivityWithSuggestedActions && nextProps.hasActivityWithSuggestedActions) {
       //Should be 51?
       scrollToBottomDetectionTolerance = 40; // this should be in-sync with $actionsHeight scss var
   }

   this.scrollToBottom = (Math.abs(this.scrollMe.scrollHeight - this.scrollMe.scrollTop - this.scrollMe.offsetHeight) <= scrollToBottomDetectionTolerance);
   }

I made a similar change on my own, bumping the tolerance to 60.  It's been working well for me, but there could be undesirable side effects – not sure.
Emulator is still an issue.  I think the issue has been reported.

Far as I can tell the only impact of bumping up that tolerance is catching people who've scrolled up a tiny amount (~10 px) as being at the bottom of the page too. As long as you don't set it to anything ridiculous, it hopefully shouldn't even be noticeable.

I have modified my code's autoscroll method to always scroll down to latest message by just commenting out the if check. It has worked flawlessly up until now.
//if (this.scrollToBottom || lastActivityFromMe) {
            this.scrollMe.scrollTop = this.scrollMe.scrollHeight - this.scrollMe.offsetHeight;
//}

This issue is resolved in v4; please feel free to migrate your Web Chat version to resolve this issue!

authors: Kartik1607 M-Rowley MRowley1 achidlow corinagum dan-cohn magencio

repo: Microsoft/BotFramework-WebChat


text:
Modules do not throw TDZ errors for accessing imported TDZ'd bindings

import * as ns from './bug-dep.js';
print(ns.local1);
export let local1 = 23;

Actual: undefined
Expected: TDZ error on access of ns.local1

I don't understand how the example is a TDZ violation?  Is the module supposed to be importing itself?

@fatcerberus sorry I missed this comment. Yes, it's importing itself. You could do the same case with two files, it's just more annoying to repro. In general, when there are circular references, it is possible to attempt to access a binding before the initialization of that binding has been executed. This case is more-or-less the same as local1; let local1 = 23;.

I took a look at this whilst devising a fix for #5236 as they are related issues. Unfortunately fixing this issue was not a small ride-along with the fix to #5236 though thankfully this issue only effects code that should error out.
As a note on the cause of this issue:

currently all module imports are initialised to undefined
they are then populated with the values when the relevant export operations are evaluated
my #5236 fix enables exporting functions before module evaluation by using the existing function hosting mechanism combined with converting modules into 2 step generators
there is no mechanism to set a module import to a TDZ'd state at all - and I don't think the existing TDZ logic would work across file

A possible solution may be to track which module exports should be TDZ'd in the parser (let, const, class) - this tracking would need to be added - and then when initialising them set them to a getter that throws a TDZ error.

authors: bterlson fatcerberus rhuanjl

repo: Microsoft/ChakraCore


text:
lock down counters for inlinee function body

we assume a function body counters won't change after JIT started so we did lock down the counters while the function begins execution or creating codeGen workitem on it. however, the inlinee function body can be jitted without creating work item or begin execution. this change is to lockdown the counters while creating JIT time data.
a better place to lockdown for function body might be right after bytecode generated, however in Asmjs and WAsm design, the counters(like varcount) can be changed after bytecode generated. that change will be pretty messy.

:shipit:

authors: curtisman leirocks


text:
Load/Performance Testing with Easy Repro

Hi @TYLEROL,
I got a situation where I need to perform load testing with multiple users at the same time, like 200 users for example.
one of these scenarios is Creating a lead with 200 users at the same time.
Can we achieve this with Easy Repro?
Can you please let me know how we can do that.
Regards,
Santosh Dutt

Hi @SantoshDutt, you might want to look at Microsoft's CRM Performance Toolkit to perform this sort of testing, as this is exactly what it's desgined to do:
https://github.com/Microsoft/CRM-Performance-Toolkit
It uses Visual Studio webtests to simulate the load of as many users as you want to have logging in simultaneously. I saw it being demoed last week and it seems to fit exactly your requirements.
It takes a bit of setting up, but the zip file has a comprehensive Word Document taking you through the process.
I've not used it mysels so Im afraid I can't advise with any issues you have running it, but it does seem to fit your needs.

Hi @bwmodular ,
I have tried it in the above suggested way, but when i tried to create a project, its creating in a new solution rather than getting added to the existing easy repro solution.
Also when I had run the load tests, I couldnt understand on what basis the load tests were running.
The documentation isnt that clear to right away do something and make it work.
Any other suggestions?
Regards,
Santosh Dutt

Hi Santosh,
like I said, I've only seen it being demoed so can't really help much. What I saw was someone recording their browser interactions in Fiddler, exporting this from Fiddler into Visual Studio and then editing some of the values to make the test more realistic, but there were quite a few steps to get it going.
Sorry I can't be of more help,
Best wishes,
Ben

I've written up a way on how you can do this. Hope it helps.
https://www.linkedin.com/pulse/performance-testing-dynamics-365-online-trevor-stephenson/

authors: SantoshDutt bwmodular trevstephenson

repo: Microsoft/EasyRepro


text:
Correct null reference exception when mesh is removed during coroutine

This is to resolve issue #284

I think I fixed this in PR# 283 (although I very nearly made a similar mistake in that PR)

authors: CameronVetter darax

repo: Microsoft/HoloToolkit-Unity


text:
[R-package] fix examples in lgb.plot.importance

In #1626 , I accidentally left the examples on lgb.plot.importance with normal # instead of Roxygen #' comment indicators. This means that the corresponding documentation file was malformed and R CMD CHECK started complaining.
Please consider this PR to fix that example documentation.

I clicked "rebuild" on Travis. I would be SHOCKED if the initial errors this PR's build got are related to these changes. Some Python GPU-based test was failing, which should have nothing to do with R examples. I'm guessing it's just one of those transient Travis things.

@jameslamb The reason is here:
CondaHTTPError: HTTP 500 INTERNAL SERVER ERROR for url <https://conda.anaconda.org/conda-forge/linux-64/repodata.json>
Elapsed: 00:00.298675
CF-RAY: 45415cdbfda47143-ORD
A remote server error occurred when trying to retrieve this URL.
A 500-type error (e.g. 500, 501, 502, 503, etc.) indicates the server failed to
fulfill a valid request.  The problem may be spurious, and will resolve itself if you
try your request again.  If the problem persists, consider notifying the maintainer
of the remote server.

Conda-forge is unavailable, so the boost package cannot be downloaded, which leads to test failure.
Also, I should notify you that you should be ready for frequent docs-test job failures. The thing is that in this test we check all links in our docs by the LinkChecker software. Very often they become unavailable, broken; sites goes to down for maintenance; or ssl errors may occur (e.g., #1583, 1490). Don't be afraid! It's normal case. For example, Kaggle and libsvm sites "like" to yield 5xx error 😄 . Just re-run the problematic test one or two times (ideally, after one hour) or ping me for the future investigation. If this's the real problem with a link, I'll quickly create corresponding PR.

@jameslamb No problem! Feel free to ask me any questions about tests.

@jameslamb Tell me when to merge.

@Laurae2 I think we are good to merge! Now that I'm a collaborator, I can merge it. Big moment!

authors: Laurae2 StrikerRUS jameslamb

repo: Microsoft/LightGBM


text:
fix python warning

remove annoying warnings in example #341

@wxchan,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by Microsoft. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

authors: msftclas wxchan


text:
Support multiclass classification

to solve #43
I'd like to open this PR to let more people see and help build or test on this feature.
Lastest version.
You need to set objective = multiclass and metric = multi_logloss(or multi_error) in train.conf, num_class = in both train.conf and predict.conf. There is an example in example/multiclass_classification.

@wxchan Thanks for your nice work.
However, this seems will have conflict with my PR for the prepare of c_api. I refine some interface on boosting.h and metric.h.
Maybe you can continue after I finish the changes for interface refine.
Thanks again.

Hi, @wxchan , you can rebase master for the new c_api.
BTW, could you please also give some test example for this PR?

@guolinke I fixed the conflicts according to your new commits.
@chivee I already added an example in examples/multiclass_classification. You can run it and use compare.py here to compare its performance with xgboost.

A small bug when save the model. I think this line is not necessary. Because you already pop_back the trees if meets early stopping. The remaining trees will save at next SaveModelToFile(). After my commit, some trees will save twice, can't figure out why.
Btw, is it necessary to delete back() before pop_back()? I thought pop_back() (see docs) will delete it anyway.

@wxchan I think pop_back() cannot free the resource of a pointer.
refer to: http://stackoverflow.com/questions/10696124/vectorclear-pop-back-wont-run-destructor
https://www.daniweb.com/programming/software-development/threads/170492/does-std-vector-s-pop-back-free-the-memory
http://stackoverflow.com/questions/10696124/vectorclear-pop-back-wont-run-destructor

@wxchan  to avoid save repeated model, you need to change this as well.

@guolinke Yes, I know, but I can't figure out how. (I already changed  early_stopping_round_ to early_stopping_round_ * num_class_, but it's not where the problem is)
Actually, I am not sure your origin code is right. For example, set early_stopping_round_ = 10, and assume when iter = 50, it meets early stopping criteria. In this situation, at iter 50, you already write first 40 trees to file. Then because of you pop last 10 trees in TrainOneIter(), the models_.size() = 40. So, rest = 40 - 10 = 30. Then at line 336, saved_model_size_ = rest = 30. So, in line 341-348, 31-40 trees are saved again.
You can try to remove the SaveModelToFile() line I mentioned above and see it works. At least the result seems right.

@wxchan Thanks, you are right. I will fix this directly, then merge your PR after some other reviews.

@wxchan I fix this by change this https://github.com/Microsoft/LightGBM/blob/master/src/boosting/gbdt.cpp#L321 .
Use "iter_" is not so elegant.

authors: chivee guolinke wxchan


text:
Hang when turning on hexadecimal display in Call Stack

In some applications Visual Studio hangs when enabling Hexadecimal display in the call stack window.
I have a dump of the hang to share internally

I want to confirm, that it doesn't matter how do you enable the hexadecimal display - today I was able to reproduce this bug enabling Hex view through icon on a Debug Toolbar

I'm able to repro this fairly consistently with the VC Linux extension. Create a Linux console app and just declare an int variable, e.g. int number = 42;
Place a breakpoint, build/debug and add the variable to the watch window when you hit the breakpoint. Right click the watched variable and select hexadecimal. VS may or may not hang, but I'm having pretty good success with hang. It has to be killed in task manager.

@robotdad please include a project if you can

From Michael.Carmody@sap.com:
To reproduce I closed the “locals” window then I toggled the format on the “autos” window.
It seems to work if the “locals” window is open.

Stack trace for a hung VS:
WindowsBase.dll!System.Windows.Threading.DispatcherSynchronizationContext.Wait(System.IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)	Unknown	Non-user code. Skipped loading symbols.
mscorlib.dll!System.Threading.SynchronizationContext.InvokeWaitMethodHelper(System.Threading.SynchronizationContext syncContext, System.IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)	Unknown	Non-user code. Skipped loading symbols.
[Native to Managed Transition]		Annotated Frame
[Managed to Native Transition]		Annotated Frame
mscorlib.dll!System.Threading.Monitor.Wait(object obj, int millisecondsTimeout, bool exitContext)	Unknown	Non-user code. Skipped loading symbols.
mscorlib.dll!System.Threading.Monitor.Wait(object obj, int millisecondsTimeout)	Unknown	Non-user code. Skipped loading symbols.
mscorlib.dll!System.Threading.ManualResetEventSlim.Wait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken)	Unknown	Non-user code. Skipped loading symbols.
mscorlib.dll!System.Threading.Tasks.Task.SpinThenBlockingWait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken)	Unknown	Non-user code. Skipped loading symbols.
mscorlib.dll!System.Threading.Tasks.Task.InternalWait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken)	Unknown	Non-user code. Skipped loading symbols.
mscorlib.dll!System.Threading.Tasks.Task.Wait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken)	Unknown	Non-user code. Skipped loading symbols.

Microsoft.MIDebugEngine.dll!Microsoft.MIDebugEngine.VariableInformation.SyncEval(Microsoft.VisualStudio.Debugger.Interop.enum_EVALFLAGS dwFlags)	Unknown	Non-user code. Skipped loading symbols.
Microsoft.MIDebugEngine.dll!Microsoft.MIDebugEngine.AD7Expression.Microsoft.VisualStudio.Debugger.Interop.IDebugExpression2.EvaluateSync(Microsoft.VisualStudio.Debugger.Interop.enum_EVALFLAGS dwFlags, uint dwTimeout, Microsoft.VisualStudio.Debugger.Interop.IDebugEventCallback2 pExprCallback, out Microsoft.VisualStudio.Debugger.Interop.IDebugProperty2 ppResult)	Unknown	Non-user code. Skipped loading symbols.
[Native to Managed Transition]		Annotated Frame
[Managed to Native Transition]		Annotated Frame
WindowsBase.dll!System.Windows.Threading.DispatcherSynchronizationContext.Wait(System.IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)	Unknown	Non-user code. Skipped loading symbols.
mscorlib.dll!System.Threading.SynchronizationContext.InvokeWaitMethodHelper(System.Threading.SynchronizationContext syncContext, System.IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)	Unknown	Non-user code. Skipped loading symbols.
[Native to Managed Transition]		Annotated Frame
[Managed to Native Transition]		Annotated Frame
mscorlib.dll!System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle waitableSafeHandle, long millisecondsTimeout, bool hasThreadAffinity, bool exitContext)	Unknown	Non-user code. Skipped loading symbols.
mscorlib.dll!System.Threading.WaitHandle.WaitOne(int millisecondsTimeout, bool exitContext)	Unknown	Non-user code. Skipped loading symbols.
mscorlib.dll!System.Threading.WaitHandle.WaitOne()	Unknown	Non-user code. Skipped loading symbols.
Microsoft.MIDebugEngine.dll!Microsoft.MIDebugEngine.WorkerThread.TrySetOperationInternal(System.Delegate op)	Unknown	Non-user code. Skipped loading symbols.
Microsoft.MIDebugEngine.dll!Microsoft.MIDebugEngine.WorkerThread.SetOperationInternal(System.Delegate op)	Unknown	Non-user code. Skipped loading symbols.
Microsoft.MIDebugEngine.dll!Microsoft.MIDebugEngine.WorkerThread.RunOperation(Microsoft.MIDebugEngine.AsyncOperation op)	Unknown	Non-user code. Skipped loading symbols.
Microsoft.MIDebugEngine.dll!Microsoft.MIDebugEngine.AD7Thread.Microsoft.VisualStudio.Debugger.Interop.IDebugThread2.EnumFrameInfo(Microsoft.VisualStudio.Debugger.Interop.enum_FRAMEINFO_FLAGS dwFieldSpec, uint nRadix, out Microsoft.VisualStudio.Debugger.Interop.IEnumDebugFrameInfo2 enumObject)	Unknown	Non-user code. Skipped loading symbols.
[Native to Managed Transition]		Annotated Frame
[Managed to Native Transition]		Annotated Frame
Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.Internal.VisualStudio.PlatformUI.DataSource.Invoke(string verb, object pvaIn, out object pvaOut)	Unknown	Non-user code. Skipped loading symbols.
Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.PlatformUI.VsCommand.Execute(object parameter)	Unknown	Non-user code. Skipped loading symbols.
PresentationFramework.dll!MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource commandSource, bool userInitiated)	Unknown	Non-user code. Skipped loading symbols.
PresentationFramework.dll!System.Windows.Controls.MenuItem.InvokeClickAfterRender(object arg)	Unknown	Non-user code. Skipped loading symbols.
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)	Unknown	Non-user code. Skipped loading symbols.
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler)	Unknown	Non-user code. Skipped loading symbols.
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl()	Unknown	Non-user code. Skipped loading symbols.
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state)	Unknown	Non-user code. Skipped loading symbols.
WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(object obj)	Unknown	Non-user code. Skipped loading symbols.
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown	Non-user code. Skipped loading symbols.
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown	Non-user code. Skipped loading symbols.
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)	Unknown	Non-user code. Skipped loading symbols.
WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext executionContext, System.Threading.ContextCallback callback, object state)	Unknown	Non-user code. Skipped loading symbols.
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke()	Unknown	Non-user code. Skipped loading symbols.
WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue()	Unknown	Non-user code. Skipped loading symbols.
WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)	Unknown	Non-user code. Skipped loading symbols.
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)	Unknown	Non-user code. Skipped loading symbols.
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o)	Unknown	Non-user code. Skipped loading symbols.
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)	Unknown	Non-user code. Skipped loading symbols.
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler)	Unknown	Non-user code. Skipped loading symbols.
WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs)	Unknown	Non-user code. Skipped loading symbols.
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam)	Unknown	Non-user code. Skipped loading symbols.
[Native to Managed Transition]		Annotated Frame
[Managed to Native Transition]		Annotated Frame
Microsoft.VisualStudio.Platform.WindowManagement.dll!Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.PushMessageLoopOnContextMenuTrackingComponent.AnonymousMethod__218_1(object sender, Microsoft.VisualStudio.PlatformUI.OleComponentSupport.PreTranslateMessageEventArgs args)	Unknown	Non-user code. Skipped loading symbols.
Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.VisualStudio.PlatformUI.OleComponentSupport.OleComponent.FPreTranslateMessageCore(Microsoft.VisualStudio.OLE.Interop.MSG[] pMsg)	Unknown	Non-user code. Skipped loading symbols.
Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.VisualStudio.PlatformUI.OleComponentSupport.OleComponent.Microsoft.VisualStudio.OLE.Interop.IOleComponent.FPreTranslateMessage.AnonymousMethod__0()	Unknown	Non-user code. Skipped loading symbols.
Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.VisualStudio.PlatformUI.OleComponentSupport.OleComponent.CallAndReturnOnException(System.Func method, int retValueOnException)	Unknown	Non-user code. Skipped loading symbols.
Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.VisualStudio.PlatformUI.OleComponentSupport.OleComponent.Microsoft.VisualStudio.OLE.Interop.IOleComponent.FPreTranslateMessage(Microsoft.VisualStudio.OLE.Interop.MSG[] pMsg)	Unknown	Non-user code. Skipped loading symbols.
[Native to Managed Transition]		Annotated Frame
[Managed to Native Transition]		Annotated Frame
Microsoft.VisualStudio.Platform.WindowManagement.dll!Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.PushMessageLoopOnContextMenuTrackingComponent()	Unknown	Non-user code. Skipped loading symbols.

Linux user has reported this bug again too: https://github.com/Microsoft/VSLinux/issues/205

Another Linux user has hit this issue: https://github.com/Microsoft/VSLinux/issues/268#issuecomment-375276305

I also have the same issue which is very annoying. Also for some reason mine is stuck in Hex view and for the life of me I cannot set it back to decimal view.

This looks like it should have been fixed in 15.8 preview 3. What VS release are you seeing it in?

authors: AliAskari Andrew-MSFT akaStiX gregg-miskelly paulmaybee robotdad

repo: Microsoft/MIEngine


text:
Merge Buttons

In the Examples-folder we have buttons in UX/Prefabs and Prototyping/Prefabs, I think that the protoyping can use the same prefabs from UX. There are also buttons based on the MRDesignLab-Code in Holotoolkit/UX/Prefab/Buttons (also I am looking for some tutorial/examples how to use those button-prefabs).

@brean Have you tried the test scene InteractableObjectExamples.unity under https://github.com/Microsoft/MixedRealityToolkit-Unity/tree/master/Assets/HoloToolkit-Examples/UX/Scenes ?
Readme for InteractableObjectExample scene:
https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/master/Assets/HoloToolkit-Examples/UX/Readme/README_InteractableObjectExample.md
UX Examples Index Page:
https://github.com/Microsoft/MixedRealityToolkit-Unity/tree/master/Assets/HoloToolkit-Examples/UX

@cre8ivepark yes, I have checked the InteractableObjectExamples scene. The prefabs for the buttons there are in the folder
https://github.com/Microsoft/MixedRealityToolkit-Unity/tree/master/Assets/HoloToolkit-Examples/UX/Prefabs and there is documentation for it (you linked to it).
But there are also buttons in https://github.com/Microsoft/MixedRealityToolkit-Unity/tree/master/Assets/HoloToolkit-Examples/Prototyping/Prefabs
And there are buttons in the main toolkit folder: https://github.com/Microsoft/MixedRealityToolkit-Unity/tree/master/Assets/HoloToolkit/UX/Prefabs/Buttons where I do not see any documentation.
I think it is redundant to have 3 different places for buttons, so I suggest to merge those all together and have one standard way to do basic buttons for hololens.

Maybe @paseb  can tell us a bit about those buttons: Where are they used? How can I use them? Does it make sense to merge?

Closing issues older than 180 days. If this is still an issue, please reactivate with recent information.

authors: brean cre8ivepark wiwei

repo: Microsoft/MixedRealityToolkit-Unity


text:
Unity 2018.3.10 works in Remote, but has clear screen on deploy

I'm building an app for Hololens, using Unity 2018.3 and Beta 2 MRTK, it runs fine using Holographic Remoting.
It also builds and deploys successfully using VS2017, but deployed app renders nothing.
Can someone suggest what could I do wrong?
Unity Editor Version
2018.3.10f1
Mixed Reality Toolkit Release Version
2.0 Beta 2

hi, how did you solve this?

I am also experiencing this, I would also be grateful, if you can share how you solved it.

authors: RedChris sanidhya26 shamsfk


text:
Go To Definition even if the function is in a sourced file

I have one suggestion that I normally use a lot when programming in C++ in Visual Studio. In my R-scripts, I use to place functions in a separate file that I include in my script using source(). When I right-click a function in my script and select “Go To Definition”, I would like to go to the sourced file and look up the function… But that doesn’t work. It can only find functions that are located in the same R-file…

Yes, it is a planned feature, see #1364. Thanks.

authors: MikhailArkhipov norrasverige

repo: Microsoft/RTVS


text:
Add HTMLTemplateDocument

Fix https://github.com/Microsoft/TypeScript/issues/5199

But I need to add the following, right?:
declare var HTMLTemplateElement: {
  prototype: HTMLTemplateElement;
  new(): HTMLTemplateElement;
}

But I don't know how do it by addedTypes.json... :(

@dashaus I'm adding support for those. Will keep you updated.

:+1:

@dashaus The new bit is merged in. So to add constructors, you need to add a constructorSignatures string array property to your json object. Also, as this is a DOM type that should not be added to webworker definition, you may want to add a flavor property that has the value Web.
Your added json content should be something like:
    {
        "kind": "interface",
        "name": "HTMLTemplateElement",
        "flavor":  "Web",
        "extends": "HTMLElement",
        "constructorSignatures": [
            "new(): HTMLTemplateElement"
        ],
        "properties": [
            {
                "name": "content",
                "type": "DocumentFragment"
            }
        ]
    }

Something I did wrong ... I'm a newbie with git ... :(
I created a new pull request

authors: dashaus zhengbli

repo: Microsoft/TSJS-lib-generator


text:
[javascript] switch-case default not highlighted.

From @philipgiuliani on January 20, 2016 8:46

I think the screenshot explains itself.
Copied from original issue: Microsoft/vscode#2120

From @siegebell on January 22, 2016 7:34
same with typescript (0.10.6)

Looks good now. Closing Issue.
switch (keyCode) {
	case sf.key.CH_UP;
	case sf.key.N1:
		previousDate();
		break;
	case sf.key.CH_DOWN;
	case sf.key.N4;
		nextDate();
		break;
	default:
		Nav.handleKey(keyCode);
}

authors: aeschli anubmat

repo: Microsoft/TypeScript-TmLanguage


text:
Addresses await keyword coloring.

Fixes #74.

Hi @rbuckton, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Ron Buckton). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@zhengbli, @billti: What do you think of this change?

:+1:

authors: DanielRosenwasser msftclas rbuckton


text:
TSServer 2.0.6 fails with filenames without an extension

TypeScript Version:  2.0.6
Code
File bin\compile (note the file has no extension)
#!/usr/bin/env node

console.log('')

Opening the file and requesting a language feature (hover, code complete) results in an exception in the tsserver:
[Info  - 12:11:55 PM] Using tsserver from location: c:\Program Files (x86)\Microsoft VS Code Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js
[Trace - 12:11:55 PM] Sending request: configure (0). Response expected: yes. Current queue length: 0
Arguments: {
    "hostInfo": "vscode"
}
[Trace - 12:11:56 PM] Response received: configure (0). Request took 245 ms. Success: true
[Trace - 12:11:56 PM] Sending request: compilerOptionsForInferredProjects (1). Response expected: yes. Current queue length: 1
Arguments: {
    "options": {
        "module": 1,
        "target": 2,
        "allowSyntheticDefaultImports": true,
        "allowJs": true
    }
}
[Trace - 12:11:56 PM] Response received: compilerOptionsForInferredProjects (1). Request took 247 ms. Success: true
Result: true
[Trace - 12:11:56 PM] Sending request: open (2). Response expected: no. Current queue length: 0
Arguments: {
    "file": "p:/mseng/VSCode/vscode-extension-vscode/bin/compile",
    "fileContent": "#!/usr/bin/env node\n\nconsole.log('')",
    "scriptKindName": "JS"
}
[Trace - 12:11:56 PM] Sending request: geterr (3). Response expected: no. Current queue length: 0
Arguments: {
    "delay": 0,
    "files": [
        "p:/mseng/VSCode/vscode-extension-vscode/bin/compile"
    ]
}
[Trace - 12:11:56 PM] Sending request: projectInfo (4). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "p:/mseng/VSCode/vscode-extension-vscode/bin/compile",
    "needFileNameList": true
}
[Trace - 12:11:57 PM] Event received: configFileDiag (0).
Data: {
    "configFile": "p:/mseng/VSCode/vscode-extension-vscode/tsconfig.json",
    "diagnostics": []
}
[Trace - 12:11:57 PM] Response received: projectInfo (4). Request took 1091 ms. Success: true
Result: {
    "configFileName": "/dev/null/inferredProject1*",
    "languageServiceDisabled": false,
    "fileNames": [
        "c:/Program Files (x86)/Microsoft VS Code Insiders/resources/app/extensions/typescript/node_modules/typescript/lib/lib.es6.d.ts",
        "p:/mseng/VSCode/vscode-extension-vscode/node_modules/@types/node/index.d.ts",
        "p:/mseng/VSCode/vscode-extension-vscode/node_modules/@types/minimatch/index.d.ts",
        "p:/mseng/VSCode/vscode-extension-vscode/node_modules/@types/glob/index.d.ts",
        "p:/mseng/VSCode/vscode-extension-vscode/node_modules/@types/mocha/index.d.ts"
    ]
}
[Trace - 12:13:03 PM] Sending request: quickinfo (5). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "p:/mseng/VSCode/vscode-extension-vscode/bin/compile",
    "line": 3,
    "offset": 11
}
[Trace - 12:13:03 PM] Response received: quickinfo (5). Request took 2 ms. Success: false . Message: Error processing request. Could not find file: 'p:/mseng/VSCode/vscode-extension-vscode/bin/compile'.
Error: Could not find file: 'p:/mseng/VSCode/vscode-extension-vscode/bin/compile'.
    at getValidSourceFile (c:\Program Files (x86)\Microsoft VS Code Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js:46883:23)
    at Object.getQuickInfoAtPosition (c:\Program Files (x86)\Microsoft VS Code Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js:48776:30)
    at IOSession.Session.getQuickInfoWorker (c:\Program Files (x86)\Microsoft VS Code Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js:54807:62)
    at Session.handlers.ts.createMap._a.(anonymous function) (c:\Program Files (x86)\Microsoft VS Code Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js:54114:61)
    at IOSession.Session.executeCommand (c:\Program Files (x86)\Microsoft VS Code Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js:55223:28)
    at IOSession.Session.onMessage (c:\Program Files (x86)\Microsoft VS Code Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js:55243:35)
    at Interface.<anonymous> (c:\Program Files (x86)\Microsoft VS Code Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js:56300:27)
    at emitOne (events.js:96:13)
    at Interface.emit (events.js:188:7)
    at Interface._onLine (readline.js:232:10)
[Error - 12:13:03 PM] 'quickinfo' request failed with error.
Error processing request. Could not find file: 'p:/mseng/VSCode/vscode-extension-vscode/bin/compile'.
Error: Could not find file: 'p:/mseng/VSCode/vscode-extension-vscode/bin/compile'.
    at getValidSourceFile (c:\Program Files (x86)\Microsoft VS Code Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js:46883:23)
    at Object.getQuickInfoAtPosition (c:\Program Files (x86)\Microsoft VS Code Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js:48776:30)
    at IOSession.Session.getQuickInfoWorker (c:\Program Files (x86)\Microsoft VS Code Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js:54807:62)
    at Session.handlers.ts.createMap._a.(anonymous function) (c:\Program Files (x86)\Microsoft VS Code Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js:54114:61)
    at IOSession.Session.executeCommand (c:\Program Files (x86)\Microsoft VS Code Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js:55223:28)
    at IOSession.Session.onMessage (c:\Program Files (x86)\Microsoft VS Code Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js:55243:35)
    at Interface.<anonymous> (c:\Program Files (x86)\Microsoft VS Code Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js:56300:27)
    at emitOne (events.js:96:13)
    at Interface.emit (events.js:188:7)
    at Interface._onLine (readline.js:232:10)

This worked without problem with TS 2.0.3
@mhegazy @vladima could you please look into a fix. This is a regression and we should look into fixing this for VS Code 1.7 which ships mid / end next week.

@dbaeumer I cannot repro it as-is by just creating file without extension and opening it. However in the log I can see that you also have config file p:/mseng/VSCode/vscode-extension-vscode/tsconfig.json. Can you also paste it here?

The tsconfig.json is:
{
    "compilerOptions": {
        "target": "es5",
        "module": "commonjs"
    },
    "exclude": [
        "node_modules",
        "vscode.d.ts",
        "typings"
    ]
}

You can also clone: https://github.com/microsoft/vscode-extension-vscode

@dbaeumer  We've fixed the original issue in master however at this point 2.0.5 is already locked and it is pretty hard to put anything there. As a workaround on your side you can:

set internal option allowNonTsExtensions to true in compilerOptionsForInferredProjects request
don't send compilerOptionsForInferredProjects at all - default compiler options on the tsserver side already have allowNonTsExtensions being enabled

Should be fixed by  #11922

@mhegazy could this be backported to 2.0.6. We ship 1.7.x this week and this is basically a regression for us.

authors: dbaeumer mhegazy vladima

repo: Microsoft/TypeScript


text:
Anomaly with union types

Code
// CODE 1:

function add(a:number, b:number): number {
    return x + y;
}
add (1, 2);

/* ====================
CODE 2:
*/
function add(a:number, b:String | number): number {
    return x + y;
}
add(1, " "); // This shows as error in typescript. check the function parameter list.

/*=====================
CODE 3:
*/

function add(a:number, b:any): number {
    return x + y;
}
add(1, " "); // This doesn't show any error, here any can by any data type.

Expected behavior:
The return type (of type number) is accepting parameters which have type as number and any but not number and piped String | number
Actual behavior:
The above scenario must be uniform.

The any type is compatible with all types.
function add(a:number ) {
    return a;
}
let x: any;
add(x);  // no error

// the same goes for operands:
let b: number;
b + c ; // no error

authors: akarzazi daminisatya


text:
tsc crash: TypeError: Cannot read property 'flags' of undefined

TypeScript Version:  2.2.1
Code
export function classExtender<TFunction>(superClass: TFunction, _instanceModifier: (instance: any, args: any[]) => void): TFunction {

    return class decoratorFunc extends superClass {

        constructor(...args: any[]) {

            super(...args);
            _instanceModifier(this, args);
        }
    };
}

Expected behavior:
compile without crash.
Actual behavior:
C:\Users\andree\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:51296
throw e;
^
TypeError: Cannot read property 'flags' of undefined
at isValidBaseType (C:\Users\andree\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:23170:24)
at isConstructorType (C:\Users\andree\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:23051:24)
at getBaseConstructorTypeOfClass (C:\Users\andree\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:23087:105)
at getBaseTypeVariableOfClass (C:\Users\andree\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:22888:39)
at getTypeOfFuncClassEnumModule (C:\Users\andree\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:22900:48)
at getTypeOfSymbol (C:\Users\andree\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:22959:24)
at checkClassLikeDeclaration (C:\Users\andree\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:34410:30)
at checkClassExpression (C:\Users\andree\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:34379:13)
at checkExpressionWorker (C:\Users\andree\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:32255:28)
at checkExpression (C:\Users\andree\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:32205:42)

@sandersn can you take a look.

Looks like getBaseConstraintOfType returns undefined now, which isConstructorType does not handle.

Never mind, getBaseConstraintOfType could always return undefined. It's the fact that isConstructorType added a call to getBaseConstraintOfType, but doesn't check whether the constraint is undefined. All the other calls to getBaseConstraintOfType check the return value for undefined.

By the way, this code still does not compile with errors. TFunction needs a constraint to indicate that it is a valid superclass. See the explanation in the Typescript 2.2 announcement for an example.

Fix is up at #14250

authors: ahagelstein mhegazy sandersn


text:
VS2017: Incorrect TS6082 when --outFile is specified

TypeScript Version: VS2017 default 2.1.5.0
Repro:

Create a new Blank App (Universal Windows) project
Rename js/main.js to js/main.ts
Build+Deploy by clicking "Local Machine" and you will see js/main.ts below Script Documents
Go (Project) Properties->TypeScript Build
Write js/main.js on "Combine JavaScript output into file"

Build+Deploy
It will deploy successfully
Stop debugging and wait ~10 minutes

Expected behavior:
Nothing should happen, deploy should still succeed.
Actual behavior:
VS suddenly says
TS6082	Only 'amd' and 'system' modules are supported alongside --outFile

@SaschaNaz this is known and we're working on it. In the meantime if you set your Module system explicitly to None you can work around it.

Fix is in Visual Studio 15.2 , TS 2.3 and higher

authors: SaschaNaz minestarks


text:
this subclass inference problem

From @JonathanMEdwards on May 5, 2017 19:19

VSCode Version: Code 1.12.1 (f6868fce3eeb16663840eb82123369dec6077a9b, 2017-05-04T21:18:32.269Z)
OS Version: Darwin x64 16.5.0
Extensions:

Extension
Author
Version

ExtensionUpdateCheck
HookyQR
0.0.2

vscode-npm-script
eg2
0.1.9

auto-close-tag
formulahendry
0.3.12

backspace-plusplus
jrieken
0.0.15

Theme-MaterialKit
ms-vscode
0.1.4

debugger-for-chrome
msjsdiag
3.1.1

theme-black-plus
none
0.0.1

theme-visualstudio black
none
0.0.1

Steps to Reproduce:
class A {
  foo = 0;
  method() {
    if (this instanceof B) {
      this.foo;
    } else {
      this.foo;
    }
  }
}
class B extends A {
}

Produces error:
'Property 'foo' does not exist on type 'never'.'
Copied from original issue: Microsoft/vscode#26071

Confirmed in a js file with checkJs enabled

We narrow out A because B is structurally identical to A. This is an awkward sort of problem that applies to TypeScript as well.

I see. adding
private nominal() { }
to the subclass fixes the problem

But why does this work?
class A {
  foo = 0;
  method() {
    let t = this; // <----- type magic
    if (t instanceof B) {
      this.foo;
    } else {
      this.foo;
    }
  }
}
class B extends A {
}

TypeScript doesn't catch that t and this refer to the same entity because it would require analysis for aliasing of the runtime value. So if you look at t in the else branch, you'll have never, but this will appear unchanged in its type.

Here's another variation of this problem:
export class Foo {}
export class Bar {}
export let x = new Bar
x instanceof Bar || x instanceof Foo

You get an error on the x in x instanceof Foo because its inferred type is never. The fundamental problem in both my and Jonathan's case seems to be related to conflating structural and nominal typing. There is some structure to the value that Typescript isn't considering, namely the constructor.
Another way to think of it is the first instanceof does indeed prove that x conforms to the structural type of either Foo or Bar, but it doesn't prove that in the second clause of the || that that x doesn't still have that structure, but Typescript assumes it does.
It may be interesting to note that this is distinct from the behavior of typeof:
export type Stringornumber = string | number
export let y: Stringornumber = "asdf" as Stringornumber
typeof y === "string" || y / 2

This code correctly type checks because it isn't possible for y to be a string in the second clause of the or because the typeof === "string" check not only proves that y is a "structural" string in the first clause, but it proves that it can't be in the second clause as opposed to the instanceof behavior above.
Also, funny running into you here w/ the same bug I was about to report Jonathan, howdy :)

Using typescript 2.5.3 w/ noImplicitAny, strictNullChecks
Here's another variation of this problem:
export class Foo {x: number}
export class Bar {}
export function f(x: Foo | Bar) { x instanceof Bar || x instanceof Foo }

You get an error on the x in x instanceof Foo because its inferred type is never. The fundamental problem in both my and Jonathan's case seems to be related to conflating structural and nominal typing. There is some structure to the value that Typescript isn't considering, namely the constructor.
Another way to think of it is the first instanceof does indeed prove that x conforms to the structural type of either Foo or Bar, but it doesn't prove that in the second clause of the || that that x doesn't still have that structure, but Typescript assumes it does.
It may be interesting to note that this is distinct from the behavior of typeof:
export function g(x: string | number) { typeof x === "string" || x / 2 }

This code correctly type checks because it isn't possible for x to be a string in the second clause of the || because the typeof === "string" check not only proves that y is a "structural" string in the first clause, but it proves that it can't be in the second clause as opposed to the instanceof behavior above.
Also, funny running into you here w/ the same bug I was about to report Jonathan, howdy :)

It looks like there is a long history here:
https://github.com/Microsoft/TypeScript/issues/8168
https://github.com/Microsoft/TypeScript/issues/8503
https://github.com/Microsoft/TypeScript/issues/10934
https://github.com/Microsoft/TypeScript/issues/11245
https://github.com/Microsoft/TypeScript/issues/11664
https://github.com/Microsoft/TypeScript/issues/16693
https://github.com/Microsoft/TypeScript/issues/18276
Looks like a long time ago it worked as I suggested above, but it was moved to work this way. The new feature to not allow instanceof on things that can't be objects made some code that had been working break, though I now realize it had inferred some really strange types before so I'd rather have it break I suppose.
Anyway I've left enough notes here, I'm going to go ahead and work around it by making all of the classes structurally different w/ some dummy functions.

authors: DanielRosenwasser JonathanMEdwards jbrownson mjbvz


text:
Having trouble using definitions from another file with JS and JSDoc

TypeScript Version:  2.6.2 from VSCode

Search Terms:
augment globals jsdoc external file
Code
// globals.d.ts
declare global {
  type ListComponentProps = {
    /* .. */
  }
}

// list.jsx
/**
 * Renders a list of pois
 * @augments React.Component<ListComponentProps, ListComponentState>
 */
export default class ListComponent extends React.Component {
}

Expected behavior:
I want to have external types/interfaces so that in list.jsx, I don't have to do a bunch of @typedef comments.
Actual behavior:
Get an error that says... [ts] Augmentations for the global scope can only be directly nested in external modules or ambient module declarations.
As a side note... if I import something in globals.d.ts, that error goes away. So, just really trying to understand here what the appropriate way to have a file full of definitions that I can use in other components should be.
Playground Link:
Related Issues:

You don't need to write declare global if your file is already global -- you could just start writing type ListComponentProps directly. If you add an import it stops being global, and then you do need declare global.

Ok, strange, it didn't seem to work when I didn't have the declare global, but I'll mess with it again.


text:
Libraries specified in lib in tsconfig.json should be emitted as reference directives in declarations

Search Terms

lib declaration
lib tsconfig emitted

Suggestion
When specifying "lib": ["es2017.sharedmemory"], in tsconfig.json, I expected the output declaration files to include a reference directive to the lib, for example, /// <reference lib="es2017.sharedmemory"/>. Not doing so means that if I publish a package to npm that uses the SharedArrayBuffer type, the consumer will have to specify "lib": ["es2017.sharedmemory"], in their tsconfig.json too. This is super leaky as the original package could be used many levels deep and the requirement leaks to the top. This makes it unfeasible to use any kind of extra lib in a reusable package.
Relevant issue: https://github.com/sindresorhus/is/issues/51
My current workaround is to manually add the reference directives (which is now possible in TS 3.1.1, thanks to https://github.com/Microsoft/TypeScript/issues/26497), but this doesn't scale if the package has many files.
Use Cases
Being able to use types for modern features without the consumer having to know what I'm using internally.
Examples
https://github.com/sindresorhus/is/blob/c983ffa4cd83c114b18d021c180e6ba9265070cd/source/index.ts#L181
Checklist
My suggestion meets these guidelines:

[x] This wouldn't be a breaking change in existing TypeScript / JavaScript code
[x] This wouldn't change the runtime behavior of existing JavaScript code
[x] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. new expression-level syntax)

Being able to use types for modern features without the consumer having to know what I'm using internally

This is exactly why we don't want to emit the directives as suggsted -- if you have a lib reference to something you only use for implementation, but don't expose in your .d.ts file, then this would just introduce more potential for conflicts by including unneeded libs in the referencing project. If you use es2017.xxx but someone else intends to run with a polyfill .d.ts for the xxx feature, then they're effectively blocked from doing so.

authors: RyanCavanaugh sindresorhus


text:
Order matters while Resolving a Union Type and its conditional keys

TypeScript Version:  3.4.0-dev.20190202

Search Terms: Conditional Resolution, Optionals
Code
interface RangeProps {
    range?: false;
    onApply?: (value: Date) => void;
}
interface SingleProps {
    range: true;
    onApply?: (value: [Date, Date]) => void;
}
type CalendarProps = RangeProps | SingleProps;

function apply (props: CalendarProps) {
    if (props.onApply) {
        if (props.range) {
            // Should work as already inside props.onApply check.
            props.onApply([new Date(), new Date()]);
        } else {
            // Should work as already inside props.onApply check.
            props.onApply(new Date());
        }
    }
}

Expected behavior:
Above code should not throw error.
Actual behavior:
Error at lines after comment: Cannot invoke an object which is possibly 'undefined'.
Playground Link:
Related Issues:
Tried my best, sorry but could not find any
Please also change/suggest the title of issue if it does not reflect on the error.

Basically a duplicate of #28131

authors: RyanCavanaugh azizhk


text:
Slow compilation times when target=ES6

On Angular2 we noticed that our ES6 builds are taking much longer than ES5 builds for almost identical code base.

target=es5: ~11s
target=es6: ~21s

To repro with tsc on the angular code base:

check out: https://github.com/IgorMinar/angular/tree/tsc-perf-repro
cd angular
npm install
time ./node_modules/.bin/tsc -p modules

Please note that we are using custom build of typescript for Angular because of some minor patches that need to be applied on top of stock typescript (currently 1.5.3). These patches can be found here: alexeagle/TypeScript#1.5_error_is_class
To switch between ES5 and ES6 mode follow instructions in https://github.com/IgorMinar/angular/blob/tsc-perf-repro/modules/tsconfig.json.md
It is not clear to me why the two targets perform so differently. It would be great to get an explanation or even better improve performance of the ES6 target mode.

To add, we also noticed similar perf difference between the two modes when doing incremental compilation which can be tested with the -w flag passed into tsc.

Interesting, I would not expect significant differences when targeting different ES versions. Also I cannot reproduce this issue locally on Ubuntu box (there is some minor difference but it does not seem to be consistent)
v2m@v2m-ThinkPad-W520:~/sources/angular$ cp modules/tsconfig.json-es5 modules/tsconfig.json
v2m@v2m-ThinkPad-W520:~/sources/angular$ tsd reinstall --overwrite --config modules/angular2/tsd.json

-> running reinstall

>> written 9 files:

    - angular-protractor/angular-protractor.d.ts
    - es6-promise/es6-promise.d.ts
    - hammerjs/hammerjs.d.ts
    - jasmine/jasmine.d.ts
    - node/node.d.ts
    - rx/rx-lite.d.ts
    - rx/rx.d.ts
    - selenium-webdriver/selenium-webdriver.d.ts
    - zone/zone.d.ts
v2m@v2m-ThinkPad-W520:~/sources/angular$ git checkout modules/angular2/traceur-runtime.d.ts
v2m@v2m-ThinkPad-W520:~/sources/angular$ cat modules/tsconfig.json
{
    "compilerOptions": {
        "declaration": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "mapRoot": "",
        "module": "commonjs",
        "noEmitOnError": true,
        "outDir": "../dist/js/cjs",
        "rootDir": ".",
        "sourceMap": true,
        "sourceRoot": ".",
        "target": "es5"
    }
}
v2m@v2m-ThinkPad-W520:~/sources/angular$ ./node_modules/.bin/tsc -p modules --diagnostics
Files:             592
Lines:          100233
Nodes:          460296
Identifiers:    150153
Symbols:         73743
Types:           44161
Memory used:   225155K
I/O read:        0.13s
I/O write:       0.15s
Parse time:      1.30s
Bind time:       0.59s
Check time:      2.73s
Emit time:       1.77s
Total time:      6.39s
v2m@v2m-ThinkPad-W520:~/sources/angular$ cp modules/tsconfig.json-es6 modules/tsconfig.json
v2m@v2m-ThinkPad-W520:~/sources/angular$ rm modules/angular2/traceur-runtime.d.ts modules/angular2/typings/es6-promise/es6-promise.d.ts modules/angular2/typings/tsd.d.ts
v2m@v2m-ThinkPad-W520:~/sources/angular$ cat modules/tsconfig.json
{
    "compilerOptions": {
        "declaration": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "mapRoot": "",
        "noEmitOnError": true,
        "outDir": "../dist/js/dev/es6",
        "rootDir": ".",
        "sourceMap": true,
        "sourceRoot": ".",
        "target": "es6"
    }
}
v2m@v2m-ThinkPad-W520:~/sources/angular$ ./node_modules/.bin/tsc -p modules --diagnostics
Files:             589
Lines:          101437
Nodes:          462802
Identifiers:    151079
Symbols:         74396
Types:           67243
Memory used:   251728K
I/O read:        0.17s
I/O write:       0.15s
Parse time:      1.29s
Bind time:       0.61s
Check time:      3.34s
Emit time:       1.49s
Total time:      6.74s

I'll check the behavior on Windows box tomorrow, meanwhile can you please try to re-run the compiler for both ES5 and ES6  with --diagnostics key to see where we spent most of the time?

Ok, I guess I can see the problem. What version of Node do you use?

To elaborate, we've noticed before that the same version of typescript compiler shows better performance on older versions of node and performance goes down on more recent versions. I.e timings from my previous post are made using node v0.10.35 (v8 version 3.14.5.9). If I switch to node v.12.7 (v8 version 3.28.71.19) then timings become almost the same as yours (~11s and ~22s).

I've tried to install iojs-v3.0.0 (v8 version 4.4.63.26) from nvm and it seems to improve the situation. Compilation times for both ES6 and ES5 dropped to ~8s

Interesting! I'm on node v0.12.2. We can't use v0.10 because of some npm issues. We've also had problems with iojs in the past but I haven't tried v3.0.0 yet.

FYI: this is V8 issue that was filed back in Jan 2015 a to track these perf regressions: https://code.google.com/p/v8/issues/detail?id=3817

https://code.google.com/p/v8/issues/detail?id=3842 was created at roughly the same time, (found here) and reported perf regressions in escodegen. I can't imagine we're that different from their use case in terms of perf profile.

authors: IgorMinar vladima weswigham


text:
No referencing/intellisense fo nested properties/functions within class

I have the following structure where I have a class that contains functions nested inside properties and vice versa. Intellisense and therefore referencing is not working when inside a function that resides inside a property of the class. Is there a way to solve this sort of issue so that I can reference myThirdProp inside mySecondFunc?
export class a {

    myProperty = 'hello';
    myFunc() {

        this.myProperty; //referencing and intellisense available
    }

    mySecondProp: Object = {

        myThirdProp: 'hello2',
        mySecondFunc() {

            this. //no intellisense/reference here
        }
    }
}

Currently, we don't really know how mySecondProp.mySecondFunc is going to be invoked, so its this type is any. #6739 should solve this for you by allowing you to specify the type of this inside mySecondFunc.

this inside of an object literal now has Intellisense. @zalow517 can you try typescript@next? It will be available April 8, after the nightly build picks it up.

#8389 reverts this fix for now.

Cross positing from https://github.com/Microsoft/TypeScript/issues/8110#issuecomment-215988532
We have tried different ways of addressing this issue, and the current behavior (this in an object literal is of type any) seems to be the most reasonable.
Classes present stronger assumptions about how the functions will be called. object literals on the other hand can be used as a property bag often with no assumptions about the relationship of the methods and properties on them. we have seen common JS patterns where methods are added, removed, or called with a different this target at runtime (see #8133 for an example).
the recommendation is to specify an explicit this type in methods:
interface FooBar {
    foo(): void;
    bar(): void;
}

let o = {
    foo: function (this: FooBar) { this /* FooBar */ },
    bar(this: FooBar) { this /* FooBar */ }
}

See #14141.

authors: RyanCavanaugh ahejlsberg mhegazy sandersn zalow517


text:
Fix get symbol at location to behave correctly for parameter assignments and jsx attributes

Fixes #19041
The corrected type baselines have exposed another bug - note all the literal types in TSX files (opened #20705 to track it).

@sandersn Have I addressed all of your comments?


text:
Fix iterated type in for-await-of

Fixes the type we return in getIteratedTypeOfIterable for for..await..of. and yield* when the expression is an Iterable<Promise<T>>.
Fixes #24570

@RyanCavanaugh: should I go ahead merge this into release-3.1 and create another PR to add this to master?

This change is postponed to 3.2, you can find the PR against master here: #27271


text:
Feed the 'this' type as a type argument to constraints during relation checking

Fixes #7276.
@ahejlsberg @sandersn @RyanCavanaugh can you take a look?
Right now, the types are being instantiated with their target. Is this sufficient?

:+1:

@DanielRosenwasser can you update the PR and respond to the remaining comments.

authors: DanielRosenwasser mhegazy sandersn


text:
[Mac question] Why fork/execve and not System.Diagnostics.Process.Start?

I'm working on the Linux platform code (which we've based on the Mac code), and noticed GVFS.Platform.Mac.ProcessLauncher uses fork and execve directly:
https://github.com/Microsoft/VFSForGit/blob/36124b14ce9c1dd41e9a3222adbcc76fb9d348d4/GVFS/GVFS.Platform.Mac/ProcessLauncher.cs#L32-L35
https://github.com/Microsoft/VFSForGit/blob/36124b14ce9c1dd41e9a3222adbcc76fb9d348d4/GVFS/GVFS.Platform.Mac/ProcessLauncher.cs#L88-L91
While pondering a switch to use Mono.Posix.NETStandard, I noticed they refuse to expose fork:
#if false
		// fork(2)
		//    pid_t fork(void);
		[DllImport (LIBC, SetLastError=true)]
		[Obsolete ("DO NOT directly call fork(2); it bypasses essential " +
				"shutdown code.\nUse System.Diagnostics.Process instead")]
		private static extern int fork ();

		// vfork(2)
		//    pid_t vfork(void);
		[DllImport (LIBC, SetLastError=true)]
		[Obsolete ("DO NOT directly call vfork(2); it bypasses essential " +
				"shutdown code.\nUse System.Diagnostics.Process instead")]
		private static extern int vfork ();
#endif

Maybe that's Mono-specific, I don't know. Is there a reason we use fork here and not something from .NET?
(cc @chrisd8088 fyi)

@wilbaker I think you have context on the decision to use Fork(), can you help answer @kivikakk ?

@kivikakk @jrbriggs we actually used to use Process.Start fom .NET Core for launching our background process, but we ran into the following issues:

The background process's console output would be written to the parent process's terminal (i.e. you'd see the console output of GVFS.Mount written to the terminal where gvfs mount was called)
We could not break the connection to the parent process which lead to odd process lifetime issues (there are a few discussions on using setsid on stack overflow to address this, one example here: https://unix.stackexchange.com/questions/240646/why-we-use-setsid-while-daemonizing-a-process)

Calling fork + setsid appeared to be the best (only?) way to daemonize our background process and address the second point above.

Is there a reason we use fork here and not something from .NET?

I think it's worth noting that .NET Core internally implements Process.Start using fork, and so we're not inconsistent when it comes which native API is being used to launch a background process:
Process.Start calls StartCore
https://github.com/dotnet/corefx/blob/7817a109400b5b22c02ae6667706cda8a7f3d168/src/System.Diagnostics.Process/src/System/Diagnostics/Process.cs#L1217
Process.Unix.StartCore calls ForkAndExecProcess
https://github.com/dotnet/corefx/blob/b10e8d67b260e26f2e47750cf96669e6f48e774d/src/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs#L393
Interop.ForkAndExecProcess calls SystemNative_ForkAndExecProcess
https://github.com/dotnet/corefx/blob/b10e8d67b260e26f2e47750cf96669e6f48e774d/src/Common/src/Interop/Unix/System.Native/Interop.ForkAndExecProcess.cs#L29
SystemNative_ForkAndExecProcess calls fork
https://github.com/dotnet/corefx/blob/b10e8d67b260e26f2e47750cf96669e6f48e774d/src/Native/Unix/System.Native/pal_process.c#L344

Nice, thank you so much for the detailed breakdown! It would seem the issues with fork are specific to Mono. (for reference, a mailing list thread where they discuss why it's commented out.)

authors: jrbriggs kivikakk wilbaker

repo: Microsoft/VFSForGit


text:
Copy sample preserving history and repo here

#159 sqlexpress sample

Closing issue due to lack of activity.

authors: kallie-b scooley

repo: Microsoft/Virtualization-Documentation


text:
Can't launch distros in SD cards

One of my users of the LxRunOffline project reported that he got 0x80070057 error when launching distros that are installed to an SD card and I guess it also applies to distros installed by WslRegisterDistribution.

logs.zip

SD cards do not support stable GUIDs, which we require for the root filesystem. Installing to an SD card is not currently a supported scenario.

Why does LxCore Driver need a "stable" GUID of that installation volume? mountvol command can show the GUID of that SD card. Will there be any difference between external SD card reader and in-built SD card slot?

Why does LxCore Driver need a "stable" GUID

#449 (message). Nipping to keep discussion in one place.

@therealkenc In my opinion, this issue isn't related with #449. Moving WSL installation is already supported but in a special way. Hold tight, programming idea ahead!
Look carefully how wslconfig /upgrade command works (cough). It completely MOVES the Linux folders from rootfs to wslfs directory. So what does it do? The strings, rootfs and wslfs, are stored as struct _UNICODE_STRING which are passed to struct _OBJECT_ATTRIBUTES.ObjectName member. Then these ObjectAttributes variables are passed to NtCreateFile() or NtOpenFile().
Both of the cases the OBJECT_ATTRIBUTES.RootHandle (comes from CreateFile()) are same. So my assumption is that, if someone change the base path or RootHandle (where WSL installed) then WSL installation can easily be moved.
Hence #449 is a user mode issue and this is a kernel mode issue (where LxCore wants stable GUID).

authors: Biswa96 DDoSolitary benhillis therealkenc

repo: Microsoft/WSL


text:
Bond causes SIGBUS whenever a double is serialized from Java to c++

Hi Folks,
I am working on a CloudDataSet Wrapper to serialize Java primitives to C++. All data types work except for doubles. When a CloudDataSet is given to cpp\inc\bond\core\bond.h containing any double or double array then a SIGBUS is hit inside cpp\inc\bond\stream\output_buffer.h's write function
void Write(const T& value)
    {
        //
        // Performance tweak: for small types don't go into generic Write(),
        // which results in call to memcpy() and additional memory access.
        // The direct copy of the value (which is likely on register already)
        // is faster.
        //
        if (sizeof(T) + _rangeSize + _rangeOffset <= _bufferSize)
        {
            *reinterpret_cast<T*>(_rangePtr + _rangeSize) = value; <--------HERE---------
            _rangeSize += sizeof(T);
        }
        else
        {
            Write(&value, sizeof(value));
        }
    }

This appears to be a bug inside the bond serialize code.
The local values are
this = {bond::OutputMemoryStream<std::allocator<char> > *const | 0xbe9953c0} 0xbe9953c0
 _allocator = {std::allocator<char>}
 _buffer = {boost::shared_ptr<char []>}
 _bufferSize = {uint32_t} 4096
 _rangeSize = {uint32_t} 234
 _rangeOffset = {uint32_t} 0
 _minChainningSize = {uint32_t} 32
 _maxChainLength = {uint32_t} 4294967295
 _rangePtr = {char * | 0xb2b60814} "-\x12\n\x04\fC"
 _blobs = {std::vector<bond::blob>} std::vector of length 0, capacity 0
value = {const double &const} 1.2344999999999999

Attached is the callstack and last frame hit in Android Studio. Let me know if this is a known issue or not.
Thanks,
Andrew

This looks like https://github.com/Microsoft/bond/issues/305, which I attempted to fix in version 5.3.0 (commit https://github.com/Microsoft/bond/commit/04ad85fe75a72c70068fce9e07e0cb07379c8b0a). The screenshot and code snippet appear to be from an earlier version than 5.3.0. Can you try with the current version, 5.3.1, and let us know if you still have the problem?

Build 5.3.1 and that fixed the issue! Thanks.

repo: Microsoft/bond


text:
Adaptive Cards for Web Chat

I've tried implementing Adaptive Cards based on this. I could see that Activity supports attachments parameter and accepts inputs as shown in the above link to implement Adaptive Cards. I could not understand the contentUrl though. I've filled in the remaining fields and tried this. i'm encountering the below issue.
My Activity
Activity(
        type=ActivityTypes.message,
        channel_id=request_activity.channel_id,
        conversation=request_activity.conversation,
        recipient=request_activity.from_property,
        from_property=request_activity.recipient,
        text=text,
        service_url=request_activity.service_url,
        attachments=Attachment(
            content_type="application/vnd.microsoft.card.adaptive",
            content={
                "type": "AdaptiveCard",
                "version": "1.0",
                "body": [
                    {
                    "type": "TextBlock",
                    "text": "Hello World!",
                    "size": "large"},
                    {
                    "type": "TextBlock",
                    "text": "*Sincerely yours,*"},
                    {
                    "type": "TextBlock",
                    "text": "Adaptive Cards",
                    "separation": "none"}],
                    "actions": [
                    {
                        "type": "Action.OpenUrl",
                        "url": "http://adaptivecards.io",
                        "title": "Learn More"
                    }
                    ]}),)

Error Log

ERROR:root:Error is:
Traceback (most recent call last):
File "D:\home\site\wwwroot\main.py", line 150, in messages
app.connector.conversations.send_to_conversation(activity['conversation']['id'], response_activity)
File "D:\home\python364x64\lib\site-packages\botframework\connector\operations\conversations_operations.py", line 224, in send_to_conversation
body_content = self._serialize.body(activity, 'Activity')
File "D:\home\python364x64\lib\site-packages\msrest\serialization.py", line 473, in body
errors = _recursive_validate(data_type, data_type, data)
File "D:\home\python364x64\lib\site-packages\msrest\serialization.py", line 124, in _recursive_validate
return data.validate()
File "D:\home\python364x64\lib\site-packages\msrest\serialization.py", line 184, in validate
validation_result += _recursive_validate(attr_name, attr_type, value)
File "D:\home\python364x64\lib\site-packages\msrest\serialization.py", line 116, in _recursive_validate
for content in data:
TypeError: 'Attachment' object is not iterable

My target is to have a card with a button. I've already implemented the SuggestedActions with buttons, but I need the button to be always available just in case the user wants to visit the link again. Is there any issue with the way I implemented this? Any samples towards this will be helpful.

I should've googled better. @stevengum97 has already provided some guidance here

repo: Microsoft/botbuilder-python


text:
AZ CLI: Add support to create V4 bots

There is no way to create a new V4 bot using AZ CLI. We should add that a capability that by default uses the current stable sdk version and add an option to get the latest (preview) SDK version

@vishwacsena This is on its way to be deployed!

Once the official v4 packages are released, I will first update the azure cli extension (which we control and hence is easier to release to ,than the native cli). Then I will update the native cli when they have a release , mostly early next month.

repo: Microsoft/botbuilder-tools


text:
Stop script execution on failure.

Prevent scripts from executing furhter if something failed.

@aaron-schnieder I didn't rerun all scripts, but I tested it with a smaller script, trying couple of failures.

LGTM

authors: aaron-schnieder ivan-shaporov


text:
Make a nuget of ApiPort available

This would help with using it in automated builds.

Nice to have.

authors: conniey twsouthwick

repo: Microsoft/dotnet-apiport


text:
MSBuild is instantiating 52 MB of Contains delegates

Same scenario as: https://github.com/Microsoft/msbuild/issues/2265.
MSBuild is ~boxing~allocating 52 MB of Contains delegates:

\scratch2\scratch\asja\AddReference Perf ETL logs
Looks like all the allocations are coming from this call: https://github.com/Microsoft/msbuild/blob/master/src/Build/Collections/RetrievableEntryHashSet/HashSet.cs#L232.

Looked at the trace; this comes 100% from:
Type Microsoft.Build.Collections.Contains`1[System.String]
+ microsoft.build.ni!Microsoft.Build.Collections.RetrievableEntryHashSet`1[System.__Canon].get_Keys()
+ microsoft.build.ni!Microsoft.Build.Collections.PropertyDictionary`1[System.__Canon].get_PropertyNames()
+ microsoft.build.ni!Microsoft.Build.Collections.PropertyDictionary`1[System.__Canon].System.Collections.Generic.IDictionary.ContainsKey(System.String)
+ microsoft.build.ni!Microsoft.Build.Evaluation.Evaluator`4[System.__Canon,System.__Canon,System.__Canon,System.__Canon].EvaluatePropertyElement(Microsoft.Build.Construction.ProjectPropertyElement)
+ microsoft.build.ni!Microsoft.Build.Evaluation.Evaluator`4[System.__Canon,System.__Canon,System.__Canon,System.__Canon].EvaluatePropertyGroupElement(Microsoft.Build.Construction.ProjectPropertyGroupElement)

That looks entirely avoidable. Will send a PR after I clean it up.

thanks!

authors: davkean rainersigwald

repo: Microsoft/msbuild


text:
NuGet restore command on .NET Core which supports contentFiles

Right now we are using NuGet.exe which runs on the full framework for Windows, and dnu on Linux since we've had reliability issues running NuGet on Mono (@ValMenn correct me if I'm wrong).
We are going to take advantage of NuGet's new contentFiles support.  So we will either need an updated version of dnu with this functionality, or a way to run the NuGet restore command on .NET Core.

We will probably use the .NET CLI for this.  It still needs to be updated to support contentFiles in NuGet packages.


text:
image won't run on Mac since docker updated to Docker Community Edition

Since I updated my docker to Docker Community Edition, the microsoft/mssql-server-linux image will not start.  I've tried removing all my images and repulling, but no dice.  I'll do a
$ (sudo) docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=somelegitpasswordthatworked before' -p 1433:1433 -d microsoft/mssql-server-linux
It returns an ID, but when you immediately run "docker ps", there are no running images and you (obviously) can't connect to it.
My docker version (I'm on a Mac, btw):
Version 17.03.0-ce-mac2 (15657)
Channel: beta
32de842512
Thanks,
Seth

Hi @sethdarr - can you please check to make sure that you have 4GB+ of RAM allocated to Docker in the preferences?  If that doesnt sort it out, please remove the -d so that the container will output the log to the terminal and see if there is something there.

Bah!  That was the problem, all was fine after I allocated 4GB of RAM.  Live and learn.  Thanks!

Ha, great.  I've "learned" that lesson about 4 times now.  LOL

authors: sethdarr twright-msft

repo: Microsoft/mssql-docker


text:
Update CHANGELOG for next release

Fix v0.4.1 link in CHANGELOG since the links were never updated.
Bump master to next pre-release, v0.6.0, per the releasing documentation, since v0.5.x has branched, we need to immediately bump master to the next pre-release, and bump the CHANGELOG headers with a new Unreleased section.

This should be the first commit (well, pair of commits, but that's because we made a mistake with v0.4.1) to master before v0.6.0 changes go in.

Closing for #1687.

repo: Microsoft/openenclave


text:
allow int16, uint8 etc on record fields

Right now these types only work on global variables.
Also update the langauge.md document when done.

Won't fix for now.

authors: abchatra mmoskal

repo: Microsoft/pxt


text:
Publish a gist under a user account using a github TOKEN.

Publish a gist under a user using a github TOKEN.
Saving current gist in pxt.json
cli options to force create a new gist, and publishing a public gist (default to secret).
Create an anonymous gist
pxt gist

Create an gist under a user account
pxt gist --token TOKEN

Create a new gist (if preexisting)
pxt gist --new

*Create a public gist (instead of secret)
pxt gist --public

valid example: pxt gist --token TOKEN --new --public

Yes stripping out sounds good.
Get Outlook for iOShttps://aka.ms/o0ukef

From: Sam El-Husseini notifications@github.com
Sent: Wednesday, November 23, 2016 10:45:39 AM
To: Microsoft/pxt
Cc: Peli de Halleux; Assign
Subject: Re: [Microsoft/pxt] Publish a gist under a user account using a github TOKEN. (#801)
@microsoftsam commented on this pull request.

In cli/cli.tshttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fpxt%2Fpull%2F801&data=02|01|jhalleux%40microsoft.com|a81f1a8e2dc54403bfd108d413d0ec8c|72f988bf86f141af91ab2d7cd011db47|1|0|636155235422129157&sdata=P4WR6mcB77r87P1BF3Vg1HAl%2BJ%2B0tAEFWFbp25wEmxU%3D&reserved=0:

         console.log(`You can load your published project at ${pxt.appTarget.appTheme.homeUrl}#pub:gh/gists/${published_id}`)

       // Save gist id to pxt.json

       mainPkg.config.gistId = published_id;

The gist id, should only be a local pxt thing. Whenever we publish to gist, I don't think we should send in the gistId.
If we make sure to strip those out, then any fork has no attached gist id.

You are receiving this because you were assigned.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fpxt%2Fpull%2F801&data=02|01|jhalleux%40microsoft.com|a81f1a8e2dc54403bfd108d413d0ec8c|72f988bf86f141af91ab2d7cd011db47|1|0|636155235422129157&sdata=P4WR6mcB77r87P1BF3Vg1HAl%2BJ%2B0tAEFWFbp25wEmxU%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD-4KYFmW67M7DlRnycv4bLTBkyTbHfOks5rBInTgaJpZM4K6GdD&data=02|01|jhalleux%40microsoft.com|a81f1a8e2dc54403bfd108d413d0ec8c|72f988bf86f141af91ab2d7cd011db47|1|0|636155235422129157&sdata=0QpUct7JMDed4xdAA51LLPvxEhFm8Dy5PIlgWkwYMnA%3D&reserved=0.

Are we happy with this?

authors: microsoftsam pelikhan


text:
aio write imcompletely bug

core dump:
F10:16:40.459 (1480990600459595051 156a) replica.io-thrd.05482: assertion expression: size >= this_size
F10:16:40.459 (1480990600459612035 156a) replica.io-thrd.05482: written buffer size does not equal to input buffer's size: 5256 vs 11448

source code:
aio_task* disk_file::on_write_completed(aio_task* wk, void* ctx, error_code err, size_t size)
{
    auto ret = _write_queue.on_work_completed(wk, ctx);

    while (wk)
    {
        aio_task* next = (aio_task*)wk->next;
        wk->next = nullptr;

        if (err == ERR_OK)
        {
            size_t this_size = (size_t)wk->aio()->buffer_size;
            dassert(size >= this_size,
                "written buffer size does not equal to input buffer's size: %d vs %d",
                (int)size,
                (int)this_size
                );

            wk->enqueue(err, this_size);
            size -= this_size;
        }

Thanks, Zuoyan. This is a serious bug. I'll look into it to see any clues.

@imzhenyu , the core reason is that the SSD is full....

then why err == ERR_OK? If SSD is full, should not we have errors returned?

authors: imzhenyu qinzuoyan

repo: Microsoft/rDSN