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

Builds failing due tslint crash using nightly build #6478

Closed
DanielRosenwasser opened this issue Jan 14, 2016 · 6 comments
Closed

Builds failing due tslint crash using nightly build #6478

DanielRosenwasser opened this issue Jan 14, 2016 · 6 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue High Priority Infrastructure Issue relates to TypeScript team infrastructure

Comments

@DanielRosenwasser
Copy link
Member

Looks like it was introduced by 9df1ed4

Repro

  1. From an initialized TypeScript repo (i.e. you've already run npm install within it), run npm install typescript@1.8.0-dev.20160114
  2. Run jake lint.

Expected: No lint errors.
Actual:

$ jake lint
jake aborted.
TypeError: Cannot read property 'name' of undefined
    at getPropertySymbolsFromBaseTypes (C:\Users\drosen\TypeScript2\node_modules\typescript\lib\typescript.js:49945:73)
    at getPropertySymbolFromTypeReference (C:\Users\drosen\TypeScript2\node_modules\typescript\lib\typescript.js:49970:29)

@yuit can you look into this?

Any fix should also include a revert of 62c3bfb from #6484.

@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript High Priority Infrastructure Issue relates to TypeScript team infrastructure labels Jan 14, 2016
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 1.8 milestone Jan 14, 2016
@DanielRosenwasser
Copy link
Member Author

The fix is pretty trivial. Just remove the symbol && in getPropertySymbolsFromBaseTypes and add a guard to the top like

if (!symbol) {
    return;
}

I just don't know what the solid repro would be.

@DickvdBrink
Copy link
Contributor

CC: @adidahiya @jkillian - you might be interested as well

@DanielRosenwasser
Copy link
Member Author

If it helps, it seems to occur when linting src/compiler/utilities.ts and calling getPropertySymbolsFromBaseTypes with "getCanonicalFileName" as a property name.

@jkillian
Copy link

Thanks for the heads-up @DickvdBrink. If anything needs changing/investigating in TSLint I'll do it ASAP.

@jkillian
Copy link

Made the change suggested by @DanielRosenwasser and added a test case over in #6507.

I reverted 62c3bfb as requested as well, but of course that will make the CI fail for the PR, as the CI is now using the previous nightly which still contains the bug.

DanielRosenwasser added a commit that referenced this issue Jan 16, 2016
Fix issue #6478 (bug in the language services)
@DanielRosenwasser
Copy link
Member Author

Thanks a ton @jkillian we really appreciate it. I'll perform the revert tonight/tomorrow morning.

@DanielRosenwasser DanielRosenwasser added the Fixed A PR has been merged for this issue label Jan 16, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue High Priority Infrastructure Issue relates to TypeScript team infrastructure
Projects
None yet
Development

No branches or pull requests

4 participants