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

.stryker-tmp folder is added to the files array #698

Closed
simondel opened this issue Apr 14, 2018 · 3 comments
Closed

.stryker-tmp folder is added to the files array #698

simondel opened this issue Apr 14, 2018 · 3 comments
Assignees
Labels
🐛 Bug Something isn't working

Comments

@simondel
Copy link
Member

Mentioned by @rexmq in #669

If the .stryker-tmp folder is not in your .gitignore file it will be added to the files array and thus also to the sandboxes.

This can be seen in the robobar example if you remove the .stryker-tmp folder from the .gitignore file:
image
Now we suddenly have over 400 files in the sandbox, while we generally only have around 40 with this repository.

When users use the stryker init we can add the .stryker-tmp folder to their .gitignore file, if they have any. But we should also make sure that we either clean the tmp folder when we start stryker or that we just ignore those files if they end up as the result of the git query.

@simondel simondel added the 🐛 Bug Something isn't working label Apr 14, 2018
@sanderkoenders
Copy link
Member

I think we should ignore these files even if they show up in the git query. That way we don't have to rely on the users gitignore for this.

@nicojs
Copy link
Member

nicojs commented Apr 15, 2018

Maybe we can use -X .stryker-tmp? https://git-scm.com/docs/git-ls-files#git-ls-files--xltpatterngt

@rexmq
Copy link

rexmq commented Apr 16, 2018

I tried to put the .stryker-tmp folder in the gitignore file and got new errors as below.

[2018-04-16 23:03:00.564] [TRACE] TestRunnerChildProcessAdapter - [2018-04-16 23:03:00.564] [INFO] KarmaConfigReader - Importing config from "/Users/jack/workspace/disney/myapp/.stryker-tmp/sandbox6138282/karma.conf.js"

[2018-04-16 23:03:00.566] [TRACE] TestRunnerChildProcessAdapter - [2018-04-16 23:03:00.565] [DEBUG] config - Loading config /Users/jack/workspace/disney/myapp/.stryker-tmp/sandbox6138282/karma.conf.js

[2018-04-16 23:03:00.567] [TRACE] TestRunnerChildProcessAdapter - Karma: using environment: dev

[2018-04-16 23:03:02.635] [TRACE] TestRunnerChildProcessAdapter - [2018-04-16 23:03:02.634] [DEBUG] KarmaTestRunner - using config {
  "browsers": [
    "PhantomJS2"
  ],
  "frameworks": [
    "jasmine",
    "karma-typescript"
  ],
  "autoWatch": false,
  "LOG_DISABLE": "OFF",
  "LOG_ERROR": "ERROR",
  "LOG_WARN": "WARN",
  "LOG_INFO": "INFO",
  "LOG_DEBUG": "DEBUG",
  "ngHtml2JsPreprocessor": {
    "stripPrefix": "src",
    "moduleName": "vrum"
  },
  "browserDisconnectTolerance": 2,
  "files": [
    {
      "pattern": "__test_hooks_for_stryker__.js",
      "included": true,
      "watched": false,
      "served": false,
      "nocache": true
    },
    {
      "pattern": "./config/spec-bundle.js",
      "watched": true
    }
  ],
  "preprocessors": {
    "config/spec-bundle.js": [
      "webpack"
    ],
    "src/app/**/*.ts": [
      "karma-typescript",
      "webpack"
    ]
  },
  "reportSlowerThan": 5000,
  "reporters": [
    "progress",
    "karma-typescript"
  ],
  "specReporter": {
    "suppressSkipped": true,
    "suppressPassed": true,
    "showSpecTiming": true
  },
  "singleRun": false,
  "karmaTypescriptConfig": {
    "reports": {
      "html": {
        "directory": "coverage",
        "subdirectory": "../coverage",
        "filename": "../coverage"
      },
      "text-summary": ""
    },
    "coverageOptions": {
      "threshold": {
        "global": {
          "statements": 98,
          "branches": 98,
          "functions": 98,
          "lines": 98
        }
      }
    }
  },
  "webpack": {
    "context": "/Users/jack/workspace/disney/myapp/.stryker-tmp/sandbox6138282/src",
    "entry": {
      "vendor": "./vendor.ts",
      "app": "./app.ts"
    },
    "resolve": {
      "extensions": [
        ".ts",
        ".js"
      ]
    },
    "output": {
      "path": "/Users/jack/workspace/disney/myapp/.stryker-tmp/sandbox6138282/dist",
      "publicPath": "/",
      "filename": "[name]-[hash:6].bundle.js",
      "chunkFilename": "[id]-[hash:6].chunk.js"
    },
    "module": {
      "rules": [
        {
          "test": {},
          "exclude": [
            {}
          ],
          "use": "awesome-typescript-loader"
        },
        {
          "test": {},
          "loader": "raw-loader",
          "exclude": [
            "/Users/jack/workspace/disney/myapp/.stryker-tmp/sandbox6138282/src/index.html"
          ]
        },
        {
          "test": {},
          "enforce": "pre",
          "loader": "tslint-loader"
        },
        {
          "test": {},
          "use": [
            "style-loader",
            {
              "loader": "css-loader",
              "options": {
                "minimize": true
              }
            },
            "sass-loader"
          ]
        },
        {
          "test": {},
          "use": [
            "style-loader",
            {
              "loader": "css-loader",
              "options": {
                "minimize": true
              }
            }
          ]
        },
        {
          "test": {},
          "use": "file-loader?name=[name]-[hash:6].[ext]"
        },
        {
          "test": {},
          "use": "base64-font-loader"
        },
        {
          "test": {},
          "use": "file-loader?name=[name]-[hash:6].[ext]"
        },
        {
          "enforce": "post",
          "test": {},
          "loader": "istanbul-instrumenter-loader",
          "include": {},
          "exclude": [
            {},
            {}
          ]
        }
      ]
    },
    "plugins": [
      {},
      {
        "options": {
          "template": "./index.html",
          "filename": "index.html",
          "hash": false,
          "inject": "body",
          "compile": true,
          "favicon": false,
          "minify": false,
          "cache": true,
          "showErrors": true,
          "chunks": [
            "vendor",
            "app"
          ],
          "excludeChunks": [],
          "title": "Webpack App",
          "xhtml": false
        }
      },
      {
        "options": {
          "inline": {
            "test": []
          },
          "sync": {
            "test": []
          },
          "async": {
            "test": []
          },
          "defer": {
            "test": []
          },
          "module": {
            "test": []
          },
          "prefetch": {
            "test": [],
            "chunks": "initial"
          },
          "preload": {
            "test": [],
            "chunks": "initial"
          },
          "defaultAttribute": "defer",
          "removeInlinedAssets": true,
          "custom": []
        }
      },
      {
        "definitions": {
          "window.$": "jquery",
          "window.jQuery": "jquery"
        }
      },
      {},
      {
        "definitions": {
          "process.env": {
            "facebook": {
              "appId": "'842834699207060'",
              "version": "'v2.9'"
            }
          }
        }
      }
    ],
    "devtool": "cheap-module-eval-source-map",
    "performance": {
      "hints": false
    }
  },
  "webpackMiddleware": {
    "stats": "errors-only"
  },
  "logLevel": "ERROR",
  "port": 9234,
  "browserNoActivityTimeout": 1000000,
  "basePath": ".",
  "detached": false,
  "middleware": [
    "TestHooksMiddleware"
  ],
  "plugins": [
    "karma-*",
    {
      "middleware:TestHooksMiddleware": [
        "value",
        null
      ]
    }
  ]
}

[2018-04-16 23:03:05.779] [TRACE] TestRunnerChildProcessAdapter - webpack: wait until bundle finished: 

[2018-04-16 23:03:12.984] [TRACE] TestRunnerChildProcessAdapter - 
[at-loader] Using typescript@2.5.3 from typescript and "tsconfig.json" from /Users/jack/workspace/disney/myapp/.stryker-tmp/sandbox6138282/tsconfig.json.


