Skip to content

External test runner updates #21276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 18, 2018

Conversation

weswigham
Copy link
Member

This does a few things:

  • Increase user test timeout to 10m because npm can be slow (especially when not installing from a cache), and can cause tests time timeout on the much shorter (40s) timeout we were using
  • Remove parse5 because they removed their own types
    • We should probably talk to them, since they just broke all their TS consumers
  • Accept updated class member error message for rxjs
  • Accept current chrome baseline for reference and pin chrome-devtools-frontend version to today's version, so we can work from it while doing JS improvements while knowing that the underlying project isn't changing

…se5 because they added their own types, accept updated error msg for rxjs, acccept current chrome baseline and pin chrmoe version
@weswigham weswigham merged commit 5fcde24 into microsoft:master Jan 18, 2018
@weswigham weswigham deleted the increase-external-test-timeout branch January 18, 2018 21:48
@sandersn
Copy link
Member

Sorry I didn't see this earlier. Looks like sift is broken by #17912. I'll go check it out.

@weswigham
Copy link
Member Author

I think the sift errors are legitimate errors in their .d.ts. at least that's the conclusion we came to in Friday.

@sandersn
Copy link
Member

Maybe. Here is a clearer repro:

function f<T extends any, P extends keyof T>(tp: T[P], aa: any[]) {
    aa = tp
}

The question is whether the constraint of T[P] is any when T extends any. I would say yes. Right now the answer is no.

@sandersn
Copy link
Member

After some investigation with @mhegazy, the picture is much muddier.

  1. There is some precedent for not making T extends any equivalent to any. Partial<any> is not any but { [s: string]: any }.
  2. sift.js did not intend to constrain T extends any. They found it as a convenient workaround (that partially destroys their intended semantics). I don't think anybody says T extends any intentionally, in fact.
  3. sift.js actually wants everybody's favourite infinite type that escaped from Lisp: type Tree<T> = T | Array<Tree<T>> (where T is not Array). This isn't really possible in Typescript until conditional types happen, and I'm not sure it's possible then.
  4. @weswigham noticed that T extends any === any might interact badly with conditional types as currently implemented, so it's safer to leave this change until after those are done.

It's an easy change to make, but until there's more demand, I don't think this change is worthwhile.

errendir added a commit to errendir/TypeScript that referenced this pull request Jan 20, 2018
* origin/master: (134 commits)
  Fix isTypeOfExpression in compiler API (microsoft#20875). (microsoft#20884)
  add completion filter for function like body (microsoft#21257)
  Make nonnull assertions and binding patterns apparent declared type locations (microsoft#20995)
  For `{ type: "a" } | { type: "b" }`, find references for the union property (microsoft#21298)
  configureNightly -> configurePrerelease
  Create a 'configure-insiders' and 'publish-insiders' task.
  Add createProgram on WatchCompilerHost
  in goToDefinition, use array helpers and clean up code (microsoft#21304)
  Support testing definition range of a reference gruop (microsoft#21302)
  Handle `undefined` input to firstDefined (microsoft#21300)
  Avoid spreading array (microsoft#21291)
  LEGO: check in for master to temporary branch.
  Accept new baselines
  Add regression test
  Properly handle contravariant inferences in inferReverseMappedType
  Remove unused properties from interface Refactor (microsoft#21286)
  LEGO: check in for master to temporary branch.
  Fold newline logic into getNewLineOrDefaultFromHost
  External test runner updates (microsoft#21276)
  Report more detailed info during script debug failure
  ...
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants