microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
100.94k stars 12.47k forks source link

TypeScript 1.9.0 API assumes wrong files to parse if used on windows in conjunction with exclude #9123

Closed otbe closed 7 years ago

otbe commented 8 years ago

Hi,

Im facing a problem with TypeScript@next (1.9.0-dev.20160612-1.0). Im using ts-loader alongside webpack to build my current project. This project is backed by travis and appveyor for OS X, linux and windows builds, but windows builds are broken since upgrading to TypeScript@next.

The output of this function will result in different file lists on windows and for example OS X when using the exclude option.

OS X output (correct):

/Users/boo/privat/dwatch/app/src/components/shared/AutoRefreshComponent.ts
/Users/boo/privat/dwatch/app/src/components/shared/DockerStreamComponent.ts
/Users/boo/privat/dwatch/app/src/i18n/de_DE.ts
/Users/boo/privat/dwatch/app/src/i18n/en_US.ts
/Users/boo/privat/dwatch/app/src/i18n/index.ts
/Users/boo/privat/dwatch/app/src/models/ConnectionParametersModel.ts
/Users/boo/privat/dwatch/app/src/models/ContainerModel.ts
/Users/boo/privat/dwatch/app/src/models/ContainerStateModel.ts
/Users/boo/privat/dwatch/app/src/models/ImageModel.ts
/Users/boo/privat/dwatch/app/src/stores/ContainerStore.ts
/Users/boo/privat/dwatch/app/src/stores/DockerSystemStore.ts
/Users/boo/privat/dwatch/app/src/stores/ImageStore.ts
/Users/boo/privat/dwatch/app/src/stores/NotificationStore.ts
/Users/boo/privat/dwatch/app/src/stores/ReleaseStore.ts
/Users/boo/privat/dwatch/app/src/stores/SettingsStore.ts
/Users/boo/privat/dwatch/app/src/stores/UiStore.ts
/Users/boo/privat/dwatch/app/src/utils/DockerFacade.ts
/Users/boo/privat/dwatch/app/src/utils/Helper.ts
/Users/boo/privat/dwatch/app/src/utils/IOC.ts
/Users/boo/privat/dwatch/app/src/utils/JSONStream.d.ts
/Users/boo/privat/dwatch/app/src/utils/dockerode.d.ts
/Users/boo/privat/dwatch/app/tests/mocks/DockerFacade.ts
/Users/boo/privat/dwatch/app/tests/mocks/Dockerode.ts
/Users/boo/privat/dwatch/app/tests/mocks/Helper.ts
/Users/boo/privat/dwatch/app/tests/mocks/SettingsStore.ts
/Users/boo/privat/dwatch/app/tests/models/ContainerModel.ts
/Users/boo/privat/dwatch/app/tests/models/ContainerStateModel.ts
/Users/boo/privat/dwatch/app/tests/models/ImageModel.ts
/Users/boo/privat/dwatch/app/tests/stores/ContainerStore.ts
/Users/boo/privat/dwatch/app/tests/stores/DockerSystemStore.ts
/Users/boo/privat/dwatch/app/tests/stores/ImageStore.ts
/Users/boo/privat/dwatch/app/tests/stores/NotificationsStore.ts
/Users/boo/privat/dwatch/app/tests/stores/ReleaseStore.ts
/Users/boo/privat/dwatch/app/tests/stores/SettingsStore.ts
/Users/boo/privat/dwatch/app/tests/stores/UiStore.ts
/Users/boo/privat/dwatch/app/tests/utils/DockerFacade.ts
/Users/boo/privat/dwatch/app/tests/utils/Helper.ts
/Users/boo/privat/dwatch/app/tests/utils/IOC.ts
/Users/boo/privat/dwatch/typings/index.d.ts
/Users/boo/privat/dwatch/typings/globals/expect/index.d.ts
/Users/boo/privat/dwatch/typings/globals/github-electron/index.d.ts
/Users/boo/privat/dwatch/typings/globals/mocha/index.d.ts
/Users/boo/privat/dwatch/typings/globals/node/index.d.ts
/Users/boo/privat/dwatch/typings/globals/react/index.d.ts
/Users/boo/privat/dwatch/typings/globals/react-dom/index.d.ts
/Users/boo/privat/dwatch/typings/globals/react-intl/index.d.ts
/Users/boo/privat/dwatch/typings/globals/whatwg-fetch/index.d.ts
/Users/boo/privat/dwatch/typings/modules/react-router/index.d.ts
/Users/boo/privat/dwatch/app/src/Routes.tsx
/Users/boo/privat/dwatch/app/src/index.tsx
/Users/boo/privat/dwatch/app/src/components/App.tsx
/Users/boo/privat/dwatch/app/src/components/container/Container.tsx
/Users/boo/privat/dwatch/app/src/components/container/Stats.tsx
/Users/boo/privat/dwatch/app/src/components/container/Top.tsx
/Users/boo/privat/dwatch/app/src/components/container/cards/ContainerCard.tsx
/Users/boo/privat/dwatch/app/src/components/container/cards/DetailCard.tsx
/Users/boo/privat/dwatch/app/src/components/container/cards/LiveFeedCard.tsx
/Users/boo/privat/dwatch/app/src/components/container/cards/NetworkCard.tsx
/Users/boo/privat/dwatch/app/src/components/container/cards/NodeCard.tsx
/Users/boo/privat/dwatch/app/src/components/container/cards/StatsCard.tsx
/Users/boo/privat/dwatch/app/src/components/containers/Containers.tsx
/Users/boo/privat/dwatch/app/src/components/home/Home.tsx
/Users/boo/privat/dwatch/app/src/components/home/cards/ContainersCard.tsx
/Users/boo/privat/dwatch/app/src/components/home/cards/ImagesCard.tsx
/Users/boo/privat/dwatch/app/src/components/home/cards/SystemCard.tsx
/Users/boo/privat/dwatch/app/src/components/image/Image.tsx
/Users/boo/privat/dwatch/app/src/components/image/cards/DetailCard.tsx
/Users/boo/privat/dwatch/app/src/components/image/cards/HistoryCard.tsx
/Users/boo/privat/dwatch/app/src/components/image/cards/ImageCard.tsx
/Users/boo/privat/dwatch/app/src/components/images/Images.tsx
/Users/boo/privat/dwatch/app/src/components/settings/Settings.tsx
/Users/boo/privat/dwatch/app/src/components/shared/AsyncButton.tsx
/Users/boo/privat/dwatch/app/src/components/shared/MDLWrapper.tsx
/Users/boo/privat/dwatch/app/src/components/shared/Notifications.tsx
/Users/boo/privat/dwatch/app/src/components/shared/TwoColumnCardRow.tsx
/Users/boo/privat/dwatch/app/src/components/site/AppDrawer.tsx
/Users/boo/privat/dwatch/app/src/components/site/Header.tsx
/Users/boo/privat/dwatch/app/src/components/site/LocaleSwitcher.tsx
/Users/boo/privat/dwatch/app/src/components/site/UpdateNoifications.tsx
/Users/boo/privat/dwatch/app/src/utils/JSONStream.d.ts
/Users/boo/privat/dwatch/app/src/utils/dockerode.d.ts
/Users/boo/privat/dwatch/typings/index.d.ts
/Users/boo/privat/dwatch/typings/globals/expect/index.d.ts
/Users/boo/privat/dwatch/typings/globals/github-electron/index.d.ts
/Users/boo/privat/dwatch/typings/globals/mocha/index.d.ts
/Users/boo/privat/dwatch/typings/globals/node/index.d.ts
/Users/boo/privat/dwatch/typings/globals/react/index.d.ts
/Users/boo/privat/dwatch/typings/globals/react-dom/index.d.ts
/Users/boo/privat/dwatch/typings/globals/react-intl/index.d.ts
/Users/boo/privat/dwatch/typings/globals/whatwg-fetch/index.d.ts
/Users/boo/privat/dwatch/typings/modules/react-router/index.d.ts
...