[2018-04-16 23:04:14.946] [TRACE] TestRunnerChildProcessAdapter - 
[at-loader] Checking started in a separate process...

[2018-04-16 23:04:16.120] [ERROR] TestRunnerChildProcessAdapter - 
[at-loader] Checking finished with 21 errors

[2018-04-16 23:04:16.575] [ERROR] TestRunnerChildProcessAdapter - 
ERROR in Entry module not found: Error: Can't resolve './vendor.ts' in '/Users/jack/workspace/disney/myapp/.stryker-tmp/sandbox6138282/src'

ERROR in Entry module not found: Error: Can't resolve './app.ts' in '/Users/jack/workspace/disney/myapp/.stryker-tmp/sandbox6138282/src'

ERROR in ./src/app.js
Module not found: Error: Can't resolve './app/app.ts' in '/Users/jack/workspace/disney/myapp/.stryker-tmp/sandbox6138282/src'
 @ ./src/app.js 3:0-23
 @ ./config/spec-bundle.js

ERROR in [at-loader] ./src/app/brands/brands.component.spec.ts:12:14 
    TS2304: Cannot find name 'BrandsComponent'.

ERROR in [at-loader] ./src/app/common/directives/search/search-box.directive.spec.ts:597:31 
    TS2304: Cannot find name 'SearchBoxMessage'.

ERROR in [at-loader] ./src/app/common/directives/sub-nav/sub-nav.component.spec.ts:17:14 
    TS2304: Cannot find name 'SubNavComponent'.

ERROR in [at-loader] ./src/app/common/directives/sub-nav/sub-nav.component.spec.ts:18:17 
    TS2304: Cannot find name 'SubNavItem'.

ERROR in [at-loader] ./src/app/common/directives/sub-nav/sub-nav.component.spec.ts:19:18 
    TS2304: Cannot find name 'SubNavItem'.

ERROR in [at-loader] ./src/app/common/directives/variant-select/variant-select.component.spec.ts:14:14 
    TS2304: Cannot find name 'VariantSelectComponent'.

ERROR in [at-loader] ./src/app/compare/compare.component.spec.ts:26:14 
    TS2304: Cannot find name 'CompareComponent'.

ERROR in [at-loader] ./src/app/compare/compare.component.spec.ts:364:33 
    TS2304: Cannot find name 'SearchBoxMessage'.

ERROR in [at-loader] ./src/app/compare/ratings/compare-ratings.component.spec.ts:15:14 
    TS2304: Cannot find name 'CompareRatingsComponent'.

ERROR in [at-loader] ./src/app/compare/replace/compare-replace.component.spec.ts:12:14 
    TS2304: Cannot find name 'CompareReplaceComponent'.

ERROR in [at-loader] ./src/app/compare/review-panel/compare-review-panel.component.spec.ts:11:14 
    TS2304: Cannot find name 'CompareReviewPanelComponent'.

ERROR in [at-loader] ./src/app/compare/specifications/compare-specifications.component.spec.ts:5:30 
    TS2306: File '/Users/jack/workspace/disney/myapp/.stryker-tmp/sandbox6138282/src/app/compare/specifications/compare-specifications-variants.js' is not a module.

ERROR in [at-loader] ./src/app/compare/specifications/compare-specifications.component.spec.ts:17:22 
    TS2304: Cannot find name 'CarDetailsModel'.

ERROR in [at-loader] ./src/app/compare/specifications/compare-specifications.component.spec.ts:18:23 
    TS2304: Cannot find name 'CarDetailsModel'.

ERROR in [at-loader] ./src/app/compare/specifications/compare-specifications.component.spec.ts:19:18 
    TS2304: Cannot find name 'CompareSpecificationsComponent'.

ERROR in [at-loader] ./src/app/compare/variant-select/compare-variant-select.component.spec.ts:10:14 
    TS2304: Cannot find name 'CompareVariantSelectComponent'.

