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

3.5.0-dev.* breaks ts-loader from webpack #31447

Closed
konpikwastaken opened this issue May 17, 2019 · 6 comments
Closed

3.5.0-dev.* breaks ts-loader from webpack #31447

konpikwastaken opened this issue May 17, 2019 · 6 comments
Labels
Working as Intended The behavior described is the intended behavior; this is not a bug

Comments

@konpikwastaken
Copy link

konpikwastaken commented May 17, 2019

TypeScript Version: 3.5.0-dev.20190517

Search Terms:
webpack, ts-loader, incremental build

Description:
/edit: strikethrough what I thought was related issue

Doing a normal build with typescript@next as 3.4.5 has issues with --incremental flag and when sources get regenerated. It appears we cannot move to 3.5.0 as it breaks our webpack bundling with the following errors for each ts(x) file encountered during the bundle process.

[tsl] ERROR
      TS5074: Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified.

Attempted with ts-loader versions

  • 5.4.6
  • 6.0.0

Expected behavior:
Error should not occur, as no error occurs in typescript@3.4.5

Related Issues:

@sheetalkamat
Copy link
Member

Fixed already by #30513

@konpikwastaken
Copy link
Author

@sheetalkamat does this mean the linked issues are unrelated or does this mean that this is a ts-loader issue? Unsure why it would be a ts-loader issue as this occurs when upgrading typescript.

@konpikwastaken
Copy link
Author

@konpikwastaken
Copy link
Author

Still repro for 3.5.0-rc && 3.5.0-dev.20190522.

@sheetalkamat
Copy link
Member

@konpikwastaken That's the issue with ts-loader where in it doesn't indicate that compiler options are from config file. if you specify tsbuildinfo file path in your config file the error should go away

@sheetalkamat sheetalkamat added the Working as Intended The behavior described is the intended behavior; this is not a bug label May 22, 2019
@konpikwastaken
Copy link
Author

I see - this is change that ts-loader will need to implement it seems. Great, I'll open a bug there & reference this.

Also confirmed that specifying tsbuildinfo in my tsconfig file directly is indeed a workaround.

cfcosta added a commit to cfcosta/kiali-ui that referenced this issue May 30, 2019
Updates to latest version of typescript:
- https://devblogs.microsoft.com/typescript/announcing-typescript-3-5/

This update makes the compiler a little more strict, so some of the
things that we had before will not work. This update has the same
motivation as kiali#1154, and having a more up to date typescript helps us
with it (some errors happen because of the lacking `unknown` type, which
is defined as `null | undefined | T extends {}`).

Some other changes:

* `@types/react-redux` has been updated because it generates a
  compilation error. This is build-only, so no impact. Also, we're already
  running the latest redux, so we're just keeping them in sync.
* `hoist-non-react-statics` had improper typescript typings and had to
  be forcefully updated. I did some investigations on the changes for
  the versions, nothing seems non-breaking.
* Health-related API namespaces were erasing types, so typescript just
  defaulted to `any` and ignored the typing. This has been fixed.
* Typescript 3.5 broke webpack ts-loader implementation when using
  `incremental`: microsoft/TypeScript#31447
  This is fixed by also setting the `tsbuildinfo` file on tsconfig.

Some tests are failing, and I found the same problems on kiali#1154, so I'm
backporting those changes to the tests.
cfcosta added a commit to cfcosta/kiali-ui that referenced this issue Jun 18, 2019
Updates to latest version of typescript:
- https://devblogs.microsoft.com/typescript/announcing-typescript-3-5/

This update makes the compiler a little more strict, so some of the
things that we had before will not work. This update has the same
motivation as kiali#1154, and having a more up to date typescript helps us
with it (some errors happen because of the lacking `unknown` type, which
is defined as `null | undefined | T extends {}`).

Some other changes:

* `@types/react-redux` has been updated because it generates a
  compilation error. This is build-only, so no impact. Also, we're already
  running the latest redux, so we're just keeping them in sync.
* `hoist-non-react-statics` had improper typescript typings and had to
  be forcefully updated. I did some investigations on the changes for
  the versions, nothing seems non-breaking.
* Health-related API namespaces were erasing types, so typescript just
  defaulted to `any` and ignored the typing. This has been fixed.
* Typescript 3.5 broke webpack ts-loader implementation when using
  `incremental`: microsoft/TypeScript#31447
  This is fixed by also setting the `tsbuildinfo` file on tsconfig.

Some tests are failing, and I found the same problems on kiali#1154, so I'm
backporting those changes to the tests.
cfcosta pushed a commit to kiali/kiali-ui that referenced this issue Jun 18, 2019
Updates to latest version of typescript:
- https://devblogs.microsoft.com/typescript/announcing-typescript-3-5/

This update makes the compiler a little more strict, so some of the
things that we had before will not work. This update has the same
motivation as #1154, and having a more up to date typescript helps us
with it (some errors happen because of the lacking `unknown` type, which
is defined as `null | undefined | T extends {}`).

Some other changes:

* `@types/react-redux` has been updated because it generates a
  compilation error. This is build-only, so no impact. Also, we're already
  running the latest redux, so we're just keeping them in sync.
* `hoist-non-react-statics` had improper typescript typings and had to
  be forcefully updated. I did some investigations on the changes for
  the versions, nothing seems non-breaking.
* Health-related API namespaces were erasing types, so typescript just
  defaulted to `any` and ignored the typing. This has been fixed.
* Typescript 3.5 broke webpack ts-loader implementation when using
  `incremental`: microsoft/TypeScript#31447
  This is fixed by also setting the `tsbuildinfo` file on tsconfig.

Some tests are failing, and I found the same problems on #1154, so I'm
backporting those changes to the tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Working as Intended The behavior described is the intended behavior; this is not a bug
Projects
None yet
Development

No branches or pull requests

2 participants