Skip to content
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

Exclude global types from devtools user test #20172

Merged
merged 1 commit into from
Nov 20, 2017

Conversation

weswigham
Copy link
Member

@weswigham weswigham commented Nov 20, 2017

Because it contained a handful of conflicting declarations which happened to trigger an error from #19356, which has a machine-specific path in the message.

Could we revert #19356 and instead implement #10489 in the near future? At least internally I don't think we've ever been happy with seeing those paths in any baselines; especially when they appear in a library file.

@weswigham weswigham requested a review from sandersn November 20, 2017 22:55
Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of questions, although I think it's fine to merge.

node_modules/chrome-devtools-frontend/front_end/cm/comment.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'.
node_modules/chrome-devtools-frontend/front_end/cm/comment.js(7,19): error TS2304: Cannot find name 'define'.
node_modules/chrome-devtools-frontend/front_end/cm/comment.js(7,43): error TS2304: Cannot find name 'define'.
node_modules/chrome-devtools-frontend/front_end/cm/comment.js(8,5): error TS2304: Cannot find name 'define'.
node_modules/chrome-devtools-frontend/front_end/cm/markselection.js(12,9): error TS2304: Cannot find name 'require'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it have 'node' in order to find require?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

require in these files is part of a UMD header. It's not actually in use, in the strictest sense:

(function(mod) {
  if (typeof exports == "object" && typeof module == "object") // CommonJS
    mod(require("../../lib/codemirror"));
  else if (typeof define == "function" && define.amd) // AMD
    define(["../../lib/codemirror"], mod);
  else // Plain browser env
    mod(CodeMirror);
})(function(CodeMirror) {

and chrome doesn't define it in their externs file (likely because the entire cm folder is marked as external, and so is not strictly checked).

@@ -5866,7 +5886,7 @@ node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(8795,39): error
node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(8799,38): error TS2339: Property 'offset' does not exist on type '{ [x: string]: any; node: any; start: number; end: number; collapse: any; coverStart: any; coverE...'.
Property 'offset' does not exist on type '{ [x: string]: any; node: any; start: number; end: number; collapse: any; coverStart: any; coverE...'.
node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(8817,16): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'.
node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(8818,3): error TS2322: Type 'Timer' is not assignable to type 'boolean'.
node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(8818,3): error TS2322: Type 'number' is not assignable to type 'boolean'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a result of this change, or just an update in the baselines?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

node re-typed setTimeout to return Timer instead of just number.

@weswigham weswigham merged commit 2c8e49f into microsoft:master Nov 20, 2017
@weswigham weswigham deleted the no-node-in-devtools branch November 20, 2017 23:17
@sandersn
Copy link
Member

This only gets rid of a few of the absolute paths in error messages. I agree that we should address this generally in the compiler.

@weswigham
Copy link
Member Author

@mhegazy already opened #20178 to track

@microsoft microsoft locked and limited conversation to collaborators Jun 14, 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.

2 participants