text:
Is there any guide/readme file to understand UNet Sharing example?

Overview
Currently i want to use UNet Sharing to share world anchor between hololens. But i can't what exactly understand if the example shares anchor automatically or any step is required. It would be great to have a read me file for each example. If already such a file exists, please guide me to right place.
Expected Behavior
Actual Behavior
Steps to reproduce
(Links to sample github project preferred)
Unity Editor Version
Mixed Reality Toolkit Release Version

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

source: gharchive/issue

repo: Microsoft/MixedRealityToolkit-Unity

license: MIT

license_type: permissive

license_source: github-api


text:
[vNext] DragAndDropHandler moves with head

Describe the bug
The object is moving with the head movement Not hand movement.
Symptom shows on both HoloLens & immersive headset.
To Reproduce

Create an object.
Assign 'DragAndDropHandler.cs' script onto it.
Build & Deploy.
Grab with Airtap, hold and move.

Expected behavior
The object should move with hand movement.
Actual behavior
The object does not move with hand movement.
The object is moving with HEAD(gaze cursor) movement.
Unity Editor Version
2018.1.9f1
Mixed Reality Toolkit Release Version
mrtk_development

Found the symptom on immersive headset too. Objects move with headset movement.
Multiple objects are moving together instead of focused one. 'Focus Enabled' check box does not solve the issue.

Likely this needs to be updated to utilize the gesture handler.

@StephenHodgson In DragAndDropHandler.cs currently, currentPointer.TryGetPointerPosition(out inputPosition) in HoloLens gives us headset position, not the hand postion.
FYI, in HTK, we were able to access hand position using TryGetGripPosition. What is the corresponding method for this? We have same issue on TwoHandManipulation script too.
                case InteractionSourceInfo.Hand:
                    currentInputSource.**TryGetGripPosition**(currentInputSourceId, out inputPosition);
                    break;
                case InteractionSourceInfo.Controller:
                    currentInputSource.TryGetPointerPosition(currentInputSourceId, out inputPosition);
                    break;

Yes, it's because the script needs to be updated to use the gesture handler.

@StephenHodgson With IMixedRealityGestureHandler, how can we get hand grab position?

@StephenHodgson That would be really helpful for the HoloLens developers, understanding how to migrate to vNext! Thank you!

@StephenHodgson, if you can demonstrate this update, it would be helpful for updating Two Hand Manipulations too. Thanks!

Sure thing

Two handed manipulation may need to use the hand position instead of gestures, since I don't believe the gesture recognizer supports more than one hand at a time.
On that note, it might be better to fix the DragAndDropHandler with hand position as well, since gestures don't have implementations on all supported platforms. It could be designed to support both though.

Sorry, I was confused. Yeah we probably don't need gestures.
The input action to listen for will need to be the grip position, not the pointer position.

I bet if you updated the drag and drop handler to use the grip pose action it'll work

@StephenHodgson changing the action in the inspector of DragAndDropHandler to grip pose didn't work..

Looks like the underlying cause here is that the gaze pointer passes its input source along to the pointer down/up events instead of the input source that performed the action. Still investigating, but might need a breaking change here to add support for more RaisePointer[*] calls on the input system to take in an explicit input source.

@keveleigh Yes, on select gesture, it returns the source of the pointer which is head, instead of the grab point.

Fixed via #3294

authors: StephenHodgson cre8ivepark keveleigh


text:
NuGet package install support

C# like installing of nuget packages

We tried to get this once before and nuget rejected our pull request. It may be time to try again.

@JaggerJo can you tell us more about your scenario? What Python environment are you using (CPython, IronPython) and what type of packages would you like to install from NuGet?
While we have our own ideas on why NuGet would be useful, having real customer scenarios that we can point to is valuable when discussing with NuGet team.

@huguesv
IronPython
I am using IronPython [v2.7.5.0] with the current Python Tools for VS
Usecase
I want to install NuGet packages => download the dlls and reference them in IronPython (For Example Nancy (HTTP Webserver))

@zooba
Yes, PIP support for normal Python is great, but for IronPython the equivalent in NuGet..

Pythonnet will also benefit from nuget packages:
https://github.com/pythonnet/pythonnet/issues/165

pythonnet now supports nuget:
https://www.nuget.org/packages/pythonnet/2.3.0-py27-dotnet
https://www.nuget.org/packages/pythonnet/2.3.0-py35-dotnet
https://www.nuget.org/packages/pythonnet_py27_dotnet/
https://www.nuget.org/packages/pythonnet_py35_dotnet/

Is there any plans to develop this?
As a concrete example of my usage, I want to download a plotting library (in particular, https://lvcharts.net/) from NuGet for use in my IronPython + WPF application.

authors: JaggerJo VinayGupta23 denfromufa huguesv zooba

repo: Microsoft/PTVS


text:
Cannot load Q# language extension

I downloaded the version 0.3.1811.203 and installed it.
I created a Q# project but I  get the following message:
There was an error activating the remote language server, Q# Language Extension. For more details, please run devenv /log and examine ....\ActivityLog.xml file.
I ran it and I found a problem  related to Q# language extension
_
ERROR System.SystemException: The trust relationship between the primary domain and the trusted domain failed. at System.Security.Principal.NTAccount.TranslateToSids(IdentityReferenceCollection sourceAccounts, Boolean& someFailed) at System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean& someFailed) at System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess) at System.Security.Principal.NTAccount.Translate(Type targetType) at System.Security.AccessControl.CommonObjectSecurity.ModifyAccess(AccessControlModification modification, AccessRule rule, Boolean& modified) at System.Security.AccessControl.CommonObjectSecurity.AddAccessRule(AccessRule rule) at System.IO.Pipes.PipeSecurity.AddAccessRule(PipeAccessRule rule) at Microsoft.Quantum.QsLanguageExtensionVS.QsLanguageClient.d__24.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.RemoteLanguageClientInstance.d__49.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Threading.ThreadingTools.d__12.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.RemoteLanguageClientInstance.d__47.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
_
I am using Visual Studio 2017 enterprise 15.9
I uninstalled VS, cleaned up the registry and installed again.
The issue is still there.
I have no intellisense/tooltips and *.qs are not recognized as Q# code, no fileicons...

Would you mind downloading the newest version and checking if the issue still persists? I believe this was a language setting related bug that should be fixed.

@bettinaheim  Thanks for writing back. This issue can be closed as it was resolved with a version that was released in November last year. (0.3.1811.1501)
https://stackoverflow.com/questions/53317490/cannot-load-q-language-extension

Great, yes, I thought so. Sorry it took a while to get back to you - we are trying to keep on top of things but could definitively use a hand or two!

authors: bettinaheim blfuentes

repo: Microsoft/Quantum


text:
[EN DatetimeV2] Fix compound duration timex

Cases like "PT1HT30M" should be "PT1H30M"
Example sentence: "The accidents last for 1 hour and 30 minutes"

When address this, we should make sure DataTypes.TimexExpression can parse all timex expressions in specs.

@guom08, hasn't this been fixed recently?
Next time, please add example input sentences that cause the issue in the description, to make it easier to test if it was fixed or not.
Thanks.

Can we re-open?
I think this is not working as expected. Quickly wrote a test for my case and resolution returned 0 value.
        [TestMethod]
        public void DataTypes_Resolver_Duration_1hour30minutes()
        {
            var resolution = TimexResolver.Resolve(new[] { "PT1H30M" });
            Assert.AreEqual(1, resolution.Values.Count);

            Assert.AreEqual("PT1H30M", resolution.Values[0].Timex);
            Assert.AreEqual("duration", resolution.Values[0].Type);
            Assert.AreEqual("5400", resolution.Values[0].Value);
            Assert.IsNull(resolution.Values[0].Start);
            Assert.IsNull(resolution.Values[0].End);
        }

authors: guom08 sebastianzolg tellarin

repo: Microsoft/Recognizers-Text


text:
Mark Element.setAttribute's parameters as required

This fixes Microsoft/TypeScript#4407, which was reported as being an error on HTMLElement. The actual error was with Element.

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

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

@LPGhatguy, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.
Thanks, MSBOT;

:+1: LGTM. Thanks @LPGhatguy !

source: gharchive/pull-request

authors: LPGhatguy msftclas zhengbli

repo: Microsoft/TSJS-lib-generator


text:
Update HTMLCollection and Add HTMLCollectionOf

First PR for Microsoft/TypeScript#424

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

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

@FranklinWhale, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.
Thanks, MSBOT;

:+1:

Thanks. LGTM.

authors: FranklinWhale mhegazy msftclas


text:
Tuple types

Possibly lumped with spread

https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/Basic Types.md#tuple

repo: Microsoft/TypeScript-Handbook

license_source: bigquery


text:
Mention build version for signature popup

Re: https://github.com/Microsoft/TypeScript-Sublime-Plugin/issues/279#issuecomment-124083731
Again, the reason for this change is that it's kind of tough to know what to search the text for, but it's easier to see visually what feature the signature popup is. So if you're like me, and you come here wondering why the completion/intellisense/popup/tooltip/type info/etc isn't working, you don't have to spend 20 minutes trying to figure out what it was named.
Hopefully that reason makes sense. If the wording of the change should be different, let me know.

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

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, MSBOT;

Thank you. This is useful.

authors: hoanhtien joneshf msftclas

repo: Microsoft/TypeScript-Sublime-Plugin


text:
tsserver should implement the Language Server Protocol

As the language server protocol ( https://github.com/Microsoft/language-server-protocol ) is getting more and more popularity and clients ( https://github.com/Microsoft/language-server-protocol/wiki/Protocol-Implementations ), it would be very useful to have the tsserver implement this protocol.

Been 2 monthts, any updates?

We did some work at Sourcegraph in wrapping the TS language service as a language server, but hit some limitations with the current API. Specifically, the LanguageServiceHost interface you can provide to the server requires the  methods that return file contents to return synchronously. In a language server however this is most likely done asynchronously because retrieving the file content involves IO with the file system or over the protocol stream.
I would be very interested in help or improvements in the TS server to solve this use case.

@felixfbecker Would it be possible to overcome the limitations if you interfaced with an instance of tsserver instead?

@masaeedu I don't understand the question - the TS language server is using the LanguageService from TypeScript?

@felixfbecker Sorry, I'll try to clarify what I mean. Instead of implementing LanguageServiceHost, you could let tsserver host the language service, and you wouldn't need to care about how it satisfies that interface. Your language server process would rely on passing messages to/from tsserver, which is inherently async.

@masaeedu wouldn't the tsserver try to read from the file system directly?

@felixfbecker Yeah, it would read the files directly. I don't think that would affect your language server process in any way though.

@masaeedu That is a dealbreaker unfortunately, because the files are not available locally in the container.

I have implemented the initial version of language server protocol for typescript which can be found at https://github.com/prabirshrestha/typescript-language-server. It acts as a proxy for tsserver. Currently textDocument/didOpen, textDocument/change and textDocument/completion are implemented but adding others should be fairly easy.
In the long term I would definitely love to see LSP shipping as part of the official typescript installation.

Here is another LSP implementation of Typescript based on my original tsserver proxy idea. https://github.com/theia-ide/typescript-language-server. They have added more protocol feature support. It is maintained by folks at TypeFox. I have also handed over the typescript-language-server npm package to them.

https://github.com/Microsoft/TypeScript/wiki/Roadmap#30-july-2018
I saw the roadmap. next version up is major version up! 🥂
do you have any plans about this issue?

6 months from the time last comment was written. Any updates on this?

You can use https://github.com/theia-ide/typescript-language-server which more or less does the work of wrapping tsserver messages as LSP ones.
I'm closing this issue as I'm satisfied with https://github.com/theia-ide/typescript-language-server and wouldn't -as a consumer- get.any clear added-value if this were implemented directly in tsserver.

I am using https://github.com/theia-ide/typescript-language-server too and it has lots of problems. Problems that I think wouldn't exist if the official server spoke LSP.

The library of theia-ide seems not bad, but as felixbecker said, indeed has problems, unfortunately. For instance it does not raise errors on unused variables when noUnusedLocals is enabled. And I have just started exploring it (fearing of other caveats).

Make sure those bugs are reported to typescript-language-server andthey'll
evntually be fixed.
--
Mickael Istria
Eclipse IDE https://www.eclipse.org/downloads/eclipse-packages/
developer, for Red Hat Developers https://developers.redhat.com/

One more anecdote is https://github.com/Microsoft/vscode/issues/70239
By not using LSP in tsserver, it means there are features that exist in vscode + tsserver that aren't yet possible to implement with LSP + vscode alone. This puts LSP implementations at a disadvantage compared to non-LSP implementations.

I'm also using https://github.com/theia-ide/typescript-language-server . But I found it's looking for maintainers. theia-ide/typescript-language-server#141 I think it shows we can't rely on it so long time.
Is it the time to reconsider this issue?

It would be great if typescript embraces LSP and make sure that features are available through it when they are added. That's VS Code uses tsserver directly without using LSP put all other tools to disadvantage. That's one of reasons for Theia to use VS Code extensions instead of trying to align https://github.com/theia-ide/typescript-language-server with VS Code extension each release.

Here is how LSP looks like:

And here is how LSP actually looks like:

This request means additional work for the TS team, and VSCode's tight integration with TSServer makes a subtle to hint to use another Microsoft product. But not doing it leaves influence on the table. There are many people that can't or won't use VSCode, but will use LSP. Neovim's upcoming LSP client for example.

So, what's the status of this?
There isn't any updated and maintained language server for JS / TS currently, as far I know

https://github.com/theia-ide/typescript-language-server is unmaintained
https://github.com/theia-ide/typescript-language-server/issues/141 nobody wants to maintain it

See #39459 which revives this issue in this new context.

authors: StevenTheEVILZ akosyakov anurbol felixfbecker marc2332 masaeedu mickaelistria mmktomato prabirshrestha predragnikolic saltdotac vicapow vvakame

repo: Microsoft/TypeScript


text:
Inconsistent Promise resolve signature

In TypeScript, await promise where promise: Promise<T> always returns T but resolve function accepts undefined. This may lead to subtle bug.
I hereby suggest to remove question mark (?) from resolve's parameter.

TypeScript Version:  2.9

Search Terms:
Code
async function test() {
    const promise = new Promise<number>(resolve => {
            resolve(undefined) // This should be forbidden, since undefined isn't number
    })

    const value: number = await promise // The promise resolves undefined but value is a number
}

Expected behavior: Error
Actual behavior: No errors
Playground Link:  link
Related Issues:

@rbuckton I assume this is here for a reason, can you explain?

Please see https://github.com/Microsoft/TypeScript/issues/22040

authors: KSXGitHub RyanCavanaugh mhegazy


text:
Support folder rename in getEditsForFileRename

Renaming a folder should cause a rename to all files in the project that are part of the folder.

@mhegazy Has this been pushed back from 2.9.2, or this bug tracking a different feature?

there are two parts, 1. changing the folder part of the a file name, that should be working in 2.9.2, but you are still expected to send a file name to the server, 2. sending a folder name directly to the server and the server changing all the files included (that is what this issue is tracking).

Ok. That makes sense. Thank you for the clarification
I'll make sure VS Code is ready for the 2.9.2 part of this

Fixed by #25052

authors: andy-ms mhegazy mjbvz


text:
string index signature inferring from symbol key

TypeScript Version:  3.0.1
Search Terms:
string index signature, symbol, inference
Code
// returns all the values in `obj` whose property keys are strings
declare function getStringPropValues<T>(obj: {[x: string]: T}): T[];

// A unique symbol used in objects below
const SYM = Symbol();

// v1 is number[] as expected
let v1 = getStringPropValues({ foo: 42, bar: 51 });

// v2 is (string | number)[] as expected
let v2 = getStringPropValues({ foo: 42, bar: 'hello' });

// v3 is (string | number)[]        <==== non-string key included in type inference
let v3 = getStringPropValues({ foo: 42, [SYM]: 'hello' });

// v4 is number[]                   <==== non-string key excluded from type constraint
let v4 = getStringPropValues<number>({ foo: 42, [SYM]: 'hello' });

Expected behavior:
v3 is number[], since the [SYM] key is not part of the string index signature.
Actual behavior:
v3 is (string | number)[], implying that the [SYM] key belongs to the string index signature.
v1, v2 and v4 all behave as I would expect. Note in v4 the type parameter is given explicitly, and the [SYM] key is correctly excluded from the type constraint since it is not part of the string index signature. But this seems inconsistent with the behaviour of v3 where it is treated as if is does belong to the string index signature.

Closing in favour of more obvious repro in #26257


text:
lib.d.ts has inconsistent line endings

this is caused by dom.generated.d.ts

It was caused by the last line. Fix soon

authors: mhegazy zhengbli


text:
Type parameters as constraints dosen't work for methods

PR https://github.com/Microsoft/TypeScript/pull/5949 implements F-bounded polymorphism. It doesn't seem to be working correctly for methods.
interface Table<T> {
  // For this method `T` is apparently a brand new type parameter.
  insert<T extends U, U>(obj: U): T;
  // insert(obj: any)
}

interface Foo {
  a: string;
  b: string;
}

let Foos: Table<Foo>;

// `foo1`'s type is inferred to be {a: 1}
let foo1 = Foos.insert({a: 1}) // => ;

// Should produce error
let foo2 = Foos.insert({c: 1});

This is by design. As you mention in your comment, your insert method introduces a new (and unused) type parameter called T that is constrained to extend U, but there is no constraint on U itself. I'm guessing you're trying to express that U must be a supertype of T. That's not currently possible, but there is some discussion of that issue in #6613.

authors: ahejlsberg hayeah


text:
strictNullChecks with control flow in multiple loops throws TypeError

TypeScript Version:
nightly (1.9.0-dev.20160502)
Code
function test() {
	let x: number | undefined;
	while (y()) {
		while (y()) {
			while (y()) {
				x = foo(x);
			}
		}
		x = 1;
	}
}
function y(): boolean {
	return true;
}
function foo(x: number): number { return 1; }

Expected behavior:
Compile error reported on foo(x), as x can be undefined on that location.
Actual behavior:
Type Error:
$ ./node_modules/.bin/tsc --strictNullChecks test
node_modules/typescript/lib/tsc.js:35204
                throw e;
                ^

TypeError: Cannot read property 'flags' of undefined
    at isConstEnumObjectType (node_modules/typescript/lib/tsc.js:21310:24)
    at checkExpression (node_modules/typescript/lib/tsc.js:21721:17)
    at checkExpressionWithContextualType (node_modules/typescript/lib/tsc.js:21669:26)
    at checkApplicableSignature (node_modules/typescript/lib/tsc.js:20309:31)
    at chooseOverload (node_modules/typescript/lib/tsc.js:20606:30)
    at resolveCall (node_modules/typescript/lib/tsc.js:20530:26)
    at resolveCallExpression (node_modules/typescript/lib/tsc.js:20669:20)
    at resolveSignature (node_modules/typescript/lib/tsc.js:20791:28)
    at getResolvedSignature (node_modules/typescript/lib/tsc.js:20808:26)
    at checkCallExpression (node_modules/typescript/lib/tsc.js:20824:29)

Good catch. Surprising we haven't caught this one already. An even simpler repro is:
function test() {
    let x: number | undefined;
    x = 1;
    while (y()) {
        while (y()) {
            x = foo(x);
        }
    }
}

Fix is pretty easy, I will have it up soon.

Thanks for the quick fix! This shows once again that the nightly build can be very useful to find bugs 😃

authors: ahejlsberg ivogabe


text:
Improve discriminated union error messages

Assignability errors for discriminated unions now check the value of the discriminant to decide which member of the union to check for assignability.
Previously, assignability didn't know about discriminated unions and would check every member, issuing errors for the last member of the union if assignability failed.
For example:
type Square = { kind: "sq", size: number }
type Rectangle = { kind: "rt", x: number, y: number }
type Circle = { kind: "cr", radius: number }
type Shape =
    | Square
    | Rectangle
    | Circle;
let shape: Shape = {
    kind: "sq",
    x: 12,
    y: 13,
}

typeRelatedToSomeType now checks whether each property in the source type is a discriminant. It finds kind and proceeds to look for the type in the target union that has kind: "sq". If it finds it, which it does in this example (Square), then it checks only assignbility to Square.
The result is that the error now says that property 'size' is missing in type { kind: "sq", x: number, y: number } instead of saying that that "sq" is not assignable to type "cr" like it did before.
Fixes #10867

@ahejlsberg do you mind taking a look too?


text:
Add opt-in user preference for prefix and suffix text on renames

Fixes #28679
This PR adds a user preference which, if not set, returns the rename behavior on shorthand properties and import/export specifiers to its state in 3.1.

@uniqueiniquity - I just tried this new feature for the first time (thank you so much for building it!) and I was surprised that renaming a property of a named, destructured export wouldn't rename the symbol when it's imported in another file. Is this expected?  I'll file a separate issue if not expected. Here's the repro:

Uncheck the "Rename Shorthand Properties" options for TS and JS
Create a new code file env.ts:

type ReadonlyAndNotUndefined<T> = {  readonly [P in keyof T]: string; }
export const {
  APP_NAME,
  MONGODB_CONNECTION_URI,
  SENDGRID_API_KEY,
  NOTIFICATION_URL_BASE,
  NOTIFICATION_FROM_EMAIL,
} = process.env as ReadonlyAndNotUndefined<typeof process.env>;

Create another file, use_env.ts :

import { NOTIFICATION_URL_BASE, SENDGRID_API_KEY, NOTIFICATION_FROM_EMAIL } from './env';

In env.ts, use rename symbol (F2) to change the name of NOTIFICATION_FROM_EMAIL

Expected: name is also changed in use_env.ts
Actual: no change to use_env.ts, and a compiler error :
Module '"src/libs/env"' has no exported member 'NOTIFICATION_FROM_EMAIL'. Did you mean 'NOTIFICATION_FROM_EMAIL_2'?

Note that if you export individual variables (not via destructuring export) the rename works fine, e.g.
export const foo = 'bar'; can be renamed to foo2 and the rename will propagate to imports in other files.

authors: justingrant uniqueiniquity


text:
Implements #4105 - a string indexer in 'props' disables errors due to surplus attributes

See #4105

:+1:

authors: RyanCavanaugh mhegazy


text:
Consider IEnumerable rather than TextFileCollection in IOdcmWriter interface

Hi there,
The current IOdcmWriter interface returns a TextFileCollection and the implementation of the mentioned class is empty.
If no behavior or implementation will be added into the TextFileCollection class, consider returning an IEnumerable<TextFile> instead.
The current design forces a call to the  AddRange method when working with IEnumerables just to return a collection.
https://github.com/Microsoft/Vipr/blob/master/test/CSharpWriterUnitTests/CodeGenTestBase.cs#L112
proxySources.AddRange(originalProxySources
            .Select(file => new TextFile(file.RelativePath, internalsHeader + file.Contents)));

As you can see, we could use the projection instead, without adding it into the proxySources TextFileCollection.
Thoughts?
Thanks!!

This type was originally a Dictionary<string, string>. When replacing that primitive with types that were easier to reason about [TextFile, TextFileCollection] we noticed two things:

The return type of GenerateProxy is used in many callsites across the solution
As the first few writers solidified, we expected some churn on the data that was to be returned

To avoid a repeat manual refactoring we therefore decided to introduce the TextFileCollection which we could grow and rename to meet the needs of writers as they matured.
@marcote, your team is the other primary contributor of writers at this time. Do you feel an IEnumerable is sufficient and we should remove the TextFileCollection abstraction? Will you not need non-text files to fully describe Java/Objective-C content?

@piotrpMSFT right now we have a proper implementation of the IOdcmWriter interface in our T4TemplateWriter, relying on the Vipr's FileWriter class for write to disk ops and works fine. We don't need (so far) anything extra to generate Java/Objective-C code but if that were the case, we could subclass the TextFile class and add what we need there.
I can create a PR with the refactor if interested. I'm pretty sure the code will be cleaner and worse case scenario, while working in the PR I can discover a blocking issue that prevents the refactor.

For cleanliness, can you create an abstract base class called OutputFile which has just the relative path, make TextFile a derived class of that one, and make the return value an IEnumerable? I think that deriving, say, ImageFile from TextFile will be pretty strange...
Thanks @marcote !

@marcote, can you assign to yourself?

@piotrpMSFT I can't assign myself. Otherwise I would do it.

Thank you guys!

authors: marcote piotrpMSFT

repo: Microsoft/Vipr

license: mit


text:
typo in the Enable nested virtualization script

there was a $ instead of a # when the script run will wine about it

Thanks for catching this.

authors: alefesta neilpeterson

repo: Microsoft/Virtualization-Documentation


text:
The positioning of an app using winappdriver is incorrect.

Repro Steps:

Open the calculator sample.
Add CalculatorSession.Manage().Window.Position = new System.Drawing.Point(0, 0) around L45 in CalculatorTestBase.cs (should be in the BaseSetup method).
Add System.Drawing.Point pos = CalculatorSession.Manage().Window.Position on the next line.
Set a breakpoint on the next code line after (3).
Run the win app driver.
Debug the addition test.
Check the window position (from (3) and physically).

Result:
the x is offset from (0, 0) by some small amount (we have found it to be 8-13px).
Expected:
The app is positioned correctly.
Impact:
This prevents us from using the position of the app to accurately calculate screen positioning while snapshotting apps for testing.

I've made a fix targeting the 8-13px offset in the window corner for v0.8

@miniksa is there a date for v0.8 yet?

Looks like it's out: https://github.com/Microsoft/WinAppDriver/releases/tag/v0.8-beta :)

@miniksa Haha, must have been just after I asked! Thanks~

repo: Microsoft/WinAppDriver


text:
Fix '#1544: Use-after-free AV possible in CAAnimation' - grab a strong…

… reference to self before clearing from _attachedLayer

This change is

:shipit:

:shipit:

This does solve the issue? Neat.

Yep; no repro with the fix.  Thanks again for the help!

In reply to: 267209718 [](ancestors = 267209718)

authors: DHowett-MSFT jaredhms yiyang-msft

repo: Microsoft/WinObjC


text:
Alarm & Reminder samples needed

Please provide samples on how to create Alarms and Reminders with Windows 10 API. Nothing can be found on the Internet.

Hi Justin,
Alarm and reminder can be created with toast notification framework in Windows 10.
Apologize that the official sample for Windows 10 notifications are not ready and up yet, but here are several links that can unblock you for now.
https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868254.aspx
https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868224.aspx
You need to use the link above to send toast notifications, but when constructing the notification xml payload, using the below payload to get the new alarm/reminder behaviors. The guidance of constructing payloads for new flexible and interactive toast notificaiton will also be published very soon.

Insert your title here
Insert content here

The comment area is trying to interpret the payload I typed in so I attached an image. Also please reach out for any questions or problems you run into.

Thanks @leixu2046 this will get me started.

repo: Microsoft/Windows-universal-samples


text:
Don't swallow [command] string in mock-toolrunner

Fixes #212

Not sure this is the right solution to the problem. If people ask for it to be silent shouldn't we be silent? :) Is there another way we can solve the issue?

Yeah, in retrospect I think that I agree. I'll close here and try to find a better solution going forward.

authors: damccorm stephenmichaelf

repo: Microsoft/azure-pipelines-task-lib


text:
Exception thrown when using Luis in Bot

I have a pretty simple Node JS bot that I have been working on. It works perfectly fine when only using RegEx Intents, but the minute that I put in some very simple LUIS code that is completely based on the LUIS sample, I get the following:
UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a
catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
BotFrameworkAdapter.processActivity(): 500 ERROR - Error: Resource not found
The message doesn't make any sense because I am using a catch blog in my luis calls. I cannot figure out what is causing the problem or if there is a problem with the current botbuilder-ai library.
This is a very simple example and i have tried using the code in the documentation as an example and the code from within the Luis sample in this repo with the same result. Can someone please let me know if I have found a bug because I will be starting on a customer project to do this next week.
Thanks,
Brian
Here is the exact code starting from the processActivity call:
adapter.processActivity(req, res, async context => {
const isMessage = context.activity.type === 'message';
if (isMessage) {
const state = conversationState.get(context);
const count = state.count === undefined ? state.count = 0 : ++state.count;
const message = context.activity.text;
        const dc = dialogs.createContext(context, state);
        await dc.continue();

        // Only want to determine intent for new messages, all others will be handled by the dialogs that they originated from
        if (!context.responded) {
            // Do a check for the Intent of the user based on the RegEx options first
            var intentCheck = await CheckRegExIntents(message);
            if (intentCheck != null && intentCheck == 'greeting')
            {
                // Add in a switch for multiple options and then Check for Luis Intent before sending the None Intent
                await dc.begin('greetings', message);
            }
            else {
                await model
                    .recognize(context)
                    .then(res => {
                        let topIntent = LuisRecognizer.topIntent(res);

                        if (topIntent === 'SearchPics')
                            context.sendActivity('You have reached the Search Dialog');
                        else if (topIntent === 'OrderPics')
                            context.sendActivity('You have reached the Order Dialog');
                        else if (topIntent === 'SharePic')
                            context.sendActivity('You have reached the Share Dialog');
                        else {
                            context.sendActivity(`Hi! I'm the Photo bot. Say something like "Hi" or "Hello" to get started.`);
                            context.sendActivity(`${count}: You said "${message}"`);
                        }
                    })
                    .catch(err => {
                        console.log(err);
                    });
            }
        }
    } else {
        // If the user has not sent a message, we want to echo back what type of event it is.
        return context.sendActivity(`[${context.activity.type} event detected]`);
    }
});

HI @brharr - Thanks for the submission.
It does seem odd that you're seeing a 500 with the text: "Resource not found" since this describes a 401 usually.
I can also confirm that Then endpoint in the example appears to be working
I can see in code that there are 2 possible problems:

botFrameworkAdapter.ts:391 swaps the error code back to a 500 and
botFrameworkAdapter.ts:393 is not caught.

To track down the point of failure, are you seeing the console output from this line? Additionally, can you set breakpoints at each then() block in the processActivity chain to see how far along this gets?

Justin,
I figured out the problem and it is not a bug in any of the code, but in the documentation. On the docs page discussing how to deploy LUIS within a bot, there is a reference that the newly create LuisRecognizer object needs to be added to the BotFrameworkAdapter through a use call, in other words adapter.use(LuisRecognizer) and that is what is throwing the error. I noticed in the Luis Bot example on Github, that call is not there. So I tried commenting it out and everything worked. So this documentation page needs to get fixed as soon as possible.
I do have access to make documentation changes, but I don’t know if this set is part of the main private repository. If you would like me to make the change, I certainly can, otherwise, I can put in a new issue to fix the documentation. Just let me know.
Thanks,
Brian
Brian C. Harrison | Cloud Solution Architect | Microsoft Azure, National CSU |  brharr@microsoft.commailto:brharr@microsoft.com | skype: brian.c.harrison | twitter: @briancharrisonhttps://twitter.com/briancharrison | Cloud Solution Architect Bloghttp://blogs.msdn.com/b/cloud_solution_architect/
[Microsoft]
From: Justin Wilaby [mailto:notifications@github.com]
Sent: Thursday, June 7, 2018 5:09 PM
To: Microsoft/botbuilder-js botbuilder-js@noreply.github.com
Cc: Brian Harrison brharr@microsoft.com; Mention mention@noreply.github.com
Subject: Re: [Microsoft/botbuilder-js] Exception thrown when using Luis in Bot (#274)
HI @brharrhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbrharr&data=02|01|brharr%40microsoft.com|6cb65bffecff4c9ad12608d5ccbaec36|72f988bf86f141af91ab2d7cd011db47|1|0|636640025556471542&sdata=3bpLgHiT5tTfPmn02TifmPrFrHrSxm8yzaps3ErM5Jo%3D&reserved=0 - Thanks for the submission.
It does seem odd that you're seeing a 500 with the text: "Resource not found" since this describes a 401 usually.
I can also confirm that Then endpoint in the examplehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwestus.api.cognitive.microsoft.com%2Fluis%2Fv2.0%2Fapps%2Fb34b5b00-c8b3-422e-93cd-17894667426d%3Fsubscription-key%3Ddc626873ccfd4e15b54bfef95a8012d9%26q%3Dhello&data=02|01|brharr%40microsoft.com|6cb65bffecff4c9ad12608d5ccbaec36|72f988bf86f141af91ab2d7cd011db47|1|0|636640025556481555&sdata=oMhnOiCFeQ%2F5lsuwdMLq%2BiuLypo0oJ98d3NN9cwPE6U%3D&reserved=0 appears to be working
I can see in code that there are 2 possible problems:

botFrameworkAdapter.ts:391https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fbotbuilder-js%2Fblob%2Fmaster%2Flibraries%2Fbotbuilder%2Fsrc%2FbotFrameworkAdapter.ts%23L391&data=02|01|brharr%40microsoft.com|6cb65bffecff4c9ad12608d5ccbaec36|72f988bf86f141af91ab2d7cd011db47|1|0|636640025556481555&sdata=GRsNtmCJ6rk6ntlpJ4BPECO158CBOpfWldN3mwDXkx0%3D&reserved=0 swaps the error code back to a 500 and
botFrameworkAdapter.ts:393https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fbotbuilder-js%2Fblob%2Fmaster%2Flibraries%2Fbotbuilder%2Fsrc%2FbotFrameworkAdapter.ts%23L393&data=02|01|brharr%40microsoft.com|6cb65bffecff4c9ad12608d5ccbaec36|72f988bf86f141af91ab2d7cd011db47|1|0|636640025556491559&sdata=DXKFqvEaZoe07c5sl8SSSwZftZReY%2BVZDIbZPo3OcKk%3D&reserved=0 is not caught.

To track down the point of failure, are you seeing the console output from this linehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fbotbuilder-js%2Fblob%2Fmaster%2Flibraries%2Fbotbuilder%2Fsrc%2FbotFrameworkAdapter.ts%23L413&data=02|01|brharr%40microsoft.com|6cb65bffecff4c9ad12608d5ccbaec36|72f988bf86f141af91ab2d7cd011db47|1|0|636640025556501567&sdata=nRmhEk87%2BDNrptkMgmvKpMwaT9n8ukzl9zbCC9wM76M%3D&reserved=0? Additionally, can you set breakpoints at each then() block in the processActivity chain to see how far along this gets?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fbotbuilder-js%2Fissues%2F274%23issuecomment-395565859&data=02|01|brharr%40microsoft.com|6cb65bffecff4c9ad12608d5ccbaec36|72f988bf86f141af91ab2d7cd011db47|1|0|636640025556501567&sdata=bJWa7z93%2FpvtLo4D1PjAQkyfhdZDevABD78p%2BWr3GGU%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAL3ms5_FGwRXIs5XuxlhZmQ8k8RMVVk2ks5t6ZZ6gaJpZM4UfBwX&data=02|01|brharr%40microsoft.com|6cb65bffecff4c9ad12608d5ccbaec36|72f988bf86f141af91ab2d7cd011db47|1|0|636640025556511576&sdata=84icr7QGGKt0oyJz4riMTTeF8rpen%2BmltT40QHqdmEo%3D&reserved=0.

Can you try restructuring your code a bit? You're mixing promises and async/await patterns which could be tripping you up. Try this:
adapter.processActivity(req, res, async context => {
const isMessage = context.activity.type === 'message';
if (isMessage) {
const state = conversationState.get(context);
const count = state.count === undefined ? state.count = 0 : ++state.count;
const message = context.activity.text;

        const dc = dialogs.createContext(context, state);
        await dc.continue();

        if (!context.responded) {
            try {
                var intentCheck = await CheckRegExIntents(message);
                if (intentCheck != null && intentCheck == 'greeting')
                {
                    await dc.begin('greetings', message);
                }
                else {
                    const res = await model.recognize(context);
                    let topIntent = LuisRecognizer.topIntent(res);
                    if (topIntent === 'SearchPics')
                        await context.sendActivity('You have reached the Search Dialog');
                    else if (topIntent === 'OrderPics')
                        await context.sendActivity('You have reached the Order Dialog');
                    else if (topIntent === 'SharePic')
                        await context.sendActivity('You have reached the Share Dialog');
                    else {
                        await context.sendActivity(`Hi! I'm the Photo bot. Say something like "Hi" or "Hello" to get started.`);
                        await context.sendActivity(`${count}: You said "${message}"`);
                    }
                }
            } catch (err) {
                console.log(err);
            }
        }
    } else {
        // If the user has not sent a message, we want to echo back what type of event it is.
        await context.sendActivity(`[${context.activity.type} event detected]`);
    }
});

closing due to lack of activity.

authors: Stevenic brharr justinwilaby sgellock

repo: Microsoft/botbuilder-js


text:
QnaMaker Basic Features

QnAMaker class with basic features implemented

working on:

telemetry
tests
nice things like throwing errors

@daveta, @congysu, @axelsrz, @Zerryth Why is everyone working on the same branch and touching different libraries?
Reviewers who like to use Code Flow cannot use the tool to review this PR due to the number of commits. Please consider getting this PR in ASAP and then quickly iterating with separate PRs. Otherwise this PR is going to be close to impossible to review.

@stevengum I have a sneaking suspicion the reason is "b/c Ashley messed up with git/github at some point >_>"

@stevengum @Zerryth Actually what happened is that I was using this branch 3 weeks ago to push the general template for the new classes and my guess is that because a lot of breaking code was pushed in a small amount of time, this branch was used as quick push. We should start to at least make PRs against this branch (work-in-progress). I'm almost done with building the fix so we can do that from now on.

authors: Zerryth axelsrz stevengum

repo: Microsoft/botbuilder-python


text:
Update C# Coding Guidelines Uri in Readme

Update C# Coding Guidelines to GitHub Uri

Thanks @hjgraca. Much appreciated.

authors: hjgraca richlander

repo: Microsoft/dotnet


text:
Unexpected crash! Please log a bug with the commandline you specified.

dts-gen -m polymer-redux
(function (exports, require, module, __filename, __dirname) { import {get} from '../@polymer/polymer/lib/utils/path.js';
^^^^^^
SyntaxError: Unexpected token import
at createScript (vm.js:53:10)
at Object.runInThisContext (vm.js:95:10)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/usr/local/lib/node_modules/dts-gen/bin/lib/run.js:57:67)

+1

dts-get -m oidc-provider

@GitStorageOne Trying to do the exact same thing. I'll post if I find a solution.

authors: GitStorageOne infrarosso78 jaxoncreed mrdulin

repo: Microsoft/dts-gen


text:
Create a job worker that periodically checks for bulk export job

User story
As an engineer, I want to have that job worker that picks up bulk export job periodically so that the job can be processed in the future.
Acceptance criteria

Verify a background worker is launched when the process starts.
Verify the worker picks up a new job.
Verify the worker picks up a stale job.
Verify the worker does not pick up a running job.
Verify there is a setting to control number of concurrent jobs and the worker respect that setting.
Verify there is a setting to control the delay between the worker polls for a new job and the worker respect that setting.
Verify the worker completes the job.

Moved tracking of user story level items to Azure DevOps.

authors: jackliums namadabu

repo: Microsoft/fhir-server


text:
Question: Can Malmö be used via a NAT setup?

I am trying to do the following:

start the Malmö Client in a docker container
start a Python Agent from a host machine (OS X) and get a mission to run successfully.

Due to Docker on Mac, the network connectivity is established via a NAT, and somehow this means the IP detected by the Client is not that of the Agent, but that of the bridge (of the VM in which Docker runs). To cut the story short, I can get some degree of connectivity if I inject the real IP of the host, but the only way I manage to do so is by modifying the code of the Client, while it seems to me that it would be possible doing the same thing during the initialization if there were a way of passing a Mission Init XML to a client from an agent, or if the AgentAddress could be set during the initialization o f the mission, but I didn't find a way of doing so.
It is not that important as my goal is playing with the algorithms, not with network setups (and the only difference would be if I use one or two computers to run client and agent, or no), but thought it was worth asking, just in case.

Running the agent from a different docker container (but in the same docker host, and therefore directly in the same network) works quite well, by the way.

I've had success running docker in host networking mode, i.e.
docker run --network=host quay.io/tambet/malmo:0.18

Ultimately we'd love to get Malmo working well in Docker. I spent some time yesterdat trying to run as per your initial setup - the Minecraft client running in a container, and the agent running on the host machine.
I'm new to Docker and all its intricacies, so I'd welcome any pointers. As far as I can tell, there are a few difficulties with the TCP code as it stands. The main issue is that ports are allocated dynamically, at the start of each mission. Both the mod (Minecraft-side) and the platform (Agent-side) choose their own ports (in the range 10000-11000), and then communicate them via the MissionInit message. We do this so that only one port ever needs to be fixed - the mission control port (10000 by default). All the other ports (for sending video, sending observations, sending rewards, and receiving commands) can then be picked according to what's free, ensuring there are never any port collisions.
This doesn't fit well with Docker (in non-host networking mode), which - if I understand this correctly - requires the ports to be specifically exposed and mapped when the container is run. Trying to cover all bases by exposing all the ports from 10000 to 11000 fails (whatever is involved in exposing the ports is clearly not something that ought to be done a thousand times...)
We could allow a user to pick specific ports - most of this code already exists, we just never exposed the interface to the user. I'll experiment a little and see if this helps.
I think it's especially worth getting this scenario working on Windows, because Docker doesn't seem to support interactive mode on Windows yet, which makes the other option - running the agent from a different docker container, on the same docker host - feel a bit cumbersome. (Though I guess it needn't be - I need to try this out.) More importantly, we need to make sure agents and clients can run on separate machines - this is pretty crucial.
Incidentally, I couldn't get host networking mode to work - I guess I need to do some firewall shenanigans, but I've been running on Windows, and most of the help on the Internet assumes Linux...

authors: DaveyBiggers tambetm tnarik

repo: Microsoft/malmo


text:
Moving the NavigationView to another Frame makes it unresponsive.

I am using the build 17134 SDK, but the latest Microsoft.UI.XAML 2.0.181018003.1 has the same problem.
When moving the NavigationView to another Frame, the NavigationView menu items cannot be clicked anymore. This means that giving the NavigationView another parent control upsets it. Hovering over menu items still works as I can see the color change.
object temp = Frame1.Content; // content is the NavigationView
Frame1.Content = null;
Frame2.Content = temp;
The problem is odd as other controls can be moved to another Frame without problems.
Placing the NavigationView inside a Grid (for example) does not solve the problem. I also tried placing it in a Grid and do a Grid.Children.Remove() before adding it to another Grid, but also not a solution.
I attached a sample UWP project illustrating the problem.
NavigationViewPanelTest.zip

I also added this issue to GitHub Microsoft/microsoft-ui-xaml

@frankvandeven this sounds like the same issue as #18, can you take a look and see if you agree?

authors: frankvandeven jevansaks

repo: Microsoft/microsoft-ui-xaml


text:
Website editor 404 mishandled, results in permanent error message

As you'll be able to see quite quickly for yourself, the editor in the website suggests that it supports SCSS, but the related file ('/index/sample.scss.txt') is missing, resulting in a 404 error.
Using Chrome 49.0.2623.110, I selected SCSS through the menu.  This failed silently.  On my next selection and thereafter, the samples loaded but were displaced downwards by an error message that could not be dismissed by any means I could discover.

Thank you for the heads up! :heart:

authors: alexandrudima muddletoes

repo: Microsoft/monaco-editor


text:
Performance inside Project.GetAllGlobs

When I investigate the performance trace to load Roslyn.sln, I noticed that we spent quite some time in the Project.GetAllGlobs function (660 ms in the trace).  I wonder whether we can create RegEx in a lazy way, to delay that overhead, until we start to use those globs to match file paths.
The reason is that this function (and the MsBuildGlob property) need access the msbuild model, and is not thread safe, so we have to pick up them inside a lock.  We use them when we receive file system changes.  But we do GetAllGlobs after every project changes, and may or may not receive file system changes after that, so if this slow operation can be delayed:
1, it may be delayed after the solution loading phase, (and at least, it will be done in a background process, instead of doing that within the performance critical path inside the project lock;
2, if the project is changed couple times, we may skip doing that for the middle state completely.
If you drill into the time spent inside this function, I am talking about the time spent primary under those two stacks (which will account more than 50% of the time).

Name
Inc %
Inc
Inc Ct

microsoft.build!Project.GetAllGlobs
100.0
660.239
1,191

microsoft.build!Microsoft.Build.Evaluation.ItemSpec2[System.__Canon,System.__Canon]..ctor(class System.String,class Microsoft.Build.Evaluation.Expander2,class Microsoft.Build.Shared.IElementLocation,bool) | 49.0 | 323.558 | 459
microsoft.build!Project.BuildGlobResultFromIncludeItem | 41.8 | 276.235 | 631
|+ microsoft.build!Microsoft.Build.Globbing.CompositeGlob..ctor(class System.Collections.Generic.IEnumerable1) | 34.4 | 227.235 | 536 \|\|+ system.collections.immutable.ni!System.Collections.Immutable.ImmutableArray.ToImmutableArray[System.__Canon](System.Collections.Generic.IEnumerable1) | 34.4 | 227.235 | 536
|| + system.collections.immutable.ni!System.Collections.Immutable.ImmutableArray.CreateRangeSystem.__Canon | 34.4 | 227.235 | 536
||  + system.core.ni!System.Linq.Enumerable.ToArraySystem.__Canon | 34.4 | 227.235 | 536
||   + system.core.ni!System.Linq.Buffer1[System.__Canon]..ctor(System.Collections.Generic.IEnumerable1) | 34.4 | 227.235 | 536
||    + system.core.ni!System.Linq.Enumerable+WhereSelectEnumerableIterator2[System.__Canon,System.__Canon].MoveNext() | 34.4 | 227.178 | 535 \|\|    \|+ microsoft.build!Microsoft.Build.Evaluation.ItemSpec2+<>c[System.__Canon,System.__Canon].b__19_0(class Microsoft.Build.Evaluation.ItemFragment) | 34.3 | 226.178 | 534
||    ||+ microsoft.build!ItemFragment.get_MsBuildGlob | 34.3 | 226.178 | 534
||    || + mscorlib.ni!System.Lazy1[System.__Canon].get_Value() | 34.3 | 226.178 | 534 \|\|    \|\|  + mscorlib.ni!System.Lazy1[System.__Canon].LazyInitValue() | 34.3 | 226.178 | 534
||    ||   + mscorlib.ni!System.Lazy`1[System.__Canon].CreateValue() | 34.3 | 226.178 | 534
||    ||    + microsoft.build.ni!ItemFragment.CreateMsBuildGlob | 34.0 | 224.642 | 532

Name
Inc %
Inc

microsoft.build!Project.GetAllGlobs
100.0
660.239

microsoft.build!Microsoft.Build.Evaluation.ItemSpec2[System.__Canon,System.__Canon]..ctor(class System.String,class Microsoft.Build.Evaluation.Expander2,class Microsoft.Build.Shared.IElementLocation,bool) | 49.0 | 323.558
|+ microsoft.build!Microsoft.Build.Evaluation.ItemSpec`2[System.__Canon,System.__Canon].BuildItemFragments(class Microsoft.Build.Shared.IElementLocation,bool) | 48.4 | 319.640
||+ microsoft.build.ni!ItemFragment.CreateFileMatcher | 18.9 | 124.535

Include @davkean,  this stack is also in the critical path of loading solution today.  I think this method can be much faster, if we push computation of creating matching structure (like RegEx or anything) to lazy (or reuse something cached during the project evaluation).  If it still takes too long, we will consider to spin it off to a separated dataflow, so it won't be in the critical path, but that will make the dataflow more complex, and add other overhead to the other part of the product.

Closed by #2652

authors: cdmihai lifengl

repo: Microsoft/msbuild


text:
Support VS 2015 Update 1

Some project.json changes needed to build with VS 2015 Update 1 RC.
(Can anyone find documentation for the change in VS/NuGet that forces this?  It seems kind of like it ought to be in the Update 1 release notes...)

I have an extremely similar change on my machine I was about to send out :+1:
Mine is different because I just changed all the "win-" to "win".  Did you do differently on purpose?  I think I'd prefer having only the one entry if that still works downlevel.  I'm going to send my PR to see if that works on the CI machine . . .

Mine failed, requiring "win-" on the CI machine.
LGTM.

@rainersigwald: Yeah, I included both "win-" and "win" because I'd seen some mention (perhaps in a commit to Roslyn?) of needing the former for VS 2015 RTM and the latter for Update 1.

LGTM.
I tried to track down the issue in Nugget, to see if there's a better solution to this. From what I can tell the build needs for Nuget.exe and the Nuget msbuild code to both agree on the moniker name (e.g. win-x64). Prior to Update1 the Nuget build code ($NuGetRuntimeIdentifier in Microsoft.Nuget.targets) had a bug which resolved it to win- instead of win, so the project.json files also had to have win- in order for the two to agree.
There are other possible workarounds that work for both Update1 and RTM that involve manually setting the properties that the Nuget build code uses in our dir.props, but I think @SamB's solution is cleaner because it does not touch Nuget dependencies in weird ways. :)

We also got an internal email promising documentation on this in NuGet (but it doesn't exist yet).

authors: SamB cdmihai rainersigwald


text:
Can't enter multiple lines in interactive window

Steps to Reproduce

type function () { <enter> in IW

Yes, after ripping out the static analysis engine and removing code analysis from the interactive window, we no longer support automatically entering multiline statements in the interactive window. You now have to press CTRL + SHIFT + RETURN to enter a new line. Automatic indention of multiline statements in the interactive window is also not supported any longer.

Reopening to track resolving this eventually this it is a known regression. This may be something we investigate further with #1090 in dev15.

This requires interaction with th JavaScript LS, to figure out if this method should retur true.

authors: mjbvz mousetraps paulvanbrenk

repo: Microsoft/nodejstools


text:
npm Error

Expected Behavior
Actual Behavior
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
C:\Users\CONCCFJ>cd c:\node\nodejsconsoleapp1\nodejsconsoleapp1
c:\node\NodejsConsoleApp1\NodejsConsoleApp1>node app.js
Hello world
c:\node\NodejsConsoleApp1\NodejsConsoleApp1>npm install -express save
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\node\nodejs\node.exe" "C:\node\nodejs\node_modules\npm
\bin\npm-cli.js" "install" "-express" "save"
npm ERR! node v6.10.0
npm ERR! npm  v3.10.10
npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! unable to verify the first certificate
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR!     c:\node\NodejsConsoleApp1\NodejsConsoleApp1\npm-debug.log
c:\node\NodejsConsoleApp1\NodejsConsoleApp1>
c:\node\NodejsConsoleApp1\NodejsConsoleApp1>
Steps to Reproduce

0 info it worked if it ends with ok
1 verbose cli [ 'C:\node\nodejs\node.exe',
1 verbose cli   'C:\node\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   '-express',
1 verbose cli   'save' ]
2 info using npm@3.10.10
3 info using node@v6.10.0
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData save
8 silly fetchNamedPackageData save
9 silly mapToRegistry name save
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry data Result {
12 silly mapToRegistry   raw: 'save',
12 silly mapToRegistry   scope: null,
12 silly mapToRegistry   escapedName: 'save',
12 silly mapToRegistry   name: 'save',
12 silly mapToRegistry   rawSpec: '',
12 silly mapToRegistry   spec: 'latest',
12 silly mapToRegistry   type: 'tag' }
13 silly mapToRegistry uri https://registry.npmjs.org/save
14 verbose request uri https://registry.npmjs.org/save
15 verbose request no auth needed
16 info attempt registry request try #1 at 10:54:06 AM
17 verbose request id 6e4752a40bf759f9
18 http request GET https://registry.npmjs.org/save
19 info retry will retry, error on last attempt: Error: unable to verify the first certificate
20 info attempt registry request try #2 at 10:54:16 AM
21 http request GET https://registry.npmjs.org/save
22 info retry will retry, error on last attempt: Error: unable to verify the first certificate
23 info attempt registry request try #3 at 10:55:16 AM
24 http request GET https://registry.npmjs.org/save
25 silly fetchPackageMetaData Error: unable to verify the first certificate
25 silly fetchPackageMetaData     at Error (native)
25 silly fetchPackageMetaData     at TLSSocket. (_tls_wrap.js:1085:38)
25 silly fetchPackageMetaData     at emitNone (events.js:86:13)
25 silly fetchPackageMetaData     at TLSSocket.emit (events.js:185:7)
25 silly fetchPackageMetaData     at TLSSocket._finishInit (_tls_wrap.js:603:8)
25 silly fetchPackageMetaData     at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:433:38)
25 silly fetchPackageMetaData  error for save { Error: unable to verify the first certificate
25 silly fetchPackageMetaData     at Error (native)
25 silly fetchPackageMetaData     at TLSSocket. (_tls_wrap.js:1085:38)
25 silly fetchPackageMetaData     at emitNone (events.js:86:13)
25 silly fetchPackageMetaData     at TLSSocket.emit (events.js:185:7)
25 silly fetchPackageMetaData     at TLSSocket._finishInit (_tls_wrap.js:603:8)
25 silly fetchPackageMetaData     at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:433:38) code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' }
26 silly rollbackFailedOptional Starting
27 silly rollbackFailedOptional Finishing
28 silly runTopLevelLifecycles Finishing
29 silly install printInstalled
30 verbose stack Error: unable to verify the first certificate
30 verbose stack     at Error (native)
30 verbose stack     at TLSSocket. (_tls_wrap.js:1085:38)
30 verbose stack     at emitNone (events.js:86:13)
30 verbose stack     at TLSSocket.emit (events.js:185:7)
30 verbose stack     at TLSSocket._finishInit (_tls_wrap.js:603:8)
30 verbose stack     at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:433:38)
31 verbose cwd c:\node\NodejsConsoleApp1\NodejsConsoleApp1
32 error Windows_NT 6.1.7601
33 error argv "C:\node\nodejs\node.exe" "C:\node\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-express" "save"
34 error node v6.10.0
35 error npm  v3.10.10
36 error code UNABLE_TO_VERIFY_LEAF_SIGNATURE
37 error unable to verify the first certificate
38 error If you need help, you may report this error at:
38 error     https://github.com/npm/npm/issues
39 verbose exit [ 1, true ]

Looks like you are just getting a straight Node.js/NPM error, not related to the Node.js Tools for Visual Studio in any way. I'd check out general issues (such as http://stackoverflow.com/questions/20747817/error-unable-to-verify-leaf-signature-phonegap-installation ) and follow up with those projects if you still can't resolve it.

authors: DeepakNandan billti


text:
High memory consumtion

Hi,
I'm experiencing a very high memory utilization when using Visual Studio 2015 with node.js projects. I assume it has to do with the number of npm packages (~40). It starts off alright, but slowly builds up to consume between 1.5 - 2.1 GB of RAM.

BTW. Then whole project folder with npm modules included is around 860 MB. My fairly large web project consumes < 200 MB.

This might also be useful...

Some more input:
Closing the solution will not have any affect, nor does it have any affect if I remove the node_modules folder before opening VS.
HTH

I have this exact same problem. My fix has been to covert the project to a C# class library for now.

I've created a troubleshooting page to document some possible work arounds for high memory usage: https://github.com/Microsoft/nodejstools/wiki/Troubleshooting#high-memory-usage-workarounds
If you on the  NTVS 1.2 Alpha, try switching to use ES6 Preview Intellisense as a first step (Tools -> Options -> Text Editor -> Node.js -> IntelliSense). Our homegrown static analysis engine is usually to blame for high memory usage, and ES6 Preview Intellisense uses a more modern and efficient language service developed by the Typescript team. We will still try to fix leaks and crashes in our static analysis engine of course, but will probably not invest in fixing some of the fundamental memory consumption problems it has.

If you are seeing unacceptably high memory usage, please try installing NTVS 1.2 Alpha and switching to ES6 Preview Intellisense. NTVS 1.2 Alpha 2 fixes a number of memory leaks and reduces memory usage across the board. There's still room for improvement, so please report any performance problems you encounter with Alpha 2.
Thanks.

authors: mjbvz mtycholaz wmmihaa


text:
debugger gets confused by async/await

Hi,
I am using TypeScript 1.8 / node 6.2.1 / nodetools 1.1. What is the state of async/await support? Is it fully supported or is it a "preview"? It seems that debugger gets very confused by functions with await.

Thanks for the report. We haven't been focusing on async/await debugging support yet, but definitely want to support this. I don't believe debuggers should require any special logic for async functions (but that could be totally wrong) so perhaps it's the NTVS source mapper or some other lower level component that is getting confused.
A few point to help with the investigation:

What exactly are you seeing? Are breakpoints not resolving, not being hit, or getting hit on the wrong lines?
Is this behavior consistent?
Does the same behavior happen with normal ES6 generation functions? I believe TS implements async and await with generators.

Could you also provide a short code sample to make sure we are all on the same page for the investigation. Thanks.

This is supported in Node 8 and later.

authors: alexezh mjbvz paulvanbrenk


text:
big scores get truncated due to "HI" score display

if you want big scores ten's of thousands or millions can't see score after high score is set

I think we need to overhaul the whole score/timer/lives UI. Maybe we should remove the Hi score and come up with a scheme for long numbers... Luckily we have the luxury of knowing exactly how many characters we are capable of displaying.

authors: eric-camplin riknoll


text:
charAt block text change

Seems to need this change for non-LR parms like in the Spanish translation:
EN: char from %this=text|at %pos
vs.
ES: devuelve el carácter de la posición %pos|de %this=text
%pos changed to match the actual parm name %index
RE: https://github.com/Microsoft/pxt-microbit/issues/1311#issuecomment-449068706

Why are we changing the block id?

No real need to change the ID. At the time I thought that ID should be reserved for the string.get() as in someString[].

authors: ganicke pelikhan

repo: Microsoft/pxt


text:
System.ObjectDisposedException: PriorityProducerConsumer`1 instance is disposed

Microsoft/vscode-python#2387

Hey there,
It's hard to figure out when this was or will be released, would you mind lcarifying how your release process works? :)
Thanks,

We weren't able to reproduce it, so it wasn't exactly "released". I was under the impression that this only occurred when the server was already closing, but we've seen this exception still happening for a few users so we may need to reopen this.

Fair enough :)
I certainly have noticed it recently but it would be hard for me to pinpoint what triggered it. If I can, I'll report it here.

authors: Lawouach brettcannon jakebailey

repo: Microsoft/python-language-server


text:
No correct completion for df.loc

VSCode Version: 1.32.3
Extension Version: 2019.2.5558
OS: Windows 10
Python 3.7.2
LS Version: 0.2.28.0
Using Conda virtual environment
Working with this example tutorial. Expected df.loc to give me a full list of options (df.loc[] was the option I was after), but I only recieved 2 as in the below figure (analysis had finished completing):

Please provide complete example with imports. Thanks.

import matplotlib.pyplot as plt
import numpy as np

# Plot Histogram on x

x = np.random.normal(size = 1000)
plt.hist(x, bins=50)
plt.gca().set(title = "Frequency Histogram", ylabel = 'Frequency')

# Pandas tutorial example script

import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/selva86/datasets/master/diamonds.csv')

x1 = df.loc[df.cut=='Ideal', 'depth']
x2 = df.loc[df.cut == 'Fair', 'depth']
x3 = df.loc[df.cut=='Good', 'depth']

kwargs = dict(alpha = 0.5, bins = 100)

plt.hist(x1, **kwargs, color='g', label='Ideal')
plt.hist(x2, **kwargs, color='b', label='Fair')
plt.hist(x3, **kwargs, color='r', label='Good')
plt.gca().set(title='Probability Histogram of Diamond Depths', ylabel='Probability')
plt.xlim(50,75)
plt.legend()

@Anapo14 retry this.

Folding into #981


text:
Azure pipelines improvements

All CI tests pass!

Merged. Regarding that conftest - did you check that tests work not in docker?

Merged. Regarding that conftest - did you check that tests work not in docker?

Merged. Regarding that conftest - did you check that tests work not in docker?

@aeantipov Yes, if you put the correct path to python2 in tests/host_environment.yml it works. If you don't, it never worked before, but now falls back to a default that is correct in the Docker image.

authors: aeantipov jgukelberger

repo: Microsoft/qmt


text:
Does vcpkg_from_github supports checking out a particular commit from a particular branch?

Currently vcpkg install ceres compiles but when we use find_package(Ceres REQUIRED) in our own code there will be cmake errors as indicated in the comments in #1250. According to the comments, this error should be fixed in newer ceres commits. However, the problem is when I do vcpkg install ceres --head there is a compilation error related to suitesparse and I am trying to debug and figure out what commit introduces the compilation error.
The problem is I am unable to build suitesparse successfully from source, and if I build ceres from source it's not able to identify suitesparse in vcpkg for some reason and it builds without suitesparse support. Hence I am stuck on figuring out which new commit introduces the compilation error. Does vcpkg_from_github supports checking out a particular commit? Now I can only choose between stable releases or the latest commit on github.

@jasjuang I think it does. For example I usually do this when the latest stable version does not compile
vcpkg_from_github(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO repo
    REF commit_ref / stable_version_number
    SHA512 shar
    HEAD_REF master
)

@atkawa7 I tried something like
vcpkg_from_github(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO ceres-solver/ceres-solver
    REF 58bacda / 1.12.0
    SHA512 98468707e49f81ccee015c3cea907193878a69fe084d2cced10413dbdb57e584d5af08deb09f831f307745a2126c7629ffd9d29067636cde5de0b30f0b384613
    HEAD_REF master
)

58bacda is the latest commit as indicated in here https://github.com/ceres-solver/ceres-solver/commits/master
but when I do a vcpkg install ceres I get an error like
CMake Error at scripts/cmake/vcpkg_from_github.cmake:85 (message):
  Could not determine source path:
  'C:/dev/vcpkg/buildtrees/ceres/src/ceres-solver-58bacda' does not exist

Am I doing it right?

@jasjuang I am sorry I didn't explain correctly. The / sign means or in this case

If I change it to
vcpkg_from_github(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO ceres-solver/ceres-solver
    REF 58bacda
    SHA512 98468707e49f81ccee015c3cea907193878a69fe084d2cced10413dbdb57e584d5af08deb09f831f307745a2126c7629ffd9d29067636cde5de0b30f0b384613
    HEAD_REF master
)

same error occurs. What am I doing wrong?

The reason the ref is wrong. I think it should 58bacdacae143780005757c485a0b319e1aea637

@atkawa7 You are right it needs the full ref. Thanks for your help!

repo: Microsoft/vcpkg


text:
[opusfile] new port

https://github.com/xiph/opusfile

Awesome job! Thanks for the PR!


text:
outref<'a> should not allow read access

As https://github.com/fsharp/fslang-design/blob/master/FSharp-4.5/FS-1053-span.md reads:

Semantically outref means "the holder of the byref pointer may only use it to write". It doesn't imply that other threads or aliases don't have read access to that pointer.

outref should not allow read access, but the following code compiles:
let changeDate(date: outref<DateTime>) =
    let d: DateTime = date
    date <- DateTime.Now

Nope. "The out keyword causes arguments to be passed by reference. It is like the ref keyword, except that ref requires that the variable be initialized before it is passed."
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/out-parameter-modifier

outref<'T> is only considered for documentation purposes only. In the future we may change this by adding some flow analysis.

This sounds like a spec bug, then. I think that the spec definitely implies that date cannot be read in the changeDate function.

As a note if we restrict it as-is today to disallow reads, that would be a breaking change to document

Closing as by design; the spec and docs explain this now.

authors: TIHan cartermp vasily-kirichenko zpodlovics

repo: Microsoft/visualfsharp


text:
Remove 'Execute Line in F# Interactive' command

Continue #257, this PR removes 'Execute Line in F# Interactive' command, which has been covered by new behaviours of Alt + Enter.
With the upcoming support for Script Debugging, this will reduces the clutter of context menu. (Sorry if merging this makes rebasing #225 much harder.)

+10 −42 these are the best PRs!

LGTM

authors: dungpa forki latkin


text:
fix regression in unit test

There was a regression in a unittest from the cleanup https://github.com/Microsoft/visualfsharp/commit/0214e3b8de10a2049f0ecc2b59329d9f8d551564
I switched the order of some code to do with setting up thread locals for error reporting when hosted inside VS.   The thread locals weren't set up at the point the error was reported.

Thanks for this Don

Still seems to hang: here is the stacktrace:
FSharp.LanguageService.dll!Microsoft.VisualStudio.FSharp.LanguageService.LanguageServiceState.ExecuteBackgroundRequest(Microsoft.VisualStudio.FSharp.LanguageService.BackgroundRequest req, Microsoft.VisualStudio.FSharp.LanguageService.IdealSource source) Lin...

The individual NUnit test that was hanging runs ok for me.  I'll now run the full ideunit tests to see

all tests passed - could you check you rebuilt the IDE FSharp.LanguageService.COmpiler.dll and IDE tests?

I just rebuilt everything.  And ran the tests again, it seems to have hung at the same point.
Not Flagged	>	10756	10	Worker Thread	TestRunnerThread	FSharp.Core.dll!Microsoft.FSharp.Control.AsyncImpl.ResultCell<Microsoft.FSharp.Compiler.SourceCodeServices.Reactor.ResultOrException<Microsoft.FSharp.Core.Unit>>.TryWaitForResultSynchronously	Normal
 	 	 	 	 	 	mscorlib.dll!System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle waitableSafeHandle, long millisecondsTimeout, bool hasThreadAffinity, bool exitContext)
 	 	 	 	 	 	mscorlib.dll!System.Threading.WaitHandle.WaitOne(int millisecondsTimeout, bool exitContext)
 	 	 	 	 	 	FSharp.Core.dll!Microsoft.FSharp.Control.AsyncImpl.ResultCell<Microsoft.FSharp.Compiler.SourceCodeServices.Reactor.ResultOrException<Microsoft.FSharp.Core.Unit>>.TryWaitForResultSynchronously(Microsoft.FSharp.Core.FSharpOption<int> timeout) Line 1213
 	 	 	 	 	 	FSharp.Core.dll!Microsoft.FSharp.Control.FSharpMailboxProcessor<Microsoft.FSharp.Compiler.SourceCodeServices.Reactor.ReactorCommands>.TryPostAndReply<Microsoft.FSharp.Compiler.SourceCodeServices.Reactor.ResultOrException<Microsoft.FSharp.Core.Unit>>(Microsoft.FSharp.Core.FSharpFunc<Microsoft.FSharp.Control.FSharpAsyncReplyChannel<Microsoft.FSharp.Compiler.SourceCodeServices.Reactor.ResultOrException<Microsoft.FSharp.Core.Unit>>, Microsoft.FSharp.Compiler.SourceCodeServices.Reactor.ReactorCommands> buildMessage, Microsoft.FSharp.Core.FSharpOption<int> timeout) Line 2499
 	 	 	 	 	 	FSharp.Core.dll!Microsoft.FSharp.Control.FSharpMailboxProcessor<Microsoft.FSharp.Compiler.SourceCodeServices.Reactor.ReactorCommands>.PostAndReply<Microsoft.FSharp.Compiler.SourceCodeServices.Reactor.ResultOrException<Microsoft.FSharp.Core.Unit>>(Microsoft.FSharp.Core.FSharpFunc<Microsoft.FSharp.Control.FSharpAsyncReplyChannel<Microsoft.FSharp.Compiler.SourceCodeServices.Reactor.ResultOrException<Microsoft.FSharp.Core.Unit>>, Microsoft.FSharp.Compiler.SourceCodeServices.Reactor.ReactorCommands> buildMessage, Microsoft.FSharp.Core.FSharpOption<int> timeout) Line 2502
 	 	 	 	 	 	FSharp.LanguageService.Compiler.dll!Microsoft.FSharp.Compiler.SourceCodeServices.Reactor.Reactor.SyncOp(Microsoft.FSharp.Core.FSharpFunc<Microsoft.FSharp.Core.Unit, Microsoft.FSharp.Core.Unit> op) Line 213
 	 	 	 	 	 	FSharp.LanguageService.Compiler.dll!Microsoft.FSharp.Compiler.SourceCodeServices.Reactor.Reactor.RunSyncOp<Microsoft.FSharp.Compiler.SourceCodeServices.CheckOptions>(Microsoft.FSharp.Core.FSharpFunc<Microsoft.FSharp.Core.Unit, Microsoft.FSharp.Compiler.SourceCodeServices.CheckOptions> f) Line 229
 	 	 	 	 	 	FSharp.LanguageService.Compiler.dll!Microsoft.FSharp.Compiler.SourceCodeServices.BackgroundCompiler.GetCheckOptionsFromScriptRoot(string filename, string source, System.DateTime loadedTimestamp, string[] otherFlags) Line 1997
 	 	 	 	 	 	FSharp.LanguageService.dll!<StartupCode$FSharp-LanguageService>.$Servicem.backgroundRequestData@1071.Invoke(Microsoft.FSharp.Core.Unit unitVar) Line 1073
 	 	 	 	 	 	mscorlib.dll!System.Lazy<Microsoft.VisualStudio.FSharp.LanguageService.ExecuteBackgroundRequestData>.CreateValue()
 	 	 	 	 	 	mscorlib.dll!System.Lazy<Microsoft.VisualStudio.FSharp.LanguageService.ExecuteBackgroundRequestData>.LazyInitValue()
 	 	 	 	 	 	mscorlib.dll!System.Lazy<Microsoft.VisualStudio.FSharp.LanguageService.ExecuteBackgroundRequestData>.Value.get()
 	 	 	 	 	 	FSharp.LanguageService.dll!Microsoft.VisualStudio.FSharp.LanguageService.LanguageServiceState.ExecuteFSharpBackgroundRequest(Microsoft.VisualStudio.FSharp.LanguageService.FSharpBackgroundRequest req, Microsoft.VisualStudio.FSharp.LanguageService.IdealSource source) Line 1215
 	 	 	 	 	 	FSharp.LanguageService.dll!Microsoft.VisualStudio.FSharp.LanguageService.LanguageServiceState.ExecuteBackgroundRequest(Microsoft.VisualStudio.FSharp.LanguageService.BackgroundRequest req, Microsoft.VisualStudio.FSharp.LanguageService.IdealSource source) Line 1196
 	 	 	 	 	 	Salsa.dll!Salsa.Salsa.Privates.SimpleOpenFile.TryExecuteBackgroundRequest(Microsoft.VisualStudio.FSharp.LanguageService.BackgroundRequest pr) Line 1214
 	 	 	 	 	 	Salsa.dll!Salsa.Salsa.Privates.SimpleOpenFile.ExecuteBackgroundRequestForScope(Microsoft.VisualStudio.FSharp.LanguageService.BackgroundRequest pr, bool canRetryAfterWaiting) Line 1221
 	 	 	 	 	 	Salsa.dll!Salsa.Salsa.Privates.SimpleOpenFile.OnIdleTypeCheck() Line 1243
 	 	 	 	 	 	Salsa.dll!Salsa.Salsa.Privates.SimpleOpenFile.OnIdle() Line 1200
 	 	 	 	 	 	Salsa.dll!Salsa.Salsa.Privates.SimpleVisualStudio.Salsa.Salsa.IVisualStudio.Salsa-Salsa-IVisualStudio-OnIdle() Line 917
 	 	 	 	 	 	Salsa.dll!Salsa.Salsa.Privates.SimpleVisualStudio.Salsa.Salsa.IVisualStudio.Salsa-Salsa-IVisualStudio-TakeCoffeeBreak() Line 923
 	 	 	 	 	 	Salsa.dll!Salsa.Salsa.Privates.SimpleOpenFile.ReplaceAllText(Microsoft.FSharp.Collections.FSharpList<string> replacementLines, bool takeCoffeeBreak) Line 1546
 	 	 	 	 	 	Salsa.dll!Salsa.Salsa.Models.MSBuildWithFlavor@1677-38.Invoke(System.Tuple<Salsa.Salsa.OpenFile, Microsoft.FSharp.Collections.FSharpList<string>, bool> tupledArg) Line 1677
 	 	 	 	 	 	Salsa.dll!Salsa.VsOpsUtils.ReplaceFileInMemory(Salsa.Salsa.OpenFile file, Microsoft.FSharp.Collections.FSharpList<string> lines) Line 145
 	 	 	 	 	 	Unittests.dll!UnitTests.TestLib.LanguageService.LanguageServiceBaseTests.CreateSingleFileProject(Microsoft.FSharp.Collections.FSharpList<string> content, Microsoft.FSharp.Core.FSharpOption<Microsoft.FSharp.Collections.FSharpList<string>> references, Microsoft.FSharp.Core.FSharpOption<Microsoft.FSharp.Collections.FSharpList<string>> defines, Microsoft.FSharp.Core.FSharpOption<UnitTests.TestLib.LanguageService.SourceFileKind> fileKind, Microsoft.FSharp.Core.FSharpOption<Microsoft.FSharp.Collections.FSharpList<string>> disabledWarnings, Microsoft.FSharp.Core.FSharpOption<string> fileName) Line 311
 	 	 	 	 	 	Unittests.dll!UnitTests.Tests.LanguageService.ScriptTests.createSingleFileFsxFromLines(Microsoft.FSharp.Collections.FSharpList<string> code) Line 24
 	 	 	 	 	 	Unittests.dll!UnitTests.Tests.LanguageService.ScriptTests.Fsx.InvalidMetaCommandFilenames() Line 1273
 	 	 	 	 	 	[Native to Managed Transition]
 	 	 	 	 	 	[Managed to Native Transition]

When I reverted the PR, the test started passing, so please take a look and resubmit the original PR when the ideunit tests can run without hanging.
Thanks

Hmm... I ran the tests to completion twice after this change - I'm fairly confident its the correct one though I may be wrong of course.

Ah, ok, there was an uncommitted change in my fix (I thought it wasn't the fix, but it was!) See https://github.com/dsyme/visualfsharp/commit/0cdd740b8ac809736db76fe05193e77795cd6d9d
This PR now contains the cleanup.

For posterity, the original PR which got committed then reverted was here: https://github.com/Microsoft/visualfsharp/pull/588

The number of times that orphaned files happens to me is high, and it is super annoying.
Thanks for taking care of this.

Committed, thanks for taking care of this.
Kevin

authors: KevinRansom dsyme


text:
Create Java Project adds extra folder

I will never put anything else in 'myFunctionProject' folder. There should be no intermediate folder

We should prompt before overwriting. Just use the exisiting 'confirmOverwriteFile': https://github.com/Microsoft/vscode-azurefunctions/blob/master/src/utils/fs.ts#L18

That's good.

authors: EricJizbaMSFT jdneo

repo: Microsoft/vscode-azurefunctions


text:
Run clean before build for C# projects

Fixes #286
Fixes #200

Never mind - gonna do this as part of a slightly larger PR

Reopening this PR - I originally thought I would do it as a part of work to build before every deploy (which touches the same file), but that work is temporarily blocked


text:
Could not find "View: Toggle Custom Explorer" command in tree-explorer-sample

Hi guys,
I run the tree-explorer-sample with insiders-vscode ((1.9.0-insider 2cdc2b3da8f0fd5322b48747241584cf9dd98f8f)), when I launch the project with debug mode, I could not find the command "View: Toggle Custom Explore" to display the custom explorer.

The "enableProposedApi": true, line is present in the package.json correct?

@Tyriar yes, default value of enableProposedApi in package.json is true.
{
	"name": "dep",
	"displayName": "Dependency Example",
	"description": "Dependency example for VSCode's explorer API",
	"version": "0.0.1",
	"publisher": "octref",
	"engines": {
		"vscode": "^1.7.0"
	},
	"enableProposedApi": true,
	"categories": [
		"Other"
	],
	"activationEvents": [
		"*"
	],
	"main": "./out/src/extension",
	"icon": "media/dep.png",
	"contributes": {
		"explorer": {
			"treeLabel": "Dependencies",
			"icon": "media/dep.svg",
			"treeExplorerNodeProviderId": "depTree"
		}
	},
	"scripts": {
		"vscode:prepublish": "tsc -p ./",
		"compile": "tsc -watch -p ./",
		"postinstall": "node ./node_modules/vscode/bin/install"
	},
	"devDependencies": {
		"typescript": "^2.1.4",
		"vscode": "^1.0.0",
		"@types/node": "*"
	}
}

@joaomoreno might know more about this?

BTW， my DEV ENV is macOS Sierra 10.12.2 (16C67)

use the right click on the activity bar to display.
I wasn't able to find it too.

authors: Tyriar fforjan momoko8443

repo: Microsoft/vscode-extension-samples


text:
what happens when I call onXYZ multiple times?

There are onXYZ-method to register a handler, like onRename. I wonder what happens when I register multiple handler and why it's not a property I assign?

The problem is that these return results in therefore are not like events. I agree that the on name is misleading but given that we have these names out there for 1 1/2 years now I am reluctant to change. I will close since I think it will never happen :-)

To answer the question: the last one wins :-)

authors: dbaeumer jrieken

repo: Microsoft/vscode-languageserver-node


text:
WorkspaceEdit is incompatible with the protocol

https://github.com/Microsoft/vscode-languageserver-node/blob/master/types/src/main.ts#L366
export interface WorkspaceEdit {
	changes: TextDocumentEdit[];
}

In the protocol it described as follows:
interface WorkspaceEdit {
    /**
     * Holds changes to existing resources.
     */
    changes: { [uri: DocumentUri]: TextEdit[]; };
}

Also asWorkspaceEdit is wrong.
This is cause of the problem in my extension.
It worked on "vscode-languageclient": "^2.6.3", but it doesn't on "vscode-languageclient": "3.0.4".

@dbaeumer https://github.com/Microsoft/vscode-languageserver-node/commit/75c63564a3a678d8fc39dd63117b8e0be645cbe7 seems to have broken the asWorkspaceEdit. This is now a blocker for https://github.com/redhat-developer/vscode-java/issues/99 since we can not move to the 3.x version of the library.

@gorkem I will have a look. I know that we discussed this but I need to refresh my memory.

Reading through the code I remember why we changed this for the 3.0 version of the protocol. The reason was that the old WorkspaceEdit was a map from URI to edit. The problem was that this didn't allow to specify on which version of a document an edit is applicable. This is why we changed this from a map to an array where the TextDocumentEdit contains a textDocument property pointing to a VersionedTextDocumentIdentifier.
I know this is breaking but to support proper version checking when applying text edits this was the best way to go forward. Now users of the protocol have to think about this.
So bottom line is that the spec is incorrect. I will fix this. Would you be able to adopt this?

I am concerned that this will break all the existing implementations, not all clients are able to move as quick.  I think we need a migration path on this. Perhaps we can leave the changes as a deprecated field and use something like edits for the TextDocumentEdit.
I think we should consider https://github.com/Microsoft/language-server-protocol/issues/41 before making changes to WorkspaceEditon the protocol.
The chaps on LSP4J @svenefftinge or @akosyakov can tell how quickly they can respond to such changes. It is pretty quick for jdt.ls once LSP4J has a build with adopting changes

I updated the documentation / spec of the protocol.

The old clients is a fair argument. Addressing this should be done like all the new features in 3.0.x. We should have a client capability property specifying which type of work space edit the client expects together. If the new format is not supported by the client then we should return the old structure. I missed this for this change but did it for all new features for 3.0.x. Don't know why I forgot it here. Will look into this this week.

What I will do is the following. I will declare WorkspaceEdit as follows:
/**
 * A workspace edit represents changes to many resources managed
 * in the workspace. The edit should either provide `changes` or
 * `documentChanges`. If documentChanges are present they are preferred
 * over `changes`.
 */
export interface WorkspaceEdit {
	/**
	 * Holds changes to existing resources.
	 */
	changes?: { [uri: string]: TextEdit[]; };

	/**
	 * An array of `TextDocumentEdit`s to express changes
	 * to specific a specific version of a text document.
	 */
	documentChanges?: TextDocumentEdit[];
}```

and add a ClientCapability:

```ts
	versionedWorkspaceEdit?: boolean;

If set the by the client the server is allowed to send TextDocumentEdit arrays in the property documentChanges.

The correct client capability will look like:
export interface WorkspaceClientCapabilites {
        ...
	/**
	 * Capabilities specific to `WorkspaceEdit`s
	 */
	workspaceEdit?: {
		/**
		 * The client supports versioned document changes in `WorkspaceEdit`s
		 */
		documentChanges?: boolean;
	};
        ...
}

A fix is available on release/3.2.0-alpha.1. Need to review tomorrow and then deliver a next release.

@gorkem lsp4j is updated according to change in the protocol: https://github.com/eclipse/lsp4j/commit/46b8d7a3e57bd70a3edc33e7483da1b8e5112e43

I pushed a 3.2.0-alpha.x version to npm under the next tag in case you want to give it a try.

authors: KalitaAlexey akosyakov dbaeumer gorkem


text:
How to tokenize cpp files?

Hello
When trying to token cpp files, I get very incomplete results.
Using
"c:\Users\coenr\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\cpp\syntaxes\cpp.tmLanguage.json"
When using Inspect TM Scopes, it seems cpp files also using some sort of c parsing:

If parsing the same line as the above screenshot using only the cpp.tmLanguage.json grammar, most lines are simply tokenized as meta.class-struct-block.cpp. How can I reproduce the VSCode results?

Example file:
#include <bits/stdc++.h>
using namespace std;
class Geeks
{
    // Access specifier
    public:

    // Data Members
    string geekname;

    // Member Functions()
    void printname()
    {
       cout << "Geekname is: " << geekname;
    }
};

int main() {

    // Declare an object of class geeks
    Geeks obj1;

    // accessing data member
    obj1.geekname = "Abhi";

    // accessing member function
    obj1.printname();
    return 0;
}

I solved it by doing something like this:
        return (registry.loadGrammarWithConfiguration(scopeName, this.languageId++, {}) as Thenable<IGrammar | undefined | null>).then((grammar) => {
            if (grammar) {
                this.textMateRegistry.set(languageID, grammar);
            }
            return grammar;
        });

repo: Microsoft/vscode-textmate


text:
Syntax highlighting doesn't work with "text/babel" script tags

VSCode Version: 1.6.0-insider
OS Version: Windows 10 version 1511 (OS Build 10586.545)

Steps to Reproduce:

Create a <script type="text/babel"> tag in a .html file.
Observe that syntax highlighting doesn't work inside the tag as long as script type is set to text/babel. If it is changed to text/javascript then syntax highlighting works.

It is absolutely required to be able to use text/babel tags in some instances, e.g. when following the official ReactJS tutorial.

Our system doesn't know the text/babel mimetype. Not sure if HTML should bake that knowledge in. fyi @aeschli when moving html out to an extension

FYI, I was able to hack this ability in by modifying the resources\app\extensions\javascript\package.json file. Look for the mimetypes array, and add in text/babel. I used it to add in "text/msx;harmony=true" for mithril msx syntax (FYI to @insin).

This hack breaks with the new 1.6.1 release (downgrading to 1.5.2 still works). I believe it's now controlled by a combination of the two regexes in extensions/javascript/syntaxes/JavaScript.tmLanguage.json and extensions/html/syntaxes/html.json.

Exactly, coloring of HTML is now done via TextMate. Here is for exampel how the HTML TM language embeds JavaScript. it also references css, python, etc.
https://github.com/Microsoft/vscode/blob/master/extensions/html/syntaxes/html.json#L180

I changed this line in C:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\html\syntaxes\html.json
"begin": "(?:^\\s+)?(<)((?i:script))\\b(?![^>]*/>)(?![^>]*(?i:type.?=.?text/((?!javascript).*)))",

to
"begin": "(?:^\\s+)?(<)((?i:script))\\b(?![^>]*/>)(?![^>]*(?i:type.?=.?text/((?!javascript|babel).*)))",

to get text/babel to work.

We use https://github.com/textmate/html.tmbundle as grammar for HTML.
Please file a pull request there. Ping me if the update is in there. I'm happy to update our grammar then.

For reference on macOS you need to right-click > Show package contents in your Applications folder then browse to /Contents/Resources/app/extensions/html/syntaxes/html.json
Then find where it says (javascript|ecmascript) in the file and change it to (javascript|ecmascript|babel)

authors: aeschli alexandrudima arntj chaunax pdonald phocks

repo: Microsoft/vscode


text:
Markdown "open preview" button should open to the side, when cmd+click

The git 'switch to editor view' button does this.

I forgot why but maybe @jrieken knows why we settled on Alt click.

It is Alt+Click as in alternative click

Ok, but why should it be different than the cmd+click for 'switch to editor/diff view' to the side, and cmd+click/cmd+enter to open a file from quick open in a new editor group? And how could I have discovered it?

Unsure if there is a difference in discovering cmd or alt? The cmd+click behaviour seems to be inspired by browser which usually open a new tab/window when cmd+clicking on something. The menu item story is inspired by the mac menus which update when clicking alt. The one is a modification/params to a command where as the other is an alternative command (different icon, label etc).

authors: bpasero jrieken roblourens


text:
Running multiple cmd tasks in tasks.json seem too mutually excluce themselves

Hi, I'm creating a build task to run tsc to get compilation errors and tslint to see the warnings I've got defined for project. I just can run one task at a time, if I put isBuildCommand to more than one task only the first seems to be executed.
Note: I also have TSLint extension by egamma

VSCode Version: 1.7.2
OS Version: Windows 10

Steps to Reproduce:

Use the following tasks.json:

{
    "version": "0.1.0",
    "command": "cmd",
    "isShellCommand": true,
    "showOutput": "always",
    "args": [
        "/C"
    ],
    "tasks": [
        {
            "taskName": "Build Type Script",
            "suppressTaskName": true,
            "isBuildCommand": true,
            "args": [
                "tsc -p ."
            ],
            "problemMatcher": "$tsc"
        },
        {
            "taskName": "tslint",
            "suppressTaskName": true,
            "isBuildCommand": true,
            "args": [
                "tslint src/**/*.ts{,x} --project tsconfig.json && tslint src/**/*.ts{,x} --project tsconfig.json"
            ],
            "problemMatcher": {
                "owner": "tslint",
                "fileLocation": [
                    "relative",
                    "${workspaceRoot}"
                ],
                "severity": "warning",
                "pattern": {
                    "regexp": "^(\\S.*)\\[(\\d+), (\\d+)\\]:\\s+(.*)",
                    "file": 1,
                    "line": 2,
                    "column": 3,
                    "message": 4
                }
            }
        }
    ]
}

Do ctrl+shift+b

Depending on the order of the tasks I just see errors (tsc) or warning (tslint)

Is this a bug or it's just the way it works for now?

You may be able to run multiple commands in parallel depending on your shell and os, for example by using &!. So my workaround was to launch a single watching build task such as npm run dev which calls npm run dev:client &! npm run dev:server and it works nicely.

Thanks for the suggestion, I just saw you could specify multiple paths with tslint instead of &&. My problem is that using "isBuildCommand":true I just can run one of the tasks not both :(

@UncleFirefox this is a know limitation right now. You can only run one command at a time hence only one tasks is started if you press Ctrl+Shift+B.

Dups #981 & #1167.

authors: UncleFirefox dbaeumer plievone


text:
Can't edit a file with very long line

Eg.  a javascript file which is compressed.   When trying to type any letter, vscode changes into no response, while TextWrangler can do the editor job very well on this file.
OS: mac osx10.11.2,   vscode:0.10.6,  file size: about 1.6M

@ccimage Can you please share the file with me or point me to a similar file that reproduces the problem?

Please reopen or file another issue with more information such that we can attempt to reproduce.

authors: alexandrudima ccimage


text:
Cursor becomes invisible

VSCode Version: 1.9.0
OS Version: macOS 10.12.3

Steps to Reproduce:

Switch between tabs.

When switching between tabs, the editing cursor becomes invisible. I can usually get it to show up again if I select some text, but even that sometimes doesn't work. I tried setting "editor.disableMonospaceOptimizations" to true, as mentioned in the release notes, but VSCode insists that it's not a valid option (and it doesn't seem to help, anyway).
Happy to provide more information if needed!

@zhaytee Can you please add a screen recording of the issue (a gif) ? (i.e. how do you switch between tabs, via mouse or keybindings, how do you select some text, via mouse or keybindings, etc. -- there are many ways to do the same thing that would become immediately obvious with a screen recording)
Also, can you please include your settings.

@alexandrudima Here's a screencap clearly demonstrating the issue. It only started happening after I installed 1.9, BTW.

My settings:
{
    "editor.fontFamily": "Input Mono",
    "editor.fontWeight": "400",
    "editor.fontSize": 15,
    "editor.autoClosingBrackets": false,
    "editor.quickSuggestionsDelay": 500,
    "editor.cursorStyle": "block",
    "editor.renderWhitespace": "boundary",
    "editor.renderControlCharacters": true,
    "window.newWindowDimensions": "maximized"
}

@zhaytee
Thank you for the extra info. It is the block cursor issue reported at #19808.
A fix will roll out with the upcoming 1.9.1 release, and a fix is already in the insiders channel.

Ah, okay! Thanks. 👍🏼
Joe

On Feb 7, 2017, at 7:08 AM, Alexandru Dima notifications@github.com wrote:
@zhaytee
Thank you for the extra info. It is the block cursor issue reported at #19808.
A fix will roll out with the upcoming 1.9.1 release, and a fix is already in the insiders channel.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

authors: alexandrudima zhaytee