ERROR in [at-loader] ./src/app/footer/footer.component.spec.ts:7:13 
    TS2304: Cannot find name 'VrumFooterComponent'.

ERROR in [at-loader] ./src/app/get-a-quote/get-a-quote.controller.spec.ts:73:28 
    TS2304: Cannot find name 'UserDetails'.

ERROR in [at-loader] ./src/app/home/home-search.controller.spec.ts:48:31 
    TS2304: Cannot find name 'SearchBoxMessage'.

ERROR in [at-loader] ./src/app/navbar/navbar.directive.spec.ts:98:31 
    TS2304: Cannot find name 'SearchBoxMessage'.

ERROR in [at-loader] ./src/app/similar-cars/search/similar-cars-search.controller.spec.ts:42:31 
    TS2304: Cannot find name 'SearchBoxMessage'.

[2018-04-16 23:04:16.575] [TRACE] TestRunnerChildProcessAdapter - webpack: Failed to compile.

[2018-04-16 23:04:16.719] [TRACE] TestRunnerChildProcessAdapter - webpack: Compiling...

[2018-04-16 23:04:19.391] [TRACE] TestRunnerChildProcessAdapter - 
[at-loader] Checking started in a separate process...

[2018-04-16 23:04:19.394] [ERROR] TestRunnerChildProcessAdapter - 
[at-loader] Checking finished with 21 errors

[2018-04-16 23:04:19.494] [DEBUG] TimeoutDecorator - Starting timeout timer (300000 ms) for a test run
[2018-04-16 23:04:19.668] [ERROR] TestRunnerChildProcessAdapter - 
ERROR in Entry module not found: Error: Can't resolve './vendor.ts' in '/Users/jack/workspace/disney/myapp/.stryker-tmp/sandbox6138282/src'

ERROR in Entry module not found: Error: Can't resolve './app.ts' in '/Users/jack/workspace/disney/myapp/.stryker-tmp/sandbox6138282/src'

ERROR in ./src/app.js
Module not found: Error: Can't resolve './app/app.ts' in '/Users/jack/workspace/disney/myapp/.stryker-tmp/sandbox6138282/src'
 @ ./src/app.js 3:0-23
 @ ./config/spec-bundle.js

ERROR in [at-loader] ./src/app/brands/brands.component.spec.ts:12:14 
    TS2304: Cannot find name 'BrandsComponent'.

ERROR in [at-loader] ./src/app/common/directives/search/search-box.directive.spec.ts:597:31 
    TS2304: Cannot find name 'SearchBoxMessage'.

ERROR in [at-loader] ./src/app/common/directives/sub-nav/sub-nav.component.spec.ts:17:14 
    TS2304: Cannot find name 'SubNavComponent'.

ERROR in [at-loader] ./src/app/common/directives/sub-nav/sub-nav.component.spec.ts:18:17 
    TS2304: Cannot find name 'SubNavItem'.

ERROR in [at-loader] ./src/app/common/directives/sub-nav/sub-nav.component.spec.ts:19:18 
    TS2304: Cannot find name 'SubNavItem'.

ERROR in [at-loader] ./src/app/common/directives/variant-select/variant-select.component.spec.ts:14:14 
    TS2304: Cannot find name 'VariantSelectComponent'.

ERROR in [at-loader] ./src/app/compare/compare.component.spec.ts:26:14 
    TS2304: Cannot find name 'CompareComponent'.

ERROR in [at-loader] ./src/app/compare/compare.component.spec.ts:364:33 
    TS2304: Cannot find name 'SearchBoxMessage'.

ERROR in [at-loader] ./src/app/compare/ratings/compare-ratings.component.spec.ts:15:14 
    TS2304: Cannot find name 'CompareRatingsComponent'.

ERROR in [at-loader] ./src/app/compare/replace/compare-replace.component.spec.ts:12:14 
    TS2304: Cannot find name 'CompareReplaceComponent'.

ERROR in [at-loader] ./src/app/compare/review-panel/compare-review-panel.component.spec.ts:11:14 
    TS2304: Cannot find name 'CompareReviewPanelComponent'.

