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

Swallow process kill errors #8260

Merged
merged 3 commits into from Aug 6, 2019
Merged

Swallow process kill errors #8260

merged 3 commits into from Aug 6, 2019

Conversation

Timer
Copy link
Member

@Timer Timer commented Aug 6, 2019

Windows' taskkill doesn't like if a process is already dead -- we'll swallow this error in tests for now.

@ijjk
Copy link
Member

ijjk commented Aug 6, 2019

Stats from current PR

Click to expand stats ⚠️ Total Bundle Size Increase ⚠️
zeit/next.js canary Timer/next.js try-fix-windows Change
Build Duration 14.2s 14.5s ⚠️ +298ms
node_modules Size 43.6 MB 43.6 MB -416 B
Total Bundle (main, webpack, commons) Size 206 kB 206 kB ⚠️ +87 B
Total Bundle (main, webpack, commons) gzip Size 67.8 kB 67.8 kB ⚠️ +17 B
Client _app Size 2.39 kB 2.39 kB
Client _app gzip Size 1.08 kB 1.08 kB
Client _error Size 8.22 kB 8.22 kB
Client _error gzip Size 3.16 kB 3.16 kB
Client pages/index Size 343 B 343 B
Client pages/index gzip Size 246 B 246 B
Client pages/link Size 4.08 kB 4.08 kB
Client pages/link gzip Size 1.8 kB 1.8 kB
Client pages/routerDirect Size 423 B 423 B
Client pages/routerDirect gzip Size 306 B 306 B
Client pages/withRouter Size 435 B 435 B
Client pages/withRouter gzip Size 301 B 301 B
Client main Size 15.4 kB 15.4 kB
Client main gzip Size 5.35 kB 5.35 kB
Client commons Size 188 kB 188 kB ⚠️ +87 B
Client commons gzip Size 61.1 kB 61.1 kB ⚠️ +17 B
Client webpack Size 1.53 kB 1.53 kB
Client webpack gzip Size 778 B 778 B
Base Rendered Size 1.35 kB 1.35 kB
Build Dir Size 700 kB 702 kB ⚠️ +1.96 kB
Click to expand serverless stats ⚠️ Total Bundle Size Increase ⚠️
zeit/next.js canary Timer/next.js try-fix-windows Change
Build Duration 15.3s 15.2s -182ms
node_modules Size 43.6 MB 43.6 MB -416 B
Total Bundle (main, webpack, commons) Size 206 kB 206 kB ⚠️ +87 B
Total Bundle (main, webpack, commons) gzip Size 67.8 kB 67.8 kB ⚠️ +17 B
Client _app Size 2.39 kB 2.39 kB
Client _app gzip Size 1.08 kB 1.08 kB
Client _error Size 8.22 kB 8.22 kB
Client _error gzip Size 3.16 kB 3.16 kB
Client pages/index Size 343 B 343 B
Client pages/index gzip Size 246 B 246 B
Client pages/link Size 4.08 kB 4.08 kB
Client pages/link gzip Size 1.8 kB 1.8 kB
Client pages/routerDirect Size 423 B 423 B
Client pages/routerDirect gzip Size 306 B 306 B
Client pages/withRouter Size 435 B 435 B
Client pages/withRouter gzip Size 301 B 301 B
Client main Size 15.4 kB 15.4 kB
Client main gzip Size 5.35 kB 5.35 kB
Client commons Size 188 kB 188 kB ⚠️ +87 B
Client commons gzip Size 61.1 kB 61.1 kB ⚠️ +17 B
Client webpack Size 1.53 kB 1.53 kB
Client webpack gzip Size 778 B 778 B
Serverless pages/link Size 251 kB 251 kB ⚠️ +434 B
Serverless pages/link gzip Size 67.8 kB 67.8 kB ⚠️ +60 B
Serverless pages/index Size 243 kB 244 kB ⚠️ +434 B
Serverless pages/index gzip Size 65.6 kB 65.6 kB ⚠️ +59 B
Serverless pages/_error Size 243 kB 243 kB ⚠️ +434 B
Serverless pages/_error gzip Size 65.3 kB 65.4 kB ⚠️ +58 B
Serverless pages/routerDirect Size 244 kB 244 kB ⚠️ +434 B
Serverless pages/routerDirect gzip Size 65.5 kB 65.6 kB ⚠️ +56 B
Serverless pages/withRouter Size 244 kB 244 kB ⚠️ +434 B
Serverless pages/withRouter gzip Size 65.7 kB 65.7 kB ⚠️ +57 B
Build Dir Size 1.88 MB 1.89 MB ⚠️ +3.26 kB
Diff for commons.js
@@ -6684,7 +6684,8 @@ var singletonRouter = {
   }
 }; // Create public properties and methods of the router in the singletonRouter
 
-var urlPropertyFields = ['pathname', 'route', 'query', 'asPath', 'components'];
+var urlPropertyFields = ['pathname', 'route', 'query', 'asPath'];
+var propertyFields = ['components'];
 var routerEvents = ['routeChangeStart', 'beforeHistoryChange', 'routeChangeComplete', 'routeChangeError', 'hashChangeStart', 'hashChangeComplete'];
 var coreMethodFields = ['push', 'replace', 'reload', 'back', 'prefetch', 'beforePopState']; // Events is a static property on the router, the router doesn't have to be initialized to use it
 
@@ -6693,7 +6694,7 @@ var coreMethodFields = ['push', 'replace', 'reload', 'back', 'prefetch', 'before
     return _router2["default"].events;
   }
 });
-urlPropertyFields.forEach(function (field) {
+propertyFields.concat(urlPropertyFields).forEach(function (field) {
   // Here we need to use Object.defineProperty because, we need to return
   // the property assigned to the actual router
   // The value might get changed as we change routes and this is the
@@ -6792,6 +6793,17 @@ function makePublicRouterInstance(router) {
 
 
   instance.events = _router2["default"].events;
+  propertyFields.forEach(function (field) {
+    // Here we need to use Object.defineProperty because, we need to return
+    // the property assigned to the actual router
+    // The value might get changed as we change routes and this is the
+    // proper way to access it
+    (0, _defineProperty["default"])(instance, field, {
+      get: function get() {
+        return _router[field];
+      }
+    });
+  });
   coreMethodFields.forEach(function (field) {
     instance[field] = function () {
       return _router[field].apply(_router, arguments);

@ijjk
Copy link
Member

ijjk commented Aug 6, 2019

Stats from current PR

Click to expand stats
zeit/next.js canary Timer/next.js try-fix-windows Change
Build Duration 13.1s 13.2s ⚠️ +34ms
node_modules Size 43.6 MB 43.6 MB ⚠️ +4 B
Total Bundle (main, webpack, commons) Size 206 kB 206 kB
Total Bundle (main, webpack, commons) gzip Size 67.8 kB 67.8 kB ⚠️ +1 B
Client _app Size 2.39 kB 2.39 kB
Client _app gzip Size 1.08 kB 1.08 kB ⚠️ +1 B
Client _error Size 8.22 kB 8.22 kB
Client _error gzip Size 3.16 kB 3.16 kB
Client pages/index Size 343 B 343 B
Client pages/index gzip Size 246 B 246 B
Client pages/link Size 4.08 kB 4.08 kB
Client pages/link gzip Size 1.8 kB 1.8 kB
Client pages/routerDirect Size 423 B 423 B
Client pages/routerDirect gzip Size 306 B 306 B
Client pages/withRouter Size 435 B 435 B
Client pages/withRouter gzip Size 300 B 301 B ⚠️ +1 B
Client main Size 15.4 kB 15.4 kB
Client main gzip Size 5.35 kB 5.35 kB
Client commons Size 188 kB 188 kB
Client commons gzip Size 61.1 kB 61.1 kB
Client webpack Size 1.53 kB 1.53 kB
Client webpack gzip Size 778 B 778 B
Base Rendered Size 1.35 kB 1.35 kB
Build Dir Size 700 kB 700 kB
Click to expand serverless stats
zeit/next.js canary Timer/next.js try-fix-windows Change
Build Duration 13.9s 13.8s -57ms
node_modules Size 43.6 MB 43.6 MB ⚠️ +4 B
Total Bundle (main, webpack, commons) Size 206 kB 206 kB
Total Bundle (main, webpack, commons) gzip Size 67.8 kB 67.8 kB
Client _app Size 2.39 kB 2.39 kB
Client _app gzip Size 1.08 kB 1.08 kB
Client _error Size 8.22 kB 8.22 kB
Client _error gzip Size 3.16 kB 3.16 kB
Client pages/index Size 343 B 343 B
Client pages/index gzip Size 246 B 246 B
Client pages/link Size 4.08 kB 4.08 kB
Client pages/link gzip Size 1.8 kB 1.8 kB
Client pages/routerDirect Size 423 B 423 B
Client pages/routerDirect gzip Size 306 B 306 B
Client pages/withRouter Size 435 B 435 B
Client pages/withRouter gzip Size 301 B 301 B
Client main Size 15.4 kB 15.4 kB
Client main gzip Size 5.35 kB 5.35 kB
Client commons Size 188 kB 188 kB
Client commons gzip Size 61.1 kB 61.1 kB
Client webpack Size 1.53 kB 1.53 kB
Client webpack gzip Size 778 B 778 B
Serverless pages/link Size 251 kB 251 kB
Serverless pages/link gzip Size 67.8 kB 67.8 kB ⚠️ +1 B
Serverless pages/index Size 243 kB 243 kB
Serverless pages/index gzip Size 65.6 kB 65.6 kB ⚠️ +1 B
Serverless pages/_error Size 243 kB 243 kB
Serverless pages/_error gzip Size 65.3 kB 65.3 kB
Serverless pages/routerDirect Size 244 kB 244 kB
Serverless pages/routerDirect gzip Size 65.5 kB 65.5 kB ⚠️ +2 B
Serverless pages/withRouter Size 244 kB 244 kB
Serverless pages/withRouter gzip Size 65.7 kB 65.7 kB ⚠️ +1 B
Build Dir Size 1.88 MB 1.88 MB

@ijjk
Copy link
Member

ijjk commented Aug 6, 2019

Stats from current PR

Click to expand stats
zeit/next.js canary Timer/next.js try-fix-windows Change
Build Duration 13.1s 13s -57ms
node_modules Size 43.6 MB 43.6 MB ⚠️ +4 B
Total Bundle (main, webpack, commons) Size 206 kB 206 kB
Total Bundle (main, webpack, commons) gzip Size 67.8 kB 67.8 kB
Client _app Size 2.39 kB 2.39 kB
Client _app gzip Size 1.08 kB 1.08 kB
Client _error Size 8.22 kB 8.22 kB
Client _error gzip Size 3.16 kB 3.16 kB
Client pages/index Size 343 B 343 B
Client pages/index gzip Size 246 B 246 B
Client pages/link Size 4.08 kB 4.08 kB
Client pages/link gzip Size 1.8 kB 1.8 kB
Client pages/routerDirect Size 423 B 423 B
Client pages/routerDirect gzip Size 306 B 306 B
Client pages/withRouter Size 435 B 435 B
Client pages/withRouter gzip Size 301 B 301 B
Client main Size 15.4 kB 15.4 kB
Client main gzip Size 5.35 kB 5.35 kB
Client commons Size 188 kB 188 kB
Client commons gzip Size 61.1 kB 61.1 kB
Client webpack Size 1.53 kB 1.53 kB
Client webpack gzip Size 778 B 778 B
Base Rendered Size 1.35 kB 1.35 kB
Build Dir Size 700 kB 700 kB
Click to expand serverless stats
zeit/next.js canary Timer/next.js try-fix-windows Change
Build Duration 14.1s 14.3s ⚠️ +270ms
node_modules Size 43.6 MB 43.6 MB ⚠️ +4 B
Total Bundle (main, webpack, commons) Size 206 kB 206 kB
Total Bundle (main, webpack, commons) gzip Size 67.8 kB 67.8 kB
Client _app Size 2.39 kB 2.39 kB
Client _app gzip Size 1.08 kB 1.08 kB
Client _error Size 8.22 kB 8.22 kB
Client _error gzip Size 3.16 kB 3.16 kB
Client pages/index Size 343 B 343 B
Client pages/index gzip Size 246 B 246 B
Client pages/link Size 4.08 kB 4.08 kB
Client pages/link gzip Size 1.8 kB 1.8 kB
Client pages/routerDirect Size 423 B 423 B
Client pages/routerDirect gzip Size 306 B 306 B
Client pages/withRouter Size 435 B 435 B
Client pages/withRouter gzip Size 301 B 301 B
Client main Size 15.4 kB 15.4 kB
Client main gzip Size 5.35 kB 5.35 kB
Client commons Size 188 kB 188 kB
Client commons gzip Size 61.1 kB 61.1 kB
Client webpack Size 1.53 kB 1.53 kB
Client webpack gzip Size 778 B 778 B
Serverless pages/link Size 251 kB 251 kB
Serverless pages/link gzip Size 67.8 kB 67.8 kB
Serverless pages/index Size 243 kB 243 kB
Serverless pages/index gzip Size 65.6 kB 65.6 kB -1 B
Serverless pages/_error Size 243 kB 243 kB
Serverless pages/_error gzip Size 65.3 kB 65.3 kB
Serverless pages/routerDirect Size 244 kB 244 kB
Serverless pages/routerDirect gzip Size 65.5 kB 65.5 kB -2 B
Serverless pages/withRouter Size 244 kB 244 kB
Serverless pages/withRouter gzip Size 65.7 kB 65.7 kB ⚠️ +1 B
Build Dir Size 1.88 MB 1.88 MB

@Timer Timer merged commit a3d64ab into vercel:canary Aug 6, 2019
@Timer Timer deleted the try-fix-windows branch August 6, 2019 16:51
@vercel vercel locked as resolved and limited conversation to collaborators Feb 1, 2022
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.

None yet

2 participants