Windows output (contains excluded paths):

C:\Users\boo\dwatch/app/node_modules/immutable/contrib/cursor/index.d.ts
C:\Users\boo\dwatch/app/node_modules/immutable/dist/immutable-nonambient.d.ts
C:\Users\boo\dwatch/app/node_modules/immutable/dist/immutable.d.ts
C:\Users\boo\dwatch/app/node_modules/inversify-dts/inversify/inversify.d.ts
C:\Users\boo\dwatch/app/node_modules/inversify-dts/inversify-binding-decorators/inversify-binding-decorators.d.ts
C:\Users\boo\dwatch/app/node_modules/inversify-dts/inversify-express-utils/inversify-express-utils-tests.ts
C:\Users\boo\dwatch/app/node_modules/inversify-dts/inversify-express-utils/inversify-express-utils.d.ts
C:\Users\boo\dwatch/app/node_modules/inversify-dts/inversify-logger-middleware/inversify-logger-middleware.d.ts
C:\Users\boo\dwatch/app/node_modules/mobx/lib/mobx.d.ts
C:\Users\boo\dwatch/app/node_modules/mobx-react/custom.d.ts
C:\Users\boo\dwatch/app/node_modules/mobx-react/index.d.ts
C:\Users\boo\dwatch/app/node_modules/mobx-react/native.d.ts
C:\Users\boo\dwatch/app/node_modules/reflect-metadata/Reflect.ts
C:\Users\boo\dwatch/app/node_modules/reflect-metadata/reflect-metadata.d.ts
C:\Users\boo\dwatch/app/node_modules/reflect-metadata/typings.d.ts
C:\Users\boo\dwatch/app/node_modules/reflect-metadata/test/harness.ts
C:\Users\boo\dwatch/app/node_modules/reflect-metadata/test/run.ts
C:\Users\boo\dwatch/app/node_modules/reflect-metadata/test/spec.ts
C:\Users\boo\dwatch/app/node_modules/reflect-metadata/test/reflect/reflect-decorate.ts
C:\Users\boo\dwatch/app/node_modules/reflect-metadata/test/reflect/reflect-definemetadata.ts
C:\Users\boo\dwatch/app/node_modules/reflect-metadata/test/reflect/reflect-deletemetadata.ts
C:\Users\boo\dwatch/app/node_modules/reflect-metadata/test/reflect/reflect-getmetadata.ts
C:\Users\boo\dwatch/app/node_modules/reflect-metadata/test/reflect/reflect-getmetadatakeys.ts
C:\Users\boo\dwatch/app/node_modules/reflect-metadata/test/reflect/reflect-getownmetadata.ts
C:\Users\boo\dwatch/app/node_modules/reflect-metadata/test/reflect/reflect-getownmetadatakeys.ts
C:\Users\boo\dwatch/app/node_modules/reflect-metadata/test/reflect/reflect-hasmetadata.ts
C:\Users\boo\dwatch/app/node_modules/reflect-metadata/test/reflect/reflect-hasownmetadata.ts
C:\Users\boo\dwatch/app/node_modules/reflect-metadata/test/reflect/reflect-metadata.ts
C:\Users\boo\dwatch/app/node_modules/reflect-metadata/typings/node.d.ts
C:\Users\boo\dwatch/app/src/components/shared/AutoRefreshComponent.ts
C:\Users\boo\dwatch/app/src/components/shared/DockerStreamComponent.ts
C:\Users\boo\dwatch/app/src/i18n/de_DE.ts
C:\Users\boo\dwatch/app/src/i18n/en_US.ts
C:\Users\boo\dwatch/app/src/i18n/index.ts
C:\Users\boo\dwatch/app/src/models/ConnectionParametersModel.ts
C:\Users\boo\dwatch/app/src/models/ContainerModel.ts
C:\Users\boo\dwatch/app/src/models/ContainerStateModel.ts
C:\Users\boo\dwatch/app/src/models/ImageModel.ts
C:\Users\boo\dwatch/app/src/stores/ContainerStore.ts
C:\Users\boo\dwatch/app/src/stores/DockerSystemStore.ts
C:\Users\boo\dwatch/app/src/stores/ImageStore.ts
C:\Users\boo\dwatch/app/src/stores/NotificationStore.ts
C:\Users\boo\dwatch/app/src/stores/ReleaseStore.ts
C:\Users\boo\dwatch/app/src/stores/SettingsStore.ts
C:\Users\boo\dwatch/app/src/stores/UiStore.ts
C:\Users\boo\dwatch/app/src/utils/DockerFacade.ts
C:\Users\boo\dwatch/app/src/utils/Helper.ts
C:\Users\boo\dwatch/app/src/utils/IOC.ts
C:\Users\boo\dwatch/app/src/utils/JSONStream.d.ts
C:\Users\boo\dwatch/app/src/utils/dockerode.d.ts
C:\Users\boo\dwatch/app/tests/mocks/DockerFacade.ts
C:\Users\boo\dwatch/app/tests/mocks/Dockerode.ts
C:\Users\boo\dwatch/app/tests/mocks/Helper.ts
C:\Users\boo\dwatch/app/tests/mocks/SettingsStore.ts
C:\Users\boo\dwatch/app/tests/models/ContainerModel.ts
C:\Users\boo\dwatch/app/tests/models/ContainerStateModel.ts
C:\Users\boo\dwatch/app/tests/models/ImageModel.ts
C:\Users\boo\dwatch/app/tests/stores/ContainerStore.ts
C:\Users\boo\dwatch/app/tests/stores/DockerSystemStore.ts
C:\Users\boo\dwatch/app/tests/stores/ImageStore.ts
C:\Users\boo\dwatch/app/tests/stores/NotificationsStore.ts
C:\Users\boo\dwatch/app/tests/stores/ReleaseStore.ts
C:\Users\boo\dwatch/app/tests/stores/SettingsStore.ts
C:\Users\boo\dwatch/app/tests/stores/UiStore.ts
C:\Users\boo\dwatch/app/tests/utils/DockerFacade.ts
C:\Users\boo\dwatch/app/tests/utils/Helper.ts
C:\Users\boo\dwatch/app/tests/utils/IOC.ts
C:\Users\boo\dwatch/node_modules/7zip-bin/index.d.ts
C:\Users\boo\dwatch/node_modules/any-promise/implementation.d.ts
C:\Users\boo\dwatch/node_modules/any-promise/index.d.ts
C:\Users\boo\dwatch/node_modules/any-promise/register.d.ts
C:\Users\boo\dwatch/node_modules/any-promise/register/bluebird.d.ts
C:\Users\boo\dwatch/node_modules/any-promise/register/es6-promise.d.ts
C:\Users\boo\dwatch/node_modules/any-promise/register/lie.d.ts
C:\Users\boo\dwatch/node_modules/any-promise/register/native-promise-only.d.ts
C:\Users\boo\dwatch/node_modules/any-promise/register/pinkie.d.ts
C:\Users\boo\dwatch/node_modules/any-promise/register/promise.d.ts
C:\Users\boo\dwatch/node_modules/any-promise/register/q.d.ts
C:\Users\boo\dwatch/node_modules/any-promise/register/rsvp.d.ts
C:\Users\boo\dwatch/node_modules/any-promise/register/vow.d.ts
C:\Users\boo\dwatch/node_modules/any-promise/register/when.d.ts
C:\Users\boo\dwatch/node_modules/camel-case/camel-case.d.ts
C:\Users\boo\dwatch/node_modules/change-case/change-case.d.ts
C:\Users\boo\dwatch/node_modules/constant-case/constant-case.d.ts
C:\Users\boo\dwatch/node_modules/dot-case/dot-case.d.ts
C:\Users\boo\dwatch/node_modules/electron-builder/out/electron-builder.d.ts
C:\Users\boo\dwatch/node_modules/electron-osx-sign-tf/index.d.ts
C:\Users\boo\dwatch/node_modules/electron-packager-tf/node_modules/electron-osx-sign/index.d.ts
C:\Users\boo\dwatch/node_modules/emock/dist/emock.d.ts
C:\Users\boo\dwatch/node_modules/emock/src/emock.ts
C:\Users\boo\dwatch/node_modules/emock/src/mock/MetaKeys.ts
C:\Users\boo\dwatch/node_modules/emock/src/mock/Mock.ts
C:\Users\boo\dwatch/node_modules/emock/src/utils/ExpectExtensions.ts
C:\Users\boo\dwatch/node_modules/emock/src/utils/Helper.ts
C:\Users\boo\dwatch/node_modules/emock/src/utils/It.ts
C:\Users\boo\dwatch/node_modules/emock/src/utils/is-equal.d.ts
C:\Users\boo\dwatch/node_modules/emock/tests/Helper.ts
C:\Users\boo\dwatch/node_modules/emock/tests/Mock.ts
C:\Users\boo\dwatch/node_modules/fs-extra-p/bluebird.d.ts
C:\Users\boo\dwatch/node_modules/fs-extra-p/index.d.ts
C:\Users\boo\dwatch/node_modules/inversify-dts/inversify/inversify.d.ts
C:\Users\boo\dwatch/node_modules/inversify-dts/inversify-binding-decorators/inversify-binding-decorators.d.ts
C:\Users\boo\dwatch/node_modules/inversify-dts/inversify-express-utils/inversify-express-utils-tests.ts
C:\Users\boo\dwatch/node_modules/inversify-dts/inversify-express-utils/inversify-express-utils.d.ts
C:\Users\boo\dwatch/node_modules/inversify-dts/inversify-logger-middleware/inversify-logger-middleware.d.ts
C:\Users\boo\dwatch/node_modules/is-lower-case/is-lower-case.d.ts
C:\Users\boo\dwatch/node_modules/is-upper-case/is-upper-case.d.ts
C:\Users\boo\dwatch/node_modules/lower-case/lower-case.d.ts
C:\Users\boo\dwatch/node_modules/lower-case-first/lower-case-first.d.ts
C:\Users\boo\dwatch/node_modules/make-error-cause/dist/index.d.ts
C:\Users\boo\dwatch/node_modules/make-error-cause/dist/index.spec.d.ts
C:\Users\boo\dwatch/node_modules/mobx-react-devtools/index.d.ts
C:\Users\boo\dwatch/node_modules/param-case/param-case.d.ts
C:\Users\boo\dwatch/node_modules/pascal-case/pascal-case.d.ts
C:\Users\boo\dwatch/node_modules/path-case/path-case.d.ts
C:\Users\boo\dwatch/node_modules/popsicle/dist/base.d.ts
C:\Users\boo\dwatch/node_modules/popsicle/dist/browser.d.ts
C:\Users\boo\dwatch/node_modules/popsicle/dist/common.d.ts
C:\Users\boo\dwatch/node_modules/popsicle/dist/error.d.ts
C:\Users\boo\dwatch/node_modules/popsicle/dist/form.d.ts
C:\Users\boo\dwatch/node_modules/popsicle/dist/index.d.ts
C:\Users\boo\dwatch/node_modules/popsicle/dist/jar.d.ts
C:\Users\boo\dwatch/node_modules/popsicle/dist/request.d.ts
C:\Users\boo\dwatch/node_modules/popsicle/dist/response.d.ts
C:\Users\boo\dwatch/node_modules/popsicle/dist/browser/form-data.d.ts
C:\Users\boo\dwatch/node_modules/popsicle/dist/browser/tough-cookie.d.ts
C:\Users\boo\dwatch/node_modules/popsicle/dist/plugins/browser.d.ts
C:\Users\boo\dwatch/node_modules/popsicle/dist/plugins/common.d.ts
C:\Users\boo\dwatch/node_modules/popsicle/dist/plugins/index.d.ts
C:\Users\boo\dwatch/node_modules/popsicle/dist/plugins/is-host/browser.d.ts
C:\Users\boo\dwatch/node_modules/popsicle/dist/plugins/is-host/index.d.ts
C:\Users\boo\dwatch/node_modules/popsicle/dist/test/index.d.ts
C:\Users\boo\dwatch/node_modules/popsicle-proxy-agent/dist/index.d.ts
C:\Users\boo\dwatch/node_modules/popsicle-proxy-agent/dist/index.spec.d.ts
C:\Users\boo\dwatch/node_modules/popsicle-retry/dist/index.d.ts
C:\Users\boo\dwatch/node_modules/popsicle-status/popsicle-status.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/at-rule.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/comment.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/container.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/css-syntax-error.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/declaration.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/input.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/lazy-result.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/list.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/map-generator.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/node.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/parse.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/parser.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/postcss.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/previous-map.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/processor.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/result.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/root.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/rule.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/stringifier.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/stringify.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/tokenize.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/vendor.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/warn-once.d.ts
C:\Users\boo\dwatch/node_modules/postcss/d.ts/warning.d.ts
C:\Users\boo\dwatch/node_modules/promise-finally/dist/promise-finally.d.ts
C:\Users\boo\dwatch/node_modules/promise-finally/dist/promise-finally.spec.d.ts
C:\Users\boo\dwatch/node_modules/remap-istanbul/typings/browser.d.ts
C:\Users\boo\dwatch/node_modules/remap-istanbul/typings/main.d.ts
C:\Users\boo\dwatch/node_modules/remap-istanbul/typings/browser/ambient/node/index.d.ts
C:\Users\boo\dwatch/node_modules/remap-istanbul/typings/main/ambient/node/index.d.ts
C:\Users\boo\dwatch/node_modules/sentence-case/sentence-case.d.ts
C:\Users\boo\dwatch/node_modules/snake-case/snake-case.d.ts
C:\Users\boo\dwatch/node_modules/swap-case/swap-case.d.ts
C:\Users\boo\dwatch/node_modules/throwback/dist/index.d.ts
C:\Users\boo\dwatch/node_modules/throwback/dist/index.spec.d.ts
C:\Users\boo\dwatch/node_modules/title-case/title-case.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.dom.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.dom.iterable.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.es2015.collection.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.es2015.core.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.es2015.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.es2015.generator.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.es2015.iterable.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.es2015.promise.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.es2015.proxy.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.es2015.reflect.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.es2015.symbol.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.es2016.array.include.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.es2016.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.es2017.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.es2017.object.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.es5.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.es6.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.scripthost.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/lib.webworker.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/tsserverlibrary.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/typescript.d.ts
C:\Users\boo\dwatch/node_modules/typescript/lib/typescriptServices.d.ts
...

It seems that this function fails to recognize the excluded file paths for windows. The exclude input parameter on windows is:

[ 'C:/Users/boo/dwatch/node_modules',
  'C:/Users/boo/dwatch/app/node_modules',
  'C:/Users/boo/dwatch/dist',
  'C:/Users/boo/dwatch/coverage',
  'C:/Users/boo/dwatch/generated',
  'C:/Users/boo/dwatch/assets' ]

(note the slashes compared to the file list above)

This behavior results in many Duplicate Identifier and other errors while compiling TS files. See https://ci.appveyor.com/project/otbe/dwatch/build/0.4.72 for example.

When using tsc from the command line this does not happen. It seems to be related to the nodejs API of TypeScript. Related to #9049.

Thanks!

otbe commented 8 years ago

I think I got it. If I add

basePath = normalizeSlashes(basePath);

to the beginning of this function it works. Problem is that API users (like ts-loader) pass in a windows path, e.g. C:\Users\boo\dwatch when used on windows, but TypeScript works with normalized ones (slashes instead of backslashes). I guess parseJsonConfigFileContent and any other API method should ensure this (by throwing or normalizing) or you should add it to the docs.

If fix is okay I will place a PR.

Thanks! :)

mhegazy commented 8 years ago

PRs welcomed.