ERROR in [at-loader] ./src/app/compare/specifications/compare-specifications.component.spec.ts:5:30 
    TS2306: File '/Users/jack/workspace/disney/myapp/.stryker-tmp/sandbox6138282/src/app/compare/specifications/compare-specifications-variants.js' is not a module.

ERROR in [at-loader] ./src/app/compare/specifications/compare-specifications.component.spec.ts:17:22 
    TS2304: Cannot find name 'CarDetailsModel'.

ERROR in [at-loader] ./src/app/compare/specifications/compare-specifications.component.spec.ts:18:23 
    TS2304: Cannot find name 'CarDetailsModel'.

ERROR in [at-loader] ./src/app/compare/specifications/compare-specifications.component.spec.ts:19:18 
    TS2304: Cannot find name 'CompareSpecificationsComponent'.

ERROR in [at-loader] ./src/app/compare/variant-select/compare-variant-select.component.spec.ts:10:14 
    TS2304: Cannot find name 'CompareVariantSelectComponent'.

ERROR in [at-loader] ./src/app/footer/footer.component.spec.ts:7:13 
    TS2304: Cannot find name 'VrumFooterComponent'.

ERROR in [at-loader] ./src/app/get-a-quote/get-a-quote.controller.spec.ts:73:28 
    TS2304: Cannot find name 'UserDetails'.

ERROR in [at-loader] ./src/app/home/home-search.controller.spec.ts:48:31 
    TS2304: Cannot find name 'SearchBoxMessage'.

ERROR in [at-loader] ./src/app/navbar/navbar.directive.spec.ts:98:31 
    TS2304: Cannot find name 'SearchBoxMessage'.

ERROR in [at-loader] ./src/app/similar-cars/search/similar-cars-search.controller.spec.ts:42:31 
    TS2304: Cannot find name 'SearchBoxMessage'.

[2018-04-16 23:04:19.669] [TRACE] TestRunnerChildProcessAdapter - webpack: Failed to compile.

[2018-04-16 23:04:19.990] [TRACE] TestRunnerChildProcessAdapter - PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  Error: Cannot find module "./app/app.ts"
  at undefined:3


[2018-04-16 23:04:20.043] [TRACE] TestRunnerChildProcessAdapter - 
PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  Error: Cannot find module "./app/app.ts"
  at undefined:3


[2018-04-16 23:04:19.995] [INFO] KarmaTestRunner - karma run done with  1

[2018-04-16 23:04:20.045] [ERROR] InitialTestExecutor - One or more tests resulted in an error:
	Error: Cannot find module "./app/app.ts"
at undefined:3
[2018-04-16 23:04:20.045] [ERROR] StrykerCli - an error occurred Error: Something went wrong in the initial test run
    at InitialTestExecutor.validateResult (/Users/jack/workspace/disney/myapp/node_modules/stryker/src/process/InitialTestExecutor.js:123:15)
    at InitialTestExecutor.<anonymous> (/Users/jack/workspace/disney/myapp/node_modules/stryker/src/process/InitialTestExecutor.js:42:30)
    at step (/Users/jack/workspace/disney/myapp/node_modules/tslib/tslib.js:129:27)
    at Object.next (/Users/jack/workspace/disney/myapp/node_modules/tslib/tslib.js:110:57)
    at fulfilled (/Users/jack/workspace/disney/myapp/node_modules/tslib/tslib.js:100:62)
    at process._tickCallback (internal/process/next_tick.js:109:7)

@nicojs nicojs added backlog and removed backlog labels Apr 20, 2018
@nicojs nicojs self-assigned this Apr 20, 2018
@ghost ghost added 🛠 In progress and removed comitted labels Apr 20, 2018
simondel pushed a commit that referenced this issue Apr 20, 2018
…716)

Change our `git ls-files` command from to now include the argument `--exclude .stryker-tmp`. This makes sure that git does not list the `.stryker-tmp` folder itself.

Fixes #698
@ghost ghost removed the 🔎 Needs review label Apr 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants