text:
Imported classes aren't recognized as types in --checkJs

TypeScript Version:  2.3.2
Code
test-externclassdef.js:
class Foo {
  constructor() {}
}

exports.Foo = Foo;

test-externclass.js:
const {Foo} = require('./test-externclassdef');
const Stuff = require('./test-externclassdef');

/** @type {Foo} */
let a = new Foo();

/** @type {Stuff.Foo} */
let b = new Stuff.Foo();

Expected behavior:
No error
Actual behavior:

test-externclass.js(5,12): error TS2304: Cannot find name 'Foo'.
test-externclass.js(8,12): error TS2503: Cannot find namespace 'Stuff'.

It's possible I'm forgetting something I need to do, but I can't find any documentation on how this is supposed to work.
At the very least, these error messages are very uninformative. TypeScript clearly recognizes Foo as a class, because the next line doesn't give an error.

Duplicate of https://github.com/Microsoft/TypeScript/issues/14056

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

authors: Zarel mhegazy

repo: Microsoft/TypeScript


text:
factory: getLeftmostExpression needs to handle more kinds

TypeScript Version:  3.0.0-dev.20180621

Search Terms:
Code
import * as ts from 'typescript';
const n = ts.createStatement(ts.createAsExpression(ts.createObjectLiteral(), ts.createTypeReferenceNode('any', undefined)));
ts.createPrinter().printNode(ts.EmitHint.Unspecified, n, ts.createSourceFile('dummy.ts', '', ts.ScriptTarget.Latest));

Expected behavior:
({} as any);
The same applies to NonNullExpression.
Actual behavior:
Invalid code, this is a syntax error: {} as any;

PRs welcomed.

I'm surprised we're even making transformations with the printer. Are you sure you're not running this through a transform first?

@DanielRosenwasser the printer doesn't do anything special here. It's the factory function (in this case createStatement) that adds parentheses if necessary. Except for the example above where no parens are added.
Instead of using the printer, one could also just use isParenthesizedExpression(n.expression)

Gotcha, thanks!

source: gharchive/issue

authors: DanielRosenwasser ajafff mhegazy

license_type: permissive

license_source: github-api


text:
Inconsistent errors when assigning to property with index signature on object vs function

TypeScript Version:  3.1.0-dev.20180823
Code
interface Idx {
    [key: string]: number;
}

interface Obj {
    idx?: Idx;
}
const l: Obj = {};
l.idx = {}; // Works

interface Fn {
    (): void;
    idx?: Idx;
}
const fn: Fn = () => {}; // Error: `{}` not assignable to `Idx`
fn.idx = {};

Expected behavior:
No error.
Actual behavior:
src/a.ts:15:7 - error TS2322: Type '{ (): void; idx: {}; }' is not assignable to type 'Fn'.
  Types of property 'idx' are incompatible.
    Type '{}' is not assignable to type 'Idx'.
      Index signature is missing in type '{}'.

Discovered in koa-morgan on DefinitelyTyped. Probably due to #26368.

Thanks, should have tested against master.


text:
Cannot index generic type with string/keyof union

TypeScript Version: 3.2.0-dev.20181115

Search Terms:
"cannot be used to index"  union keyof
Code
function func<T>(
    t:  T,
    parameterStr: string,
    parameterKey: keyof T,
    parameterUnion: string | (keyof T),
) {
    console.log(t[parameterStr]);
    console.log(t[parameterKey]);
    console.log(t[parameterUnion]);
}

Expected behavior:
No error
Actual behavior:
Type 'string | keyof T' cannot be used to index type 'T'.
Playground Link:
Link
Related Issues:
#23618

This is working as intended. In --strict mode, all but t[parameterKey] are errors because an indexed access T[K] is permitted only if K is known to be assignable to keyof T, and string is not.
The reason you don't get an error on t[parameterStr] in the default non-strict mode is that we allow any object to be indexed with a string, producing a value typed as any. This is legacy behavior and becomes an error in --noImplicitAny mode (which is turned on by --strict).

authors: WiseBird ahejlsberg


text:
How to generated typed ast?

TypeScript Version:
1.8.9
Code
Based on Using the Compiler API, to generate an AST, use createSourceFile like this:
// A self-contained demonstration of the problem follows...
ts.createSourceFile(<filename>, <file content>, ts.ScriptTarget.ES6, true)

What gets generated appears to be an untyped AST, i.e. the .type field only gets filled if it's declared explicitly in the source code.
What I'm looking for is to generated the typed AST, i.e. having the sources being loaded and typed-checked.
How can I do that? Thanks.

.type on an AST node represents the type declaration. i.e. T in  var x: T.
What you are looking for is the type of a symbol, and to get to these you need to ask the TypeChecker using something like TypeChecker.getTypeAtLocation(node).
you can find more examples for these in the services file like https://github.com/Microsoft/TypeScript/blob/b0584b58fa07ee8c06e6d6f0f1bce2d4c37c7640/src/services/services.ts#L4183

authors: mhegazy yinso


text:
emit templory vars at the top of the scope

Fixes #23732
looks a easy fix
but something need to consider: some temporary variable has swapped and name has changed

is that my fault?

why travis-ci fault again😂

what ~the hell~ is that ci test

source: gharchive/pull-request


text:
BigInt support

Fixes #15096.
Additions:

The bigint primitive type, which is analogous to but distinct from number
Parsing of bigint literals, e.g. 123n. Per the ECMAScript proposal, literals can be expressed in binary (0b), octal (0o), hex (0x), or decimal formats. bigint literals, like number or string literals, are valid types. The config option experimentalBigInt must be set in order to use bigint literals.
Arithmetic operators work on bigint values and return bigint results
Updated the return type of the (JavaScript) typeof operator to include "bigint"
esnext.bigint lib file, which defines BigInt, BigIntConstructor, BigInt64Array, and BigUint64Array and adds *int64* methods to DataView
Three tests: parseBigInt to test parsing bigint literals, numberVsBigIntOperations to test that arithmetic operations accept and return the correct types, and warnExperimentalBigIntLiteral to test that using bigint literals without the --experimentalBigInt option throws an error

Notes:
bigint is now a reserved word.
The type of arithmetic operations with any types, e.g. <any>1 * <any>2, was left as number instead of changing it to the more accurate number | bigint in order to maintain compatibility. Binary arithmetic operations are not allowed on operands of number | bigint type because it is possible that their runtime types conflict.
Error messages referring to the type of arithmetic operands were updated, as was the type of typeof expressions, which required updating many reference baselines. Other than that, no existing tests' expected behaviors were changed.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: calebsander sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

The lint is failing because tslint doesn't know about the esnext.bigint library. Seems like a chicken-and-egg situation: this push is needed to add the esnext.bigint library, but tslint needs to already have the changes in order to lint successfully.

Also not sure how to avoid running the bigint tests on versions of Node.js below 10, since they will fail to compile.

cool, a big work

It is actually only a ~1000 line change, ignoring the rebuilt LKG and the updates to the reference baselines. If you would prefer it broken up, I could do the following:

To avoid needing to rebuild the LKG in order to compile the compiler, type-alias bigint to number in the compiler code and convert all typeof x === "bigint" instances to typeof x as string === "bigint"
Push the esnext.bigint lib separately, since it is not currently being used in the compiler code

Let me know whether it would be better to do this as 2 or 3 pulls instead of 1.

I reverted the LKG for now and removed references to bigint in the compiler code. The compiler should emit the same JS, but its typings are not as accurate. Once the LKG is rebuilt with this code, 74fd6d3 should be reverted so that the compiler code has the correct types.

Ah, another general remark: It looks like your parse handles it, but you need tests of bigint literals of all shapes and sizes with various configurations of numeric separators. I'd just add new entries to the numeric separator tests, myself, since those contain all kinds of literals with numeric separators in them.

@mhegazy had mentioned that we should enable bigInt only under --experimentalBigInt compiler options flag.

What features would you imagine being restricted without the flag? Just bigint literals? The fact that typeof can return "bigint"? The bigint type keyword? Compiling the esnext.bigint lib requires the bigint keyword to be recognized, so if that is disabled without the flag, the tsconfig.json file will have to be modified in order to build the lib. I had issues with tslint failing on new options in tsconfig.json, so I'm not sure how that would work.
I'm not sure an experimental flag is necessary; no existing code should break with the change unless it is using the bigint identifier. I'm also not convinced "experimental" really makes sense; this doesn't seem like a feature whose behavior is likely to change.

What features would you imagine being restricted without the flag? Just bigint literals?

yes. basically any expression of type bigint should be flagged.
I should add that we want the error reported only once in a compilation to avoid noise.

I'm not sure an experimental flag is necessary;

The flag is not necessary for valid code generation. the flag is needed to inform the user that there is potential change in semantics that could happen in a future release. that is the same as decorators.
The alternative here is not to include this feature until it reaches stage 4.

Just chipping in from the sides.  While the proposal is at Stage 3, by TC39's definition, there is a risk of implementation challenges which can effect the spec.  For example, this behaviour isn't fully settled, while it unlikely to impact the TypeScript implementation, the flag is the only way to underline to users that it isn't fully baked yet and until it has an ES release there is a danger of how it gets aligned.  It should be ES2019 but...
For something like this, it feels fairly important to flag it until the proposal reaches Stage 4.

Sure, that makes sense. I already added the flag. It will warn on any bigint literals, or if it sees the bigint keyword. I think I've addressed all the comments on the PR, with the exception of TypeFlags exceeding 30 bits. I looked into trying to fix it by factoring out the literal flags, but it looks like there are hundreds of locations that would have to be updated. I would rather keep that for a separate PR. I think this PR should be ready to merge if there are no further comments.
The Node.js 8 Travis job seems to have failed on the last build because npm couldn't resolve the jake executable. Not sure what would cause that. Otherwise, the builds are all passing.

I already added the flag. It will warn on any bigint literals, or if it sees the bigint keyword.

I think we don't want to error in the keyword, just the literals. We don't want to error when the node .d.ts updates to use bigints in stats, for example - just on usages we won't be downleveling.

I think we don't want to error in the keyword, just the literals. We don't want to error when the node .d.ts updates to use bigints in stats, for example - just on usages we won't be downleveling.

That sounds right to me. in general we should not error in an ambient context any ways..

Hmm, it seems like the Travis build failure on Node 8 is due to jake not being installed in the node_modules cache, since it went away when I removed the cache field from .travis.yml. Not sure what can be done to fix that, but I don't think there is any problem with the PR code.

Also need testcase for usage of bigint literals, type and BigInt() when esNext and when less than esNext with and without experimentalBigInt

Also need testcase for usage of bigint literals, type and BigInt() when esNext and when less than esNext with and without experimentalBigInt

experimentalBigInt and "target": "esnext" vs. pre-esnext are currently orthogonal options: experimentalBigInt controls whether errors are raised on bigint literals, whereas target only affects whether the esnext.bigint lib is included. Regardless of both options, bigint can be used as a type without raising any errors. (I'm not sure whether it makes sense to allow the bigint keyword without experimentalBigInt, but I think it should behave the same in ambient and non-ambient settings. I think @weswigham's point about not throwing errors just because @types/node is included is really more about included libraries vs. user-written code than about ambient vs. non-ambient contexts.)
The parseBigInt and warnExperimentalBigIntLiteral tests already verify the behavior of the having experimentalBigInt set and unset. I added tests verifying the behavior of variables and types declared in esnext.bigint with and without "target": "esnext", including the non-primitive resolution of bigint (to BigInt with "target": "esnext", and to {} without esnext).

So, question raised in #26330 - should bigints be allowed to index objects/arrays (probably?) and in that case, shouldn't they just be treated as numbers (since they have the same string representation)? And should such an addition affect the base keyof (eg, should keyof's constraint be string | symbol | number | bigint)?

Hmm, seems like kind of a slippery slope. Any value can technically be used as a key in JS, since any value can be converted to a string representation:
const a = {}
a[new Date] = 'abc'
a[function abc() {}] = 'abc'
a[[1, 2, 3]] = 'abc'
console.log(a)
/* Prints:
{ 'Fri Aug 10 2018 11:50:27 GMT-0700 (Pacific Daylight Time)': 'abc',
  'function abc() {}': 'abc',
  '1,2,3': 'abc' }
*/

I think key types only include number because there are several builtins (Array, TypedArrays, etc.) which are meant to be indexed with numeric indices. All of these can technically be indexed with bigint indices as well, but that is only because the bigint gets converted to its string representation first. This There are no instances in the standard library of types expressly indexed by bigint. I can't think of any situation in which a user-defined type would want to have a bigint index either. You could also always just declare it as a string index and then convert the bigint to a string before using it as an index. So I would probably lean towards not including bigint as an index type.

Agreed with @calebsander on https://github.com/Microsoft/TypeScript/pull/25886#issuecomment-412175959 where in we shouldn't include bigint in number signature. BigInt shouldn't affect signature (or keyof at all).

Alright, I'm fine with that - just wanted to bring it up. Also should probably add tests to document that we do error on such uses.

Just as a tip @calebsander, some of your commits aren't associated with your account. You may want to update your email addresses with GitHub.

@sheetalkamat you wanna help guide this to a merge for the next release?

@calebsander care to sync with master?

Synced.

Thank you @calebsander for this contribution. It should be available in tonight's nightly build.

Hey @calebsander, I just updated to the Nightly and now I am having TSLint issues, but it is compiling correctly. What were the flags to remove the warnings again? I think I noticed that you deleted them, or removed them.

I'm not sure what is required for TSLint to work, but for tsc to succeed you should only have to set "target": "esnext". This will prevent warnings for BigInt literals and include the esnext.bigint standard library declarations. The developers removed the experimentalBigInt flag; it's now indicated by setting the target version.

"esnext.bigint", where would I find these?
Thanks.

I do have my target already set at esnext, still not fixed on Atom or VS Code.

You need to set vscode to use your workspace version of typescript and install the @next version in your workspace - this hasn't shipped bundled with the editor yet, and won't until after the 3.2 release in the coming few weeks.

"esnext.bigint", where would I find these?

This is just the declaration file that specifies BigInt, BigInt64Array, etc. If you click Go to Definition in VS Code on the BigInt constructor, it should take you to the esnext.bigint file where it is defined (which should be node_modules/typescript/lib/lib.esnext.bigint.d.ts). As @weswigham said, you have to make VS Code use your workspace version of TypeScript. This esnext.bigint declaration file is automatically included when you target esnext, but you can also include it manually by adding it to lib in your tsconfig.json.

Saviours, thank you. I hope your information will help the next person.

authors: DanielRosenwasser Kingwl calebsander joshuajbouw kitsonk mhegazy msftclas sheetalkamat weswigham


text:
Build better import paths for declaration emit/typeToString from reexports if possible

Also, issue an error on relative/deep node_modules import generation (under moduleResolution: "node") if a better specifier cannot be found (which can happen if your type definitions need to depend on the types of a dependency of a dependency which you do not yet directly depend on). While such paths technically work on the compiling system, the resulting .d.ts file will be non-portable; this can cause issues for package consumers, so it is best to mark it as needing a type annotation to fix the problem.
Fixes #26985

@andy-ms you wanna look over this?

@rbuckton done.


text:
Add nullability annotations to core.d.ts and es6.d.ts

| null and | undefined where appropriate.

As expressed in the original PR, indexers do not have | undefined. I have added it to the ES6 collection accessors like Map.get however. I think that's better.

I haven't added | null or | undefined to functions that stringify their parameter and thus accept null and undefined, eg Symbol(null) is the same as Symbol("null"). It doesn't seem right to allow null just for that.

1. ES6's String.normalize's form parameter was typed as string - changed to union of string literals.
1. Map and Set methods that are specced to return this were not annotated as : this, changed accordingly.
I can split the changes into separate PRs if you want. I just fixed them as I came across them while doing the first one.
The other changes became too big and will be in another PR.
jake runtests passes.

thanks!

The other changes are in https://github.com/Microsoft/TypeScript/pull/7664

authors: Arnavion mhegazy


text:
Initial commit of Blog Application.

Docker Compose file
Dockerfiles for web and db services
web service source: http://dnbe.net/docs/

Verified on Windows 10 client and Windows Server 2016

Thanks for the feedback! Working on these updates now.

Updated with feedback. Validated on Windows 10.
Ready to merge

👍

authors: JMesser81 kallie-b scooley

repo: Microsoft/Virtualization-Documentation


text:
Added new SonarCloud lab

This new lab does not require any Azure resources and does not use the VSTSDemoGenerator (the sample source is imported from a GitHub repo).
This PR does not change any existing files, just adds a new readme and the support images.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: duncanp-sonar sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

authors: duncanp-sonar msftclas

repo: Microsoft/almvm

license: MIT


text:
Make debug port configurable

Make debug port configurable, for issue #394

Codecov Report

Merging #407 into develop will decrease coverage by 0.03%.
The diff coverage is 50%.

@@             Coverage Diff             @@
##           develop     #407      +/-   ##
===========================================
- Coverage    53.69%   53.66%   -0.04%
===========================================
  Files           67       67
  Lines         1879     1884       +5
  Branches       212      212
===========================================
+ Hits          1009     1011       +2
- Misses         802      805       +3
  Partials        68       68

Impacted Files
Coverage Δ

...a/com/microsoft/azure/maven/AbstractAzureMojo.java
56.58% <0%> (-1.35%)
:arrow_down:

...va/com/microsoft/azure/maven/function/RunMojo.java
85.71% <100%> (+1.09%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 84d132f...139be39. Read the comment docs.

repo: Microsoft/azure-maven-plugins


text:
NuGet Tool Installer

NuGet Tool Installer is not considering the proxy settings provided by the agent, thus if agent is behind a proxy it will fail.

After looking into the code I noticed that NuGet Tool Installer task uses vsts-task-tool-lib to download the necessary.  Starting with the version 0.4.1 of the vsts-task-tool-lib the necessary proxy settings are passed to typed-rest-client.
Still, however I do get the following error:
2018-06-18T05:54:20.7946286Z ERR:tunneling socket could not be established, cause=write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:794:
Any idea what this can be related to?

Seems that the issue is not in downloading the client but in getting the list of the available versions.
At this step in the code
https://github.com/Microsoft/vsts-tasks/blob/fa0cf7029e6ccc95f4d61da2e179e9fa4d128536/Tasks/Common/nuget-task-common/NuGetToolGetter.ts#L128
a new instance of RestClient from typed-rest-client module is created. However, although it supports handling proxy settings, those are not passed in. This seems to be the problem.

I'm trying with the following change:
async function getLatestMatchVersionInfo(versionSpec: string): Promise<INuGetVersionInfo> {
    taskLib.debug('Querying versions list');

    let versionsUrl = 'https://dist.nuget.org/tools.json';

    const proxy = taskLib.getHttpProxyConfiguration();
    const options = proxy ? { proxy: proxy, ignoreSslError: true } : undefined;

    let rest: restm.RestClient = new restm.RestClient('vsts-tasks/NuGetToolInstaller', null, null, options);
    //let rest: restm.RestClient = new restm.RestClient('vsts-tasks/NuGetToolInstaller');

Unfortunately I can't get it to work. Any suggestion is welcome.
Following the output that I get in case of the above change:
2018-06-18T11:28:58.0640428Z ##[debug]Querying versions list
2018-06-18T11:28:58.0640943Z ##[debug]Agent.Version=2.131.0
2018-06-18T11:28:58.0641435Z ##[debug]Agent.ProxyUrl=http://myproxy:8090
2018-06-18T11:28:58.0642077Z ##[debug]Agent.ProxyUsername=undefined
2018-06-18T11:28:58.0644087Z ##[debug]Agent.ProxyPassword=undefined
2018-06-18T11:28:58.0644608Z ##[debug]Agent.ProxyBypassList=[".*?.some.net",".*?.intranet"]
2018-06-18T11:28:58.1228329Z ERR:Invalid Resource
2018-06-18T11:28:58.1228994Z ##[debug]task result: Failed

@brcrista @emanuelquintero any ideas?

@keithrob -- @mmajcica is referring to change #7435 we made to Download Secure File and is trying to get the same thing to work here.

@bryanmacfarlane @brcrista Are there any updates on this one?

@keithrob can update

@mmajcica,
We are planning on comprehensively fixing all of the proxying problems with the NPM, NuGet and Dotnet tasks for TFS2019.  Earlier, TFS users can use older versions of the tasks which are not susceptible to these problems.

@keithrob
Please fix this particular problem with proxy and do not wait for general fixing as part of TFS2019 mentioned above. We're trying to use Azure Pipelines in corporate environment and this problem blocks us totally.

@NenoLoje Azure DevOps Server 2019.1

What can those of us that are still on TFS 2018 do about this issue? Is there some workaround for us or we are just left on a side until we can convince the company to make the upgrade to DevOps 2019?

You can manually acquire the version of NuGet.exe you wish to use and put it on the private agent(s) in a folder that's on the PATH.

@NenoLoje Azure DevOps Server 2019.1

What can those of us that are still on TFS 2018 do about this issue? Is there some workaround for us or we are just left on a side until we can convince the company to make the upgrade to DevOps 2019?

You can always push the new version of the task manually to your server. It is not advised by MS but it works as for any other task. Clone the repo, build the task and with tfs-cli push it to your instance of TFS.

Awesome! Thank you @mmajcica !!

"These tasks are now proxy-compatible."
Sort of. They are not CA cert compatible, i.e. they will not work in a corporate environment.
Does not seem to be a priority.

authors: CesarD alexmullans brcrista bryanmacfarlane keithrob mmajcica vonj vstribrny

repo: Microsoft/azure-pipelines-tasks


text:
Edit data creates a new row by default when there are no existing rows in a table

SQL Operations Studio Version: master

Steps to Reproduce:

Open edit data for a table with no rows

Expected behavior: The blank row to add a new row is the only row visible
Actual behavior: The blank row to add a new row is visible underneath a new row that gets created automatically
This is a minor bug since the new row doesn't actually get saved unless you put in any data, but it can be misleading since it makes it look like it's an existing row

The issue has been fixed

authors: MattIrv alanrenmsft

repo: Microsoft/azuredatastudio


text:
Kenvh/editdatatabname

edit data was escaping the doc URI - this isn't necessary.  The SMO code is doing necessary escaping for scripting functions.
This change removes the escaping so that the tab has a clean name and refactored slightly the code used to create the editor names.

CI failure is unrelated to changes


text:
Cannot write intercepting middleware

Due to PR #118, it appears we can no longer write middleware that "intercepts" a message from the user (ie: doesn't call await next())
The easiest example is:
public class Interceptor : IMiddleware, IReceiveActivity
{
    public Task ReceiveActivity(IBotContext context, MiddlewareSet.NextDelegate next) => Task.CompletedTask;
}

because the above Middleware implementation doesn't call await next(), the hosting Bot's OnReceive should never be hit; however it will be.
cc @cleemullins @billba @ryanvolum

@brandonh-msft and I have been writing the same middleware in both SDKs.
In the node SDK, this works to intercept messages:
export class TestMiddleware implements Middleware {
    public async receiveActivity(context: BotContext, next: () => Promise<void>): Promise<void> {
    }
}

As expected, not returning next effectively keeps the message from propagating through the rest of the middleware/bot logic, so a bot that uses this middleware is completely unresponsive.

You can write Intercepting Middleware that manipulates the incoming Activity. You just can't currently PREVENT OnReceive from being called.
This is by design. The design may be incorrect, and if so we can change it. I'm open to how folks think this should work.
Current behavior is:

Middleware is run. If Middleware calls next(), then then goto 1 until we're all done.
Once All Receive Middlware is run OnReceive is called.

If I understand correctly you are asserting the following should be true:

If ALL Receive Middleware is run, and ALL of it calls next(), then (and only then) should OnReceive be called.

Is that accurate?
I'm not clear on what the behavior should be, as I can make a case either way.

After a quick consult with @tomlm @stevenic they both believe (as do you) that the following behavior should be what we have:

If ALL Receive Middleware is run, and ALL of it calls next(), then (and only then) should OnReceive be called.

right; and that matches up with what the Node SDK is currently doing as @ryanvolum highlighted.

By intercept messages do you mean prevent them from being sent to the user? @brandonh-msft

@brandonh-msft I'll probably get this taken care of late tonight or tomorrow.

@RyanDawkins I mean you get a message from the user and your Middleware can do something that usurps the rest of the dialog flow of the bot (ie: everything that would've run as defined in OnReceive)

@RyanDawkins This also means that the message doesn't flow through the following middleware of that pipe. This is to say that if you don't return next in receiveActivity, no other receiveActivity middleware will be called, BUT postActivity middleware will be called.

One way to prevent postActivity from returning back is to do IList.clear() on the activities parameter. That is how we are stopping messages from going to the user so we can make a list of messages delay as if the user is typing.

That seems fine, though more generally not returning should stop propagation through that pipe

@RyanDawkins we actually have a 'delay' activity that will let you insert a delay between activities.
@ryanvolum definitely agree that next() should stop propagation. One work around for now would be to look at the responses queue and just no-op your bots OnReceive() handler if there are already responses queued up.

@Stevenic , about the workaround you mentioned in the previous message: isn't there a problem with the QnAMaker middleware by doing this? As this middleware is setting responses if there is a match in the QnA

@nrobert I haven't looked at the QnA Maker middleware implementation but i'm assuming it's currently designed to run on the leading edge of routing which is problematic in general.  QnA Maker can be a bit aggressive about answering queries so more often than not you'd want to run it as a fallback if nothing else answers.  With our latest middleware design you can do that but it looks like C# is currently missing a key addition that I made to the JS SDK to enable this.
You can code QnA Maker to run on the trailing edge of routing which means it will run after everything else has run but you need a way of knowing if the bot has already replied or not. You could look at the responses queue but that's not super reliable as it can get flushed (and it's going away soon) so on the JS side I added a read-only context.responded property you can check to see if any responses have been sent during the turn (it would be a great PR to add that to the C# side.)  Using this flag QnA Maker could conditionally decide to run only when nothing else has sent a message.

This is fixed by PR #146.
Tests around intercepting middleware have also been added into the test suite.
Test showing OnReceive slated to run.
Test showing OnReceive running when the Middlware pipeline is empty.
Test #1 showing an Intercepting Middleware.
Test #2 showing an Intercepting Middlware.

authors: RyanDawkins Stevenic brandonh-msft cleemullins nrobert ryanvolum

repo: Microsoft/botbuilder-dotnet


text:
Please provide API to automatically collect memory snapshots

Hey folks,
Please provide a functionality to automatically collect memory snapshot & save it to the given location.
While existing API to attach to the process (DataTarget.AttachToProcess) it allows on-fly investigation.
In other words, the code what to look for must be already developed.
While there are many scenarios where you do not know what you are hunting for during collection, like:
A) Random CPU spikes
B) Pool starvations
C) Hang API calls for no good reason
While a majority of those could be collected via ProcDump, here are the cases when not:

The exception happens on the build server you do not have much access to - you can collect artifacts
The offensive API hangs deep inside the shipped assembly you have no control over

Our builds are hanging on the build server once in a while. Since triggering build again fixes the issue in 99% of the cases, we want to figure out the cause.
Right now we are capturing call-stacks once in N minutes to track the bad guy.
In a few days we'll know which code & will have to adjust the clrMD part to log more data =\
It would be much better if there was a collect API to capture snapshot based on C# condition.
Thanks.

I try to not add too many "utility" like code and functions to ClrMD itself.  I don't think I want to own and maintain something like this in ClrMD, because doing this correctly is actually a lot of work and will be difficult to maintain long term.
I'm planning to split out some "helper" functionality into a side DLL where things like this could potentially go (tracked by https://github.com/Microsoft/clrmd/issues/203).  If you or someone decided to build code that does this I would consider adding it to this side library when it's created, but I don't plan to tackle this one myself, so I'm going to close the issue here.
Thanks for the suggestion though!

authors: leculver mitikov

repo: Microsoft/clrmd

license: mit

license_source: bigquery


text:
Add Training for Roles

Networking Engineers
Architects
Developers
DBA
SysAdmins
Storage

@corygstevenson what do you think would be the best way to implement this?

authors: cocallaw corygstevenson

repo: Microsoft/csa-misc-utils


text:
Add a new check to flag use of const enum in declaration files

const enums break single file compilation. we should add a check to flag them and make sure no new ones are added at least.

For reference, looks like that question was answered in Microsoft/TypeScript#20703

authors: andy-ms mhegazy

repo: Microsoft/dtslint


text:
Homepage design updates

I've made some adjustments with the goal goal of making the page more readable and easier to scan. It also has big numbers, which are more fun than small numbers.
Before

After

that's stellar!

authors: micahgodbolt mikewheaton

repo: Microsoft/frontend-bootcamp


text:
Implementations table is difficult to read

The table has no borders around its cells which makes the rows very difficult to read. Most things are obvious by their names but still...

I guess that got broken by adding additional servers. I added the borders back (done by removing an empty line)

authors: dbaeumer rcjsuen

repo: Microsoft/language-server-protocol


text:
Change log for 5.4.0-preview

Updated readme and install instructions as well

This change is

Coverage remained the same at 75.0% when pulling 85e5e563e085510cb50cc34364e5304130779ea7 on yitam:changeLog into e51380612db8a546c8869d3914fa54243ddbd0a3 on Microsoft:dev.

Codecov Report

Merging #848 into dev will increase coverage by 0.42%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##              dev     #848      +/-   ##
==========================================
+ Coverage   79.75%   80.18%   +0.42%
==========================================
  Files          25       25
  Lines        7396     7419      +23
==========================================
+ Hits         5899     5949      +50
+ Misses       1497     1470      -27

Impacted Files
Coverage Δ

...x86/php-7.1.21-src/ext/sqlsrv/shared/core_conn.cpp

...x86/php-7.1.21-src/ext/sqlsrv/shared/core_init.cpp

...php-7.1.21-src/ext/pdo_sqlsrv/shared/core_conn.cpp

...-7.1.21-src/ext/pdo_sqlsrv/shared/core_results.cpp

...c14/x86/php-7.1.21-src/ext/pdo_sqlsrv/pdo_init.cpp

...x86/php-7.1.21-src/ext/sqlsrv/shared/core_stmt.cpp

...ev/vc14/x86/php-7.1.21-src/ext/sqlsrv/php_sqlsrv.h

...phpdev/vc14/x86/php-7.1.21-src/ext/sqlsrv/conn.cpp

...x86/php-7.1.21-src/ext/pdo_sqlsrv/php_pdo_sqlsrv.h

...c14/x86/php-7.1.21-src/ext/pdo_sqlsrv/pdo_stmt.cpp

... and 40 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e513806...5080278. Read the comment docs.

authors: codecov-io coveralls yitam

repo: Microsoft/msphpsql


text:
Running Docker failing while creating HTTP download site

Hello,
While running the following command.
docker run -e ACCEPT_EULA=Y -e UseSSL=N navdocker.azurecr.io/dynamics-nav:2017
Getting below error.

Did anyone encountered this issue or any process to resolve this.
Setting up Docker on local laptop with Windows 10 Enterprise Edition Version 10.0.15063
Regards.
Mohammed  @@Anwar Shaikh

add a parameter -m 4G to your docker run if you are using Windows 10 - I will add this to the documentation.

added the parameter like this
docker run –m 4G -e ACCEPT_EULA=Y -e UseSSL=N navdocker.azurecr.io/dynamics-nav:2017
getting below error.

You probably need to delete whatever containers you have and retry
Docker ps -a
Will show you containers
Docker rm  -f
Will remove
/Freddy
From: anwar0206 [mailto:notifications@github.com]
Sent: 12. august 2017 21:44
To: Microsoft/nav-docker nav-docker@noreply.github.com
Cc: Freddy Kristiansen Freddy.Kristiansen@microsoft.com; Comment comment@noreply.github.com
Subject: Re: [Microsoft/nav-docker] Running Docker failing while creating HTTP download site (#17)
added the parameter like this
docker run –m 4G -e ACCEPT_EULA=Y -e UseSSL=N navdocker.azurecr.io/dynamics-nav:2017
getting below error.
[image]https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F17919266%2F29243757-01a7f6fa-7f75-11e7-94fe-63587ed5409c.png&data=02|01|freddy.kristiansen%40microsoft.com|5f6dfa6c13e6412fc90908d4e1ba7878|72f988bf86f141af91ab2d7cd011db47|1|0|636381638393026001&sdata=HE22nyi2kTEUbSFX4lJaIUQJRB0xilg1Vr3zHiVi%2Bhw%3D&reserved=0
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fnav-docker%2Fissues%2F17%23issuecomment-322001780&data=02|01|freddy.kristiansen%40microsoft.com|5f6dfa6c13e6412fc90908d4e1ba7878|72f988bf86f141af91ab2d7cd011db47|1|0|636381638393026001&sdata=SIepPnbrdaccKlaLY3XnCAQRUYto9kxDbRIjpzBuAhM%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKRqA3uVHiNVFt9Jn6_6uLMOa5GUrnuNks5sXgB7gaJpZM4O1feK&data=02|01|freddy.kristiansen%40microsoft.com|5f6dfa6c13e6412fc90908d4e1ba7878|72f988bf86f141af91ab2d7cd011db47|1|0|636381638393026001&sdata=9IE84NF57gJKS0%2FqudLw1EWAJyTTgKkZJsJfKifTnck%3D&reserved=0.

tried deleting all the containers, and executing the command. But getting same error.

Can you run docker info and post the output?

Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 3
Server Version: 17.06.0-ce
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: l2bridge l2tunnel nat null overlay transparent
Log: awslogs etwlogs fluentd json-file logentries splunk syslog
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 15063 (15063.0.amd64fre.rs2_release.170317-1834)
Operating System: Windows 10 Enterprise
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 7.902GiB
Name: Anwar
ID: J2DL:4IMC:HVU4:4HEC:MXUI:YWK4:637K:IV5D:HIRQ:DVX6:T6QW:UYME
Docker Root Dir: C:\ProgramData\Docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: -1
Goroutines: 43
System Time: 2017-08-12T16:27:23.2507591-04:00
EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

seems like a known issue: https://github.com/docker/for-win/issues/767. Can you retry with -m 3G?

thanks @tfenster for the information... -m 3G parameter worked....
Now the process has got stuck on
TimeGenerated : 8/12/2017 6:07:54 PM
EntryType     : Warning
Message       : Server instance: NAV
Category: Sql
ClientSessionId: 00000000-0000-0000-0000-000000000000
ClientActivityId: 00000000-0000-0000-0000-000000000000
ServerSessionUniqueId: 00000000-0000-0000-0000-000000000000
ServerActivityId: 00000000-0000-0000-0000-000000000000
EventTime: 08/12/2017 22:07:54
Message Threshold Trace Tag. Execution Time = 2767
milliseconds
Long Running SQL statement Task ID:8

ProcessId: 544
Tag: 000007S
ThreadId: 14
CounterInformation:
Is it normal, the process takes so long.

The process is still running almost 3 hours.... but showing
TimeGenerated : 8/12/2017 7:53:24 PM
EntryType     : Warning
Message       : Server instance: NAV
Category: Sql
ClientSessionId: 00000000-0000-0000-0000-000000000000
ClientActivityId: 00000000-0000-0000-0000-000000000000
ServerSessionUniqueId: 00000000-0000-0000-0000-000000000000
ServerActivityId: 00000000-0000-0000-0000-000000000000
EventTime: 08/12/2017 23:53:24
Message Threshold Trace Tag. Execution Time = 2113
milliseconds
Long Running SQL statement Task ID:9

ProcessId: 544
Tag: 000007S
ThreadId: 19
CounterInformation:

The Container main loop show all event log entries (Warnings and errors) by NAV and you might see some of these. The Long Running SQL statement will dump any SQL statement taking more time than a certain threshold.

authors: anwar0206 freddydk tfenster

repo: Microsoft/nav-docker


text:
Forking an child process throws an eaddrinuse exception when in debug mode

When running an nodejs app in debug mode and i want to fork an childprocess (child_process.fork(...)), i get an eaddrinuse exception.
I guess this happens because VS tries to attach the debugger to child process on the same port, which is currently in use by the main process.

Did you try running node --debug app.js in the command line? If you get the same result, the issue is with the code or node itself.

For the sake of need-more-info, I ran into the exact same issue when forking. I also ran node --debug app.js from CMD and received the same EADDRINUSE exception. This is as simple as it gets:
app.js
var fork = require('child_process').fork;
var forked = fork('./fork.js');

setTimeout(function () {
    console.log('finished');
}, 10000);

fork.js
console.log("test");

Hi,
i run the nodejs app from visual studio in debug mode. And when the run the forked child process i get the error.
regard Michael

Still trying to understand. If this happens regardless of whether you are running ntvs... Is there a reason to believe this is ntvs-related?

Closing this as external since it appears to be a node issue, but let me know if you think otherwise.

authors: mousetraps mprattinger rg1220

repo: Microsoft/nodejstools


text:
check the format/parameter type/value for yaml/json

something like http://www.yamllint.com/.

cleaning old issues,  @fanyangCS please help to evaluate whether this is still an issue, thanks.

As we will make a set of refine of web portal, closing the old low impact items and will plan the refine related work together with PAIExp Scrum Team.

repo: Microsoft/pai


text:
Add Keras Capsule Network Implementation

Keras implementation of NIPS 2017 Paper: "Dynamic Routing Between Capsules"
Train a simple Capsule Network on the CIFAR10 small images dataset.
Code ported from Keras examples
Test passed on local Windows machine with VS 2017
ENV: Python 3.6.3, Keras 2.12, Tensorflow 1.4.0
Screenshot:

LICENSE: MIT

Good job, thanks!

authors: TobeyQin mtobeiyf

repo: Microsoft/samples-for-ai


text:
Updates?

I was just wondering if there was a time frame for getting Service Fabric for Windows open sourced? If I've missed something obvious, apologies.

They should forget this thing. So still have to wait!

repo: Microsoft/service-fabric


text:
[beast] Update to version 59

Version 59:

Integrated Beast INTERFACE (cmake)
Fix base64 alphabet
Remove obsolete doc/README.md

API Changes:

Change Body::size signature (API Change):

Actions Required:

For any user-defined models of Body, change the function signature
to accept value_type const& and modify the function definition
accordingly.

Thanks!

authors: alexkaratarakis vinniefalco

repo: Microsoft/vcpkg


text:
Future F# project system

Since project.json is off the table and https://github.com/dotnet/roslyn-project-system is the new rising star, I wonder what the plans for F# are. The new project system only talks about C# and VB. How can F# fit into the picture given that this language has a bit different requirements?
/cc @davkean @enricosada @kevinransom @isaacabraham @dsyme

@forki
My 2 cents:
I think it's better to use the roslyn model of CPS, as I already commented my original suggestion to use CPS in #913 and #804. It will be trend or "roadmap" in the managed programming language space in Visual Studio, because it's used for the roslyn's project system in VS "15" and I believe managed C++ and native C++ will follow.
As far as I know, this CPS is somehow incompatible with MPF/SPS model, and I hope Microsoft will provide clear roadmap on this.
Also using CPS might have impact on existing F# tooling, including current F# project system.

It's still very early on the project system side, but we've done a little bit of investigation on the CPS to side (which is not open source) to figure out what it would take to support F#. Explicit file ordering isn't yet supported, but we believe we could add the right extension points to enable it. However, I think the most important thing to focus on, is the move to the Roslyn workspace model (https://github.com/Microsoft/visualfsharp/issues/913) - this would mean that the majority of the shared layer between C# and VB could be just reused for F#.
Are there are requirements that F# has that above and beyond language service/file ordering? It would be great to identify those early.
a little bit of investigation on the CPS to see what it would take to support F# goals, such as file ordering. We believe it's possible

@davkean I think that's the only real extra feature. The ordering can interact with folder support so you have to be a bit careful there (Visual F# Power Tools does a pretty good job of this).
Various project system features can require the results of code analysis (e.g. features that inject or adjust code, like the WinForms or WPF designers) - for F# these might indeed come from the Roslyn workspace implementation (basically implemented on top of FSharp.Compiler.Service results).
Open sourcing this work would of course be awesome.

To clarify, while CPS (Common Project System) isn't open source, the C#/VB layer on top is: http://github.com/dotnet/roslyn-project-system. Any F# implementation, I imagine, would naturally be open source.

FSharp will likely move to CPS for it's project System.  We don't yet have a schedule for it's implementation but we are confident it will happen.

@KevinRansom silly question maybe, but how will this affect other (non-VS) tooling?

@isaacabraham How do you mean?  Like Emacs, VSCode, Atom etc?  Or VFPT?

The former.

I guess @isaacabraham's question is to know if parts of Roslyn workspace will be reusable for other editors or if those will be tightly coupled to Visual Studio?
Is Roslyn workspace actually something which can live outside Visual Studio?
Are there longer term plans in terms of evolution on top of FCS and how it is integrated with Roslyn workspace (I assume indexing of symbols / locations in a language agnostic way)?

@smoothdeveloper @isaacabraham I don't think any of this has been decided.
Basically as far as I can see the story is very simple:  implementing Roslyn Workspaces is necessary to put the Visual F# Tools on the same modern engineering path as the rest of the Managed Languages Team. It also seems like it will be very useful precursor to modernizing the Visual F# Tools project system too.
So that's why the Visual F# Tools team are doing it, and that's the full explanation.
Whether the F# Roslyn Workspaces implementation then gets a useful life outside of that context is TBD - there's no master plan beyond the above.  Certainly it won't hurt to have the implementation around at high quality and it will almost certainly be useful in some form.  But let's get to square 1 first.

@dsyme my main point was that we don't make decisions on the project system / format that couples us to reliance on VS-specific tooling.

@isaacabraham In terms of formats I don't think there's any danger of that.

Great - then I have no concerns :-)

I've heard there are plans at MS to introduce upcoming project.fsx across whole dotnet eco-system :smile:

Regarding the longer term target of getting on CPS, @KevinRansom mentionned (#2400) that CPS explicit ordering isn't not yet on the radar on the owners of CPS.
Can we workaround that fact in a simple maner: have a pages in project properties where files can be ordered for compilation. We would display the actual physical file structure in solution explorer but the compilation order can be arbitrarily defined under that page.
The thing is that with current VS project system, you also can't have interspersed files in repeted folders (not that it is a great layout), while the command line tooling, I assume, supports that.

The current F# project system, builds the project and submits the files to the compiler in the order they are specified in the project file.  The presence of folders does not impact that .... although authoring that is a bit tricky.
the problem that CPS gives us right now is that loading an F# project with the files in the right order, would immediately sort them into alphabetical ordering.  If the project is then saved ... then it wouldn't even build from the command line.
The main advantage of using the CPS project system, is that we can leverage all of the Roslyn workspaces knowledge that is built on top of CPS for C# and VB.  We don't really want F# projects to be in any way weird ... so we need the bug fixed.  Anyway .... I am working on the pressure to get it fixed, it's not like I haven't worked with the CPS guys before .... they know me quite well.

CPS won't reorder via the virtue of saving a project. CPS only manipulates pieces of the project that have changed, so manipulating of items (such as excluding, or adding an item) via the Solution Explorer will cause issues. It won't, however, change the order of the other items.
Given that we let you manipulate the project file - early bits could just let you manipulate via the project file while it's loaded, until the F# tools team works with CPS to get the right extension points in CPS to enable F# scenarios.

Another thing, while the project tree itself is sorted alphabetically - the MSBuild items that are passed to components (such as language service, etc) are not, and appear in the order they were specified.

@KevinRansom /@davkean thanks.
Although having the display order "messed-up" (plain alphabetical/file system structure) would be confusing, assuming the order in fsproj remains stable (that requires some amount of logic in F# project system handling) it seems having a separate windows with ability to see / edit order for the project would be a good first milestone, not for release but to get a CPS prototype working.
It would be easier with such prototype for people interested to start looking at CPS and further things that can be implemented on top, while also providing useful feedback for Microsoft teams to figure out issues.
Are there specific things about linked items (link to files in project, not matching physical location)? I know current VF# solution uses those a lot.

@davkean I thought the IVSHeirchary determined the ordering of the constructs in the solution explorer. Couldn't a command handler/service provider be written to propagate the changes between the solution explorer and the fsproj parallel to the CPS functionality? iirc all of the project content for CPS is stored in hashsets so changes in ordering shouldn't effect it right? It'd be like the current FSharpFolderNode and its respective functionality only setup on its own and restricted to ordering.

IVsHierarchy determines the ordering of constructs in Solution Explorer, it however, is just a wrapper around CPS's (physical) IProjectTree, which itself is just a consumer of data coming from the project file, the same data that the language service consumes. In CPS (and unlike other project systems) Solution Explorer is just a by-product of changes in the project file. When you add a file to Solution Explorer, we really just manipulate the in-memory project file, publish that data and a bunch of components react, one of them being the Solution Explorer/IProjectTree.
Because of above, a service that propagates between Solution Explorer and the fsproj - isn't at the right layer. Solution Explorer isn't the source of truth, the source of truth is the project file. Solution Explorer is just a read-only view of it.
I think we'd be better off adding a couple of extension points at a couple of CPS layers that 1) let's you control the order things are displayed in Solution Explorer and 2) one that lets you control the order in which items are persisted in the project file.

@davkean cool, is a netcore release of the Microsoft.VisualStudio.ProjectSystem and  Microsoft.VisualStudio.ProjectSystem.Managed on the horizon too?
I've been working on a netcore fsharp workspace as part of an xplat tooling backend for all of the non VS editors and being able to couple that with the host-agnostic CPS layer seems like it'd be very useful (or am I misguided about that?)
It'd probably be pretty useful for Omnisharp too.

Yeah, we've had the same thoughts. Right now, we're not in a state that consumable outside of VS (though it already has a VS and non-VS layer), it's also not open source. Baby steps though...

Sorry if these seems an obvious question but I couldn't find an answer (https://github.com/Microsoft/visualfsharp/issues/1095) that I could be certain of anywhere. Will VS F# 2017 support folders thanks to being on Roslyn workspaces? Sorry again for the dumb question.

@chaotic-butter No, currently VS 2017 will not support folders in the project system for F#, at least not at release.  Perhaps folder support could come into play in a future update, but there aren't any plans for that specific feature.

Oh ok, thanks. What's the recommended way to use folders in an F# project?

@chaotic-butter Unfortunately there is no ideal answer. In VS2015 you can install the Visual F# Power Tools and use the Folder organization feature , however this has some limitations, and at the moment the Visual F# Power Tools are not compatible with VS2017 and I am not sure what the plans are. Another possibility would be to install Forge and use a combination of features from the command line, but this also has its own limitations. The traditional approach and the approach I keep finding myself coming back to -- and I suspect most others as well -- is to edit the fsproj file by hand in combination with working with the file system directly.

@cartermp This is going to be a bit long winded but I really think that folder support is more important than what seems to have become the status quo.
With every interaction where I introduce F# to an individual, I become more and more convinced that lack of full support for folders in tooling really does hurt impressions. Regardless of how interesting an individual finds the features of F#, the lack of normal folder support (something which people didn't even consider a "feature" until they came across F#) can't help but be seen as a commentary on quality and completeness, even if technically it does not have anything to do with the language per se.
Now, I recognize and really appreciate the work that has gone into the Visual F# Power Tools, however, the maintainers themselves say the following about the "Folder organization" feature:

This feature is disabled by default. Because there are known issues with F# Project System in Visual F# Tools, folder organization may not work 100% correctly in all cases. We do not advice you to introduce complicated folder structure within F# projects. You should keep number of folders within your project as low as possible.

I also know that there are points to be made on how code organization in F# is different from other languages, but when you try to stretch that argument to rationalize why someone considering F# might not need folders, it is basically like telling them that limited folder support is intentional so that they don't create too many folders...but this rationalization is pretty transparent and does not hold water with most people I interact with.
File and folder management is such a basic part of editing code and it keeps coming up again and again. Yet because it is not a big obstacle for the more capable F# developers who tend to be the more active community members, it does not resonate as much in the various channels that the community uses to communicate and therefore the impression is that it is not that big a deal and that whatever methods to deal with the issue that exist at the moment are sufficient. But for many who are new to F#, my impression is that it IS a big deal but that they will walk away from the language before reaching a point where they feel comfortable making their thoughts heard within the community, or they will suffer in silence until they too become as proficient in working around folder support limitations because they believe that speaking up will highlight their inadequacy as an F# developer, because after all "no one else of any note is saying anything".
But if you dig deep you will find that there is a long and consistent trail of this being an issue. This has come up in so many other forums over the years that it is hard to track down all the times it has been discussed, but below are just a few examples:

https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/6077963-add-folders-for-visual-f-projects
https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/6077963-add-folders-for-visual-f-projects
https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/7031159-better-support-for-fsproj
https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/11043387-enable-drag-and-drop-to-change-compilation-order-i
https://vfpt.uservoice.com/forums/247560-general/suggestions/8089230-add-existing-folder-to-project
https://fsprojects.github.io/VisualFSharpPowerTools/folderorganization.html
fsprojects/VisualFSharpPowerTools#116
http://fpish.net/topic/None/59219
http://stackoverflow.com/questions/5918534/why-cant-i-add-a-subfolder-in-a-f-project
http://stackoverflow.com/questions/23769734/how-to-add-an-existing-folder-to-f-net-project-in-visual-studio-ultimate-2013
http://stackoverflow.com/questions/32556632/how-to-bypass-visual-studios-f-project-folder-limitations-on-xamarin-android
https://effingeffsharp.wordpress.com/2011/05/19/interlude-adding-folders-to-an-f-project-in-visual-studio/
http://www.hoonzis.com/fsharp-folder-to-be-renderered/
http://blog.theburge.co/tools/2010/02/12/folders-in-f-projects.html

Please take a fresh look at the issue of folder support and consider placing a premium on it as a part of any efforts on the F# Project System/Model.

@lambdakris it's really that there are so many other things that need to come first that it's not even worth considering at the moment. Once F# has been moved to CPS after CPS allows project tree ordering it could be implemented.

We do not advice you to introduce complicated folder structure within F# projects. You should keep number of folders within your project as low as possible.

You misunderstood this. The folder feature was broken, it could go terrible wrong and scramble your fsproj, the more complicated the structure the more horrible of a mess and the longer it'll take you to fix, not to mention the error messages you get in VS don't help you understand what exactly is going wrong. It's a warning against creating a frustrating disaster for yourself, not an admonition against using folders.
Personally I'm a big fan of using folders, I use the VFPT feature all the time, but it's gotta sit on the backburner for vs2017 for a while.
If the folder functionality is so important you we'll gladly accept a PR to VFPT fixing it and then it can be on by default.

I'm dual sided regarding folder support:
For me also, editing fsproj by hand is actually less hassle, even in csproj the GUI tooling is sometimes so slow that getting the change done outside VS in text editor is faster

that lack of full support for folders in tooling really does hurt impressions.

For users of other languages, file organization (leave alone folder support) in F# is always a controversial topic, I don't feel that folder support alone will drastically change the perception from newbies.
The quote on VFPT and feature could be removed, just direct users to create their files in explorer and edit fsproj, this always work.
In general, F# projects do benefit from having files organized in folders, although not as much as C# which tend to have a hierarchical matching with namespaces.
IMHO we should try to identify the other major points people trying out F# at the beginning face, but folder support would not be the main pain point, given that experienced F# user can diffuse the anxiety about the topic (explain that file ordering is a pro in terms of dependency cycles, and that it will make more sense after using the language more that we don't have a file per class etc.).
It seems we should move that part of the conversation to #1339.

@cloudRoutine I actually meant for the third paragraph (about VFPT) and fourth paragraph (about code org) to be read as disconnected. The argument I characterize in the fourth paragraph was not inferred from the VFPT warning/disclaimer, rather it is an argument I had seen characterized on Stack Overflow on occasion and in CodePlex back in the day.

So there's still a task "Update OSS all FSharp.Core builds to use project.json" listed on F# for CoreCLR Status, which is linked directly from readme.md file displayed at https://github.com/Microsoft/visualfsharp.  I assume that's no longer accurate?

@davisnw Yes, it's no longer accurate.

@cartermp
imho we need to update that Wiki page of https://github.com/Microsoft/visualfsharp/wiki/F%23-for-CoreCLR---Status to reflect the latest status after yesterday's VS 2017 RTM launch.
It is quite confusing to follow the current status, because afaik the rest of the managed language teams are focusing on *.csproj, *.fsproj (the old MSBUILD with the simplified proj model) instead of JSON project format.
CMIIW

@eriawan @cartermp We should scrap the Wiki pages - no one ever keeps GitHub Wiki pages up-to-date in any project I've seen (partly because the community can't pull-request to do that)

@dsyme i find wiki really useful for projects. but:

not as dupe of technical docs inside repository
as a whiteboard! because page are not for long term docs (there are better place). A roadmap/status page can be update as much as we want. or a VS 2017.0 page with workaround/know bugs (a bug can be resolved, so closed, but exists for consumers, handy know list of big one, what expect).
to add docs aligned with other projects
to communicate current status (workaround, links) because

best if workaround are linked with bug issues

to give a quick showcase of project (images, etc), or link to better intro

how to install from ci for example

FAQ
to add info about team and people external to team  (hard to know who call, i love my contacts list )

(partly because the community can't pull-request to do that)

Well, it's write enabled for everyone. so just click edit.
PR give more confidence to send contribution, because ppl (me too) are scared to directly edit someone else work.
But state on wiki "IT'S OK" help, and tell usual contributors to do so (the one who will probably edit that) too.
@dsyme @cartermp that said, wiki alone doesnt help to show current work to be done, roadmap etc (that's hard to know in vf# repo).
There is roadmap issue, but github issue are lots in comments and always stale (because just the author or admin can update it).
msdn blogs has the same problem. msdn api docs neither. .net core has docs, but is different audience.
So @cartermp @KevinRansom maybe now that vs is rtm'ed, can we improve that communication stuff a bit?
A wiki page with short/long roadmap linked to sigle issues help a lot. we can help maintain that.
Or use github project/roadmaps too but that not help a lot, because it become a bit container soon, not showing future work, if not really really used (afaik you do your prioritization/todo list internally)

Part of the issue with using the Wiki is that our roadmap has been changing quite rapidly recently.  Things we may have initially been on the hook for implementing may shift to other teams, or something else which is a higher priority comes up (e.g., setup authoring for VS, which basically sucks the air out of the room due to the amount of work involved).  I prefer a model of fairly regular announcements about what we're working on and what our priorities are, because remembering to update a wiki is a bit more difficult, and it's also harder to spread the message that way.  Communicating engineering status is also a bit less useful via the wikis as well - a tracking Issue is more effective there.

@isaacabraham No external tools use the project system.  So I would assume not at all, however, if external tooling for C# starts to use the project system directly then F# tooling could follow suit.

@KevinRansom since the host agnostic layers of CPS are netcore compatible I already plan on using the roslyn-project-system for xplat F# tooling regardless of whether C# does or not. The inability to effectively manage project configuration state is currently a big shortcoming of the non VS/monodevelop F# editor tools.

@cloudRoutine You need to separate http://github.com/dotnet/roslyn-project-system from CPS. The former are the C#/VB extensions on top of CPS. CPS itself is not (yet) usable outside of Visual Studio.

@davkean i thought the Microsoft.VisualStudio.ProjectSystem, Microsoft.VisualStudio.Threading Microsoft.VisualStudio.Validation, the Microsoft.VisualStudio.Composition.Configuration, Microsoft.VisualStudio.Composition` dlls were host agnostic.
maybe I got some of the nomenclature wrong, it's hard to keep track of all of these APIs
I started working on a prototype splitting the layers using the roslyn-project-system as reference, but the lack of netcore support is disappointing. Xplat (w/ mono) is an unfortunate caveat

CPS is made up of more than those dlls. Microsoft.VisualStudio.ProjectSystem is only a reference dll containing interfaces and helper classes.

@davkean Then CPS was wrong term, I was trying to do a core project system implementation that could work as a part of a language server to provide F# tooling to a variety of editors.  And then the connection to all of the VS layer APIs would be in a layer built on top of that. That way all of the F# tooling could leverage the same system.
But if you think that's not feasible I'll have to upgrade the bespoke system I wrote before so I can integrate it with F# roslyn workspace I wrote.  It's been hard to figure this stuff out since the docs are sparse to non existent for all of this stuff.

Given the current state - I don't see as feasible. Some of the dlls you need (ie the actual implementation of Microosft.VisualStudio.ProjectSystem), only ship as a part of Visual Studio. We want to get it to where people can do exactly what you are trying to do - but we're >1 year away from that.

cool thanks, focusing on only using the Microsoft.CodeAnalysis dlls that are netcore compatible makes this a lot simpler.

You might want to hook up with @DustinCampbell I think he may have some ideas about using workspaces in other editors from his vscode work.

Closing old discussion; the VS project system which loads .NET SDK-based projects is implemented and supports F#.

authors: KevinRansom cartermp chaotic-butter cloudRoutine davisnw davkean dsyme enricosada eriawan forki isaacabraham lambdakris smoothdeveloper

repo: Microsoft/visualfsharp


text:
No tooltips for core union cases

It turns out this is reproduced on https://github.com/Microsoft/visualfsharp/pull/2805 only, closing it.

I think it's because here
https://github.com/Microsoft/visualfsharp/blob/master/vsintegration/src/FSharp.Editor/QuickInfo/QuickInfoProvider.fs#L196
getTooltipFromRange will fail when range doesn't point to a file in the solution.

authors: majocha vasily-kirichenko


text:
No F# templates on 15.4.1.17102103 (Nightly)

Note that F# language support is installed, and I can open existing F# projects with no issue.

Note: uninstalling the nightlies will make the templates show up again.

Fixed by #3804.

I still have this problem with the current nightly build and VS 15.4.5.

@frederik-h You must use VS15.5.x with the nightly releases. They are not compatible with older releases of Visual Studio.

This explains the problem. Unfortunately, at this time, I cannot update due to some C++ compiler changes in 15.5 ....  Thanks for the information.

authors: cartermp frederik-h


text:
F# projects don't show Target Framework after upgrading to 15.8.0

After upgrading to 15.8.0 today, none of my F# projects show any available options under Target Framework in the project properties. The value still exits (4.6.1) in the actual project file when viewed in a text editor.
This issue has been moved from https://developercommunity.visualstudio.com/content/problem/311065/f-projects-dont-show-target-framework-after-upgrad.html
VSTS ticketId: 664115
These are the original issue comments:
(no comments)
These are the original issue solutions:
(no solutions)

cc @KevinRansom @brettfo any ideas?
Note that the same issue is mentioned in #5504 but is unrelated to the main problem there.

Bug:  note Target Framework Dropdown.

Fixed:

Fixed by #5516

Just updated to VS 15.8.7 today and it's still not working:

Is it related to referencing F# 3? Not sure it helps, but did you try delete the .vs folder?
Though either way, @cartermp I think this should be reopened. And considering it is a recurring bug, could we protect a fix with a unit test?

The fix for this issue is not available in any 15.8.x release. It's not related to targeting F# 3.0 and it's not a recurring bug.

@abelbraaksma , @nesteruk : this is a bug in Dev 15.8
the fix is in master here:https://github.com/Microsoft/visualfsharp/pull/5516
We are seeing if it makes the bar for dev 15.9.  Although the bar for that is now super high.

Oh tx, I thought since the fix was two months ago, it already made it into the latest release.
I hope it can still be included, this omission can be particularly puzzling for beginners. Others might just open the fsproj file and add it by hand, though it'll raise a lot of eyebrows either way.

What do I need to change in the FSPROJ file to get it working today?
On Thu, 18 Oct 2018 at 09:44, Dmitri Nesteruk dmitrinesteruk@gmail.com
wrote:

On Wed, 17 Oct 2018 at 20:15, Abel Braaksma notifications@github.com
wrote:

Oh tx, I thought since the fix was two months ago, it already made it
into the latest release.
I hope it can still be included, this omission can be particularly
puzzling for beginners. Others might just open the fsproj file and add it
by hand, though it'll raise a lot of eyebrows either way.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/visualfsharp/issues/5514#issuecomment-430712889,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAcoNuFmxHScCqBU4v-EIBOJFcJ0Ci9aks5ul2W8gaJpZM4V-T5G
.

--
Dmitri Nesteruk
dmitrinesteruk@gmail.com
skype: dmitri.nesteruk

--
Dmitri Nesteruk
dmitrinesteruk@gmail.com
skype: dmitri.nesteruk

@nesteruk,
to change the target framework, although I'm not really sure why you would want to do that unless you need some specific apis, you will need to manually edit the project file.
So:
Using your preferred text editor, open the project file,
Locate the line with:
v4.6.1
and change the numbers to the framework you need to target:
v4.6.1
v4.6.2
v4.7.0
v4.7.1
v4.7.2
If you use visual studio, when you open the file use 'open with' and Source Code (Text).
Save the file and then load the project file into vs.
Kevin

The fix was approved, so barring a disaster, it should appear in Dev15.9

@KevinRansom thanks, this compiles. interestingly enough, I get the following warning:
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

Here's what I have in the FSPROJ, not sure what went wrong here
<Reference Include="FSharp.Core">
      <HintPath>..\..\packages\FSharp.Core.4.5.2\lib\net45\FSharp.Core.dll</HintPath>
    </Reference>
    <Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
      <Private>True</Private>
    </Reference>

authors: KevinRansom abelbraaksma cartermp nesteruk vsfeedback


text:
Fix SignatureHelpProviderTests

Current master is broken since @cartermp's commit 50e7a829c5ca46976d62866eed2884498dfbfec7
This is an attempt to fix it, but I'm not sure if the test is broken or the code itself

So what does it mean? Fixing tests or code?

Before:

Looks the same.

Why are "arg0" and "An object to write using format" on different lines? It should be fixed.

@vasily-kirichenko @forki There's something in Roslyn method displays we can't control here - I'm sure we can get them to change it eventually
arg0 is the name of the parameter in the .NET metadata
.method public hidebysig static void  WriteLine(string format,
                                                object arg0) cil managed noinlining
{
  .permissionset linkcheck
             = {class 'System.Security.Permissions.HostProtectionAttribute, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' = {property bool 'UI' = bool(true)}}
  // Code size       13 (0xd)
  .maxstack  8
  IL_0000:  call       class System.IO.TextWriter System.Console::get_Out()
  IL_0005:  ldarg.0
  IL_0006:  ldarg.1
  IL_0007:  callvirt   instance void System.IO.TextWriter::WriteLine(string,
                                                                     object)
  IL_000c:  ret
} // end of method Console::WriteLine

@dsyme what I don't like here is that "arg0" and its XML Doc are on different lines, that's all.

ok seems there are more to come. but since I can't compile this it will take some time until I have the tests fixed

ok changed test a bit to actually report all issues.

this should become green now and therefore fix the build on master. @dsyme / @KevinRansom / @cartermp please take a look and merge if you think it's ok

@forki Thanks.  Not sure why this went wrong, but I imagine the document created temporarily by the tests on the server is different than that on my machine when I updated these tests.  That would explain the discrepancy in TextSpans.
I think that first item in the tuple can just be outright ignored.  I don't think that verifying that the correct TextSpan is the same is very meaningful from a test perspective.  The important bit is that the current argument and total number of arguments is accurate.
@dsyme @vasily-kirichenko I don't think that behavior is going to change in Roslyn, or at least not for vs2017 RTM.  To clarify, what this means is that you would be requesting that F# be treated as a special case on signatures to show all parameters for a given method at all times, (something we currently generate in our codebase, but would likely have to pass off to Roslyn) and have Roslyn highlight the current parameter of that set.  I very much disagree that this is the correct thing to do, but there is a discussion at #1910.

@cartermp Right now I think I'm just totally focusing on recovering parity with VS2015 rather than working out what's actually right/wrong :)
I think one key post RTM is to implement other relevant navigation aids (go to generated signature, F1 help etc), and cleanup quick info too.

@dsyme I figured it out; it's entirely on our end and has nothing to do with Roslyn.

Tbh most important right now is green build ;-)
Am 06.12.2016 6:25 nachm. schrieb "Phillip Carter" <notifications@github.com

:

@dsyme https://github.com/dsyme I figured it out; it's entirely on our
end and has nothing to do with Roslyn.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/visualfsharp/pull/1949#issuecomment-265213768,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNG01TnAN9idTEoWKB5UqLaTNZG4Jks5rFZqRgaJpZM4LFSJp
.

@forki Agreed, this is tangential and not related to this PR

AppVeyor failures don't seem to be an issue.  @KevinRansom can you verify and pull this if it's all good?  This fixes a test in CI that's been going red for unrelated PRs.

Please please merge.

authors: cartermp dsyme forki vasily-kirichenko


text:
Improve error reporting: override method does not match abstract

this is first part of a solution for #1430
type Base() =
    abstract member Member: int * string -> string
    default x.Member (i, s) = s

type Derived1() =
    inherit Base()
    override x.Member() = 5

shows:
This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:
abstract member Base.Member : int * string -> string

ready for review/merge

the error looks unrelated and appveyor succeeded

@forki
Thanks for taking care of this
Kevin

authors: KevinRansom forki


text:
Add line comment

Add simple keybinding for comment/uncommet one or more lines.

The standard behavior in Sublime Text and VS Code is that CMD+/ toggles line comments, so closing as the mapping is already there.

authors: Glitches auchenberg

repo: Microsoft/vscode-atom-keybindings


text:
Show error when copying connection string on linux without xclip

We could potentially output the connection string to the output window so the user can manually copy it, but I would prefer not to do that with a sensitive string.
Plus, it's easy to install xclip
Fixes #64

Maybe it worth checking out clipboardy - it contains xsel in package.

authors: EricJizbaMSFT floatdrop

repo: Microsoft/vscode-cosmosdb


text:
Black does not format file in-place when selected as Python formatter

Environment data

VS Code version: 1.25.1 (and 1.26.0-insiders)
Extension version (available under the Extensions sidebar): 2018.7.1
OS and version: macOS 10.12.16
Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.5 | packaged by conda-forge | (default, Apr  6 2018, 13:44:09)
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
Relevant/affected Python packages and their versions: black

Actual behavior
Triggering FormatDocument (by ctrl-click and selecting option, keyshortcut, or format on save) does not result in reformatted Python code.
Expected  behavior
Triggering FormatDocument (by ctrl-click and selecting option, keyshortcut, or format on save) does reformat Python code.
Reformatting works when autopep8 or yapf are selected in "python.formatting.provider" - only black does not result in reformatted code.
Running black from the command-line on the same open file reformats the file correctly, and VS Code/the extension picks up on the changes.
Specifying the path to black in the command-line works as above, but setting the same value in "python.formatting.blackPath" does not fix the issue.
This issue occurs on an iMac running macOS 10.12.16, but not on a MacBook Pro running macOS 10.13.6
Steps to reproduce:

Create some bad formatting in an open Python file
Set black as the formatter in User Settings: "python.formatting.provider": "black"
Trigger document reformatting  (by ctrl-click and selecting option, keyshortcut, or format on save)

Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
With keyshortcut or using ctrl-click/Format Document:
no output is written

Triggering formatting with save:
##########Linting Output - flake8##########
16,80,E,E501:line too long (87 > 79 characters)
91,80,E,E501:line too long (80 > 79 characters)
100,1,E,E303:too many blank lines (5)
##########Linting Output - pylint##########

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)
no output is written

@widdowquinn are you running the latest version of Black? And did you specify the path with an absolute path? I can't replicate the issue otherwise.

Thanks for getting back to me, @brettcannon - I think you've solved it!
Checking both machines, the one with the issue was running version 18.6b2 (from conda-forge), the one with no issue was running black, version 18.6b4 (installed with pip)
On the machine with the issue, I uninstalled black with conda uninstall black, and reinstalled with pip install black. This didn't initially work, but when I removed the "python.formatting.blackPath" setting, normal function was restored.
In summary:
Non-working configuration:
$ which black
/Users/lpritc/anaconda3/envs/primer_results_db/bin/black
$ black --version
black, version 18.6b4

and
"python.formatting.blackPath": "/Users/lpritc/anaconda3/envs/primer_results_db/bin/black",
"python.formatting.provider": "black",

Working configuration:
$ which black
/Users/lpritc/anaconda3/envs/primer_results_db/bin/black
$ black --version
black, version 18.6b4

and
"python.formatting.provider": "black",

Many thanks!
L.

authors: brettcannon widdowquinn

repo: Microsoft/vscode-python


text:
Nest subtests under their function in the test explorer.

(for #4503)
[WARNING} The approach I took is a bit of a hack.  Changing the structure of the Tests data is a huge undertaking.  So I tucked the necessary UI-related data in as a tag-along. :)
I'm addressing telemetry in a follow-up PR.

[x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
[x] Title summarizes what is changing
[x] Has a news entry file (remember to thank yourself!)
[x] Has sufficient logging.
[ ] Has telemetry for enhancements.
[x] Unit tests & system/integration tests are added/updated
[ ] Test plan is updated as appropriate
~[ ] package-lock.json has been regenerated by running npm install (if dependencies have changed)~
[ ] The wiki is updated with any design decisions/details.

@DonJayamanne, You already reviewed this.  The only new bit is the tests for TestTreeViewProvider.


text:
Always open the output panel!!

VSCode Version: 1.4.0
OS Version: Windows 10 1607

Steps to Reproduce:

Open vscode
Close ouput pannel
Reset vscode
Always open the output panel

Cannot remember open state

@u3u so you say VS Code is stuck always opening the output panel on start?

@bpasero Every time it automatically opens the output panel, even if the output panel is closed!

I am very sorry to hear you are having issues with VS Code. I wonder if this issue is being caused by an installed extension. Can you try to run VS Code without extensions? From the command line, execute: code --disable-extensions and try your steps again to see if it reproduces. If you see it is an issue with the extension, please file it against the extension repository itself.

@bpasero Thanks for your reminding!

repo: Microsoft/vscode


text:
code issue

in the extension markdown ,
let d3 = vscode.commands.registerCommand('markdown.showSource', showSource);

no parameter was passed to the showSource ,
function showSource(mdUri: Uri) {
	if (!mdUri) {
		return vscode.commands.executeCommand('workbench.action.navigateBack');
	}

	const docUri = Uri.parse(mdUri.query);

	for (let editor of vscode.window.visibleTextEditors) {
		if (editor.document.uri.toString() === docUri.toString()) {
			return vscode.window.showTextDocument(editor.document, editor.viewColumn);
		}
	}

	return vscode.workspace.openTextDocument(docUri).then(doc => {
		return vscode.window.showTextDocument(doc);
	});
}

is it possible to execute the code after if{....}.
Any help will be appreciated!

@928PJY Is it that you're writing an extension and want to invoke the markdown.showSource command?

Yes ,I am writing an preview extension just like markdown preview  , but not to invoke the markdown.showSource command . I just want to figure out the code. I think the code after if{..} won't be excute , is it?

@kieferrm Can you help you further.
@kieferrm Please note it is possible for an extension to "export" public API -- it is the return value of the activate() function. It is also possible for an extension to "import" other's API via the vscode.extensions namespace.

@928PJY  Some context first: Assume a markdown preview is the user's active editor and the user wants to go to the markdown source. This can be done by toggling the preview using Shift+Cmd+V which issues the markdown.showPreview command. The user can also choose Show Source from the command palette or trigger Show Source in the preview editor's title bar. Those two cases issue the markdown.showSource command.
The markdown.showSource command is bound to the showSource function. The markdown.showPreview command is bound to the showPreview function. Depending on how the user triggers the command(s), the functions are called with or without the uri.
The situation gets more complicated by the fact that  vscode.window.activeTextEditor returns null when the markdown preview is active, i.e. there is no way the code can determine that the preview is active. So, the code optimizes for the most common workflow which is toggling between markdown preview and markdown source and issues workbench.action.navigateBack.

function showPreview(uri?: Uri, sideBySide: boolean = false) {

	let resource = uri;
	...
	if (!(resource instanceof Uri)) {
		if (!vscode.window.activeTextEditor) {
			// this is most likely toggling the preview
			return vscode.commands.executeCommand('markdown.showSource');
		}
		// nothing found that could be shown or toggled
		return;
	}
    ...
}

function showSource(mdUri: Uri) {
	if (!mdUri) {
		return vscode.commands.executeCommand('workbench.action.navigateBack');
	}
    ...
}

You should be able to execute markdown.showSource the following way:
vscode.commands.executeCommand('markdown.showSource', <your URI>);

Thank you so much ! it help me a lot!!

authors: 928PJY alexandrudima kieferrm


text:
[loc][Query][VSCode] Please clarify the meaning of the string

Hi, we have a question from our translator. Can you help please? Thanks!
Source:
REPL Accept Input
File Name:
src\vs\workbench\parts\debug\electron-browser\repl.nls.resx
Resource ID:
".resx", 0; "actions.repl.acceptInput"
Query:
Please clarify meaning. 	CnE_Developer_Moravia_ITA1@hotmail.com	9/5/2016 1:23:12 PM

REPL is a common term for a read–eval–print loop - that is our debug console.
Accept input means just to apply the current input from the debug console input box.
I have also added a comment to the term so the meaning is clearer in the future.

authors: isidorn mkyjakova


text:
TypeScript Language Support silently stops

VSCode Version: 1.5.2
OS Version: Windows 10 Enterprise, Version 1607

Steps to Reproduce:

Opened VSCode on a project with around 1-2000 ts/tsx/css files.
Used VSCode for around 1 hour
Noticed that the Language Support for TypeScript stopped working. This included intellisense, symbols, etc.

Notes
The issue goes away after using the 'Reload Window' command.
Additional information
Code processes in the process explorer

Error for the VSCode dev tools

Since I am not sure if this is us or TS, assigning both @dbaeumer and @waderyan

@bvancea thank you for opening this issue and for thoroughly giving us information. We have seen issues similar to this but they are hard to reproduce. Can you help me by giving me more information?
In your settings set "typescript.tsserver.trace": "verbose" and then open the output window. You will see the output of the language service and we should see messages before it stops.
An additional step that would be helpful to us is if you can set TSS_LOG=-level verbose. there should be a log file written next to tsserver.js that would have the form of .log[0-9]+
The issue I have been tracking manifestations of this behavior is here. https://github.com/Microsoft/TypeScript/issues/10735

Here is what happened: the tsserver crashed and all open requests very rejected with service died. However the service gets restarted automatically unless it crashes very frequently. In this case we show an message to the user: @bvancea have you seen such a message. When you get into that state again can you let use know the command lines of the running Code.exe processes.

@waderyan Thanks for the tips, I will update the log settings and get back to you.
@dbaeumer Some additional information:

I have not seen any visual notification regarding any tsserver crashes, save for the logging one in the dev tools.
I am not adding any additional parameters to the Code.exe process.

@waderyan Here is the output after updating the "typescript.tsserver.trace" to "verbose".
[Trace - 11:42:10 AM] TypeScript Service: canceled request with sequence number 7
[Trace - 11:42:11 AM] TypeScript Service: canceled request with sequence number 8
[Error - 11:43:28 AM] TSServer exited with code: 3
[Info  - 11:43:28 AM] Using tsserver from location: c:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\typescript\server\typescript\lib\tsserver.js
[Trace - 11:44:27 AM] TypeScript Service: canceled request with sequence number 6
[Trace - 11:44:35 AM] TypeScript Service: canceled request with sequence number 15
[Trace - 1:06:23 PM] TypeScript Service: canceled request with sequence number 17
[Trace - 1:06:23 PM] TypeScript Service: canceled request with sequence number 16
[Trace - 1:06:29 PM] TypeScript Service: canceled request with sequence number 19
[Trace - 1:06:29 PM] TypeScript Service: canceled request with sequence number 20
[Trace - 1:06:30 PM] TypeScript Service: canceled request with sequence number 21
[Trace - 1:06:32 PM] TypeScript Service: canceled request with sequence number 22
[Trace - 1:07:19 PM] TypeScript Service: canceled request with sequence number 24
[Trace - 1:07:19 PM] TypeScript Service: canceled request with sequence number 23
[Trace - 1:11:53 PM] TypeScript Service: canceled request with sequence number 25
[Trace - 1:17:56 PM] TypeScript Service: canceled request with sequence number 26
[Trace - 1:17:58 PM] TypeScript Service: canceled request with sequence number 27
[Trace - 1:18:00 PM] TypeScript Service: canceled request with sequence number 29
[Trace - 1:18:00 PM] TypeScript Service: canceled request with sequence number 28
[Trace - 1:34:20 PM] TypeScript Service: canceled request with sequence number 31
[Trace - 1:34:49 PM] TypeScript Service: canceled request with sequence number 30

Where can I set TSS_LOG=-level verbose ? Is it an environment variable?

Yes it is an env variable.
@mhegazy correct me if I am wrong.

yes. you can also specify a file path:
TSS_LOG=-level verbose -file c:\tmp\server.log

@mhegazy @waderyan sorry for the late response.
I set the TSS_LOG as instructed, but looking through the file, I don't see anything out of the ordinary. Just Info and Perf entries.

@bvancea can you share the file?

Closing until more info is given.

I don't know if this is the same problem, but here is my output:
TypeScript output within VSCode:
[Trace - 12:34:16 pm] Sending request: quickinfo (79). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "c:/path/to/somefile.ts",
    "line": 946,
    "offset": 19
}
[Trace - 12:34:19 pm] TypeScript Service: tried to cancel request with sequence number 79. But request got already delivered.
[Trace - 12:34:22 pm] TypeScript Service: canceled request with sequence number 80
[Trace - 12:34:22 pm] TypeScript Service: canceled request with sequence number 81
[Trace - 12:34:26 pm] TypeScript Service: canceled request with sequence number 82
[Trace - 12:34:26 pm] TypeScript Service: canceled request with sequence number 83
[Trace - 12:34:29 pm] TypeScript Service: canceled request with sequence number 84
[Error - 12:34:30 pm] TSServer exited with code: 3
[Info  - 12:34:30 pm] Using tsserver from location: c:\path\to\node_modules\typescript\lib\tsserver.js
[Trace - 12:38:51 pm] TypeScript Service: canceled request with sequence number 91
[Trace - 12:39:07 pm] TypeScript Service: canceled request with sequence number 92

Tail of TSS_LOG:
Info 255  Search path: c:/path/to/a/proj/directory
Info 256  Config file name: c:/path/to/tsconfig.json

(then nothing)
However, several times in the log I get something like this:
Info 25   Config file name: c:/path/to/tsconfig.json
Err 26    Add recursive watcher for: c:/path/to
Info 27   Opened configuration file c:/path/to/tsconfig.json
Err 28    Add watcher for: c:/path/to/dir-a
Err 29    Add watcher for: c:/path/to/dir-b

(and so on...)

@DerFlatulator looks like you are seeing something similar as this issue - https://github.com/Microsoft/TypeScript/issues/10735

can you share the TSS_LOG file?

authors: DerFlatulator bpasero bvancea dbaeumer mhegazy waderyan


text:
strange error warning with ts quickstart showcase

VSCode Version: 1.5.3
OS Version: mac

Steps to Reproduce:

copy example from http://www.typescriptlang.org/docs/tutorial.html
paste to vscode and save
got many warning, such as duplicate

rename function greeter(person: Person) { to function greeter(person: Person1) {
revert rename
delete all code and save
got error below

update: when reopen the file, all warning is gone...

I am not able to reproduce this. Can you try again with the latest build? You can install the latest build at http://code.visualstudio.com/insiders

sorry, I can't either now, will reopen if hit again


text:
How to config terminal.external work with Hyper.is app

The settings is below,  vscode can open the Hyper app, but lose the current location. It always use the home location.
// Place your settings in this file to overwrite the default settings
{
	"terminal.external.windowsExec": "C:\\Users\\bang\\AppData\\Local\\hyper\\app-1.0.0\\Hyper.exe",
	"npm.runInTerminal": false
}

I filed the following upstream issues to follow up with this on their side: #1212, #1213. It should just work out of the box like other terminals.


text:
HTML comments (via keyboard shortcut)

VSCode Version: 1.8.1
OS Version: win7 64 bit

Steps to Reproduce:
I am using Visual Studio Code, and it has a insert comment feature (CTRL-/) or SHFT-ALT-A
but it is inserting javascript style comments into my HTML file
original
<script src="./node_modules/react/dist/react.js"></script>
<script src="./node_modules/react-dom/dist/react-dom.js"></script>

result:
// <script src="./node_modules/react/dist/react.js"></script>
// <script src="./node_modules/react-dom/dist/react-dom.js"></script>

Which does not work, I searched prior issues, but I might have missed this.

I think I have a similar issue.
When I am in an HTML page, inside

Given a cursor position or selection, we should only expand only to the start or end of the embedded range (not the start of the line)

This issue was already fixed as proposed.

authors: DrYSG aeschli erocheleau rebornix


text:
More friendly terminating of running task

Hi!

VSCode Version: 1.10.1
OS Version: macOS Sierra

It is a bit lengthy to terminate current running task by "cmd+shift+p term up|down to select Tasks: Terminate Running Task and Enter".
It would be great to have e.g.

Terminate Task context action on Task Output window, or better
to have a button inside Output Window which will terminate current task (Terminal window also have custom icons at the top right corner ;)

Thanks for evaluating!

You can bind a keyboard shortcut to the command "workbench.action.tasks.terminate" for a quicker termination.

Yep, that's definitely better than using command search. But button would be much better...because it would be in the "right context" ;) Global command is just too "general" in this case ;) Thanks a lot.

We are moving to running tasks in the terminal which makes terminating them a lot easier since the terminal panel already has support to terminate a terminal. No further action is planned for the output panel.
I am closing this issue since the terminal will support the requested functionality.

You can't even imagine how I'm glad to hear it! :-) That's what I actually want in #22156
Do you have some time estimate when it could be live? Because running thousands of JS tests through Output window is unusably slow. Thanks ;)

Support for this is already in 1.9 and 1.10 but not on by default. See the release notes for 1.9 and 1.10 how to enable this. In 1.10 you can simply change the version field of the tasks.json to 2.0.0. But be aware that running in the terminal is work under construction. And it might change a little in the future.

Sounds great, will definitely try that, thanks!

authors: dbaeumer obrejla ramya-rao-a