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

A little bit of maintenance on the ReasonML examples #11662

Conversation

scull7
Copy link
Contributor

@scull7 scull7 commented Apr 4, 2020

  • update the todo example to the latest bs-platform
  • add the babel-types package to both examples to fix the next compiler complaint.
  • remove extraneous babel-plugin-bucklescript dependency.

scull7 added 2 commits April 4, 2020 07:00
`next dev` was failing with:

```
Error: Cannot find module 'babel-types'
```
Also add the `babel-types` package to stop the `next dev` command from complaining.
@scull7 scull7 requested review from lfades and Timer as code owners April 4, 2020 14:10
@ijjk
Copy link
Member

ijjk commented Apr 4, 2020

Stats from current PR

Default Server Mode
General
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
buildDuration 9s 8.7s -281ms
nodeModulesSize 47.7 MB 47.7 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
main-HASH.js gzip 6.25 kB 6.25 kB
webpack-HASH.js gzip 746 B 746 B
de003c3a9d30..5272.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.3 kB 56.3 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
main-HASH.module.js gzip 4.78 kB 4.78 kB
webpack-HASH..dule.js gzip 746 B 746 B
de003c3a9d30..dule.js gzip 6.75 kB 6.75 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 51.4 kB 51.4 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Pages
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
_app.js gzip 1.24 kB 1.24 kB
_error.js gzip 3.15 kB 3.15 kB
hooks.js gzip 664 B 664 B
index.js gzip 222 B 222 B
link.js gzip 2.03 kB 2.03 kB
routerDirect.js gzip 279 B 279 B
withRouter.js gzip 278 B 278 B
Overall change 7.86 kB 7.86 kB
Client Pages Modern
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
_app.module.js gzip 594 B 594 B
_error.module.js gzip 2.08 kB 2.08 kB
hooks.module.js gzip 370 B 370 B
index.module.js gzip 212 B 212 B
link.module.js gzip 1.48 kB 1.48 kB
routerDirect..dule.js gzip 271 B 271 B
withRouter.m..dule.js gzip 270 B 270 B
Overall change 5.28 kB 5.28 kB
Client Build Manifests
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
_buildManifest.js gzip 61 B 61 B
_buildManife..dule.js gzip 61 B 61 B
Overall change 122 B 122 B
Rendered Page Sizes
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
index.html gzip 917 B 917 B
link.html gzip 926 B 926 B
withRouter.html gzip 914 B 914 B
Overall change 2.76 kB 2.76 kB

Serverless Mode (Increase detected ⚠️)
General
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
buildDuration 9.6s 9.7s ⚠️ +122ms
nodeModulesSize 47.7 MB 47.7 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
main-HASH.js gzip 6.25 kB 6.25 kB
webpack-HASH.js gzip 746 B 746 B
de003c3a9d30..5272.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.3 kB 56.3 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
main-HASH.module.js gzip 4.78 kB 4.78 kB
webpack-HASH..dule.js gzip 746 B 746 B
de003c3a9d30..dule.js gzip 6.75 kB 6.75 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 51.4 kB 51.4 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Pages
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
_app.js gzip 1.24 kB 1.24 kB
_error.js gzip 3.15 kB 3.15 kB
hooks.js gzip 664 B 664 B
index.js gzip 222 B 222 B
link.js gzip 2.03 kB 2.03 kB
routerDirect.js gzip 279 B 279 B
withRouter.js gzip 278 B 278 B
Overall change 7.86 kB 7.86 kB
Client Pages Modern
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
_app.module.js gzip 594 B 594 B
_error.module.js gzip 2.08 kB 2.08 kB
hooks.module.js gzip 370 B 370 B
index.module.js gzip 212 B 212 B
link.module.js gzip 1.48 kB 1.48 kB
routerDirect..dule.js gzip 271 B 271 B
withRouter.m..dule.js gzip 270 B 270 B
Overall change 5.28 kB 5.28 kB
Client Build Manifests
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
_buildManifest.js gzip 61 B 61 B
_buildManife..dule.js gzip 61 B 61 B
Overall change 122 B 122 B
Serverless bundles Overall increase ⚠️
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
_error.js gzip 233 kB 233 kB -292 B
404.html gzip 1.32 kB 1.32 kB
hooks.html gzip 956 B 956 B
index.js gzip 233 kB 233 kB ⚠️ +421 B
link.js gzip 243 kB 243 kB ⚠️ +129 B
routerDirect.js gzip 241 kB 241 kB ⚠️ +258 B
withRouter.js gzip 241 kB 241 kB ⚠️ +303 B
Overall change 1.19 MB 1.19 MB ⚠️ +819 B

@ijjk
Copy link
Member

ijjk commented Apr 4, 2020

Failing test suites

test/integration/preload-viewport/test/index.test.js

  • Prefetching Links in viewport > should not have unhandledRejection when failing to prefetch on link
Expand output

● Prefetching Links in viewport › should not have unhandledRejection when failing to prefetch on link

NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":"#invalid-link"}
  (Session info: headless chrome=80.0.3987.149)

  177 |     expect(await browser.eval('window.hadUnhandledReject')).toBeFalsy()
  178 | 
> 179 |     await browser.elementByCss('#invalid-link').moveTo()
      |     ^
  180 |     expect(await browser.eval('window.hadUnhandledReject')).toBeFalsy()
  181 |   })
  182 | 

  at Object.throwDecodedError (../node_modules/selenium-webdriver/lib/error.js:550:15)
  at parseHttpResponse (../node_modules/selenium-webdriver/lib/http.js:563:13)
  at Executor.execute (../node_modules/selenium-webdriver/lib/http.js:489:26)
  at thenableWebDriverProxy.execute (../node_modules/selenium-webdriver/lib/webdriver.js:699:17)
  at Object.<anonymous> (integration/preload-viewport/test/index.test.js:179:5)

@@ -19,7 +19,8 @@
},
"devDependencies": {
"@babel/core": "^7.4.3",
"bs-platform": "5.0.3",
"babel-types": "6.26.0",
Copy link
Member

@timneutkens timneutkens Apr 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this one needed? babel-types is the Babel 6 version of it's types 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.dropbox.com/s/49en6itmq3nwmiw/Screenshot%202020-04-05%2014.20.25.png?dl=0

Seems that it has to do with the Bucklescript babel plugin.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following occurs when I remove the babel-plugin-bucklescript from the package.json file.

[ error ] ./node_modules/next/dist/client/next-dev.js                                                                                                     │
Error: Cannot find module 'babel-plugin-bucklescript' from '/Users/nathansculli/src/scull7/next.js/examples/with-reasonml-todo'                           │
    at Array.map (<anonymous>)                                                                                                                            │
Error: Cannot find module '/Users/nathansculli/src/scull7/next.js/examples/with-reasonml-todo/.next/server/static/development/pages/_document'            │
Require stack:                                                                                                                                            │
- /Users/nathansculli/src/scull7/next.js/examples/with-reasonml-todo/node_modules/next/dist/next-server/server/load-components.js  

I don't know enough about the next.js dev server to understand why it's trying to load the plugin. I've used ripgrep to search the entire node_modules folder and can't find any reference to the plugin.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mike-engel/babel-plugin-bucklescript#7

Seems that the babel-plugin-bucklescript has been archived and that it's got an implicit dependency.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that I'm not very smart. I didn't realize that the babel-plugin-bucklescript dependency was coming from the .babelrc file 🤦‍♂ . I removed that dependency and the associated babel-types dependency and now all is well.

@timneutkens timneutkens added the examples Issue was opened via the examples template. label Apr 5, 2020
@scull7
Copy link
Contributor Author

scull7 commented Apr 5, 2020 via email

Seems the dependency has been deprecated, and it doesn't seem to be required
anyways.
@ijjk
Copy link
Member

ijjk commented Apr 5, 2020

Stats from current PR

Default Server Mode
General
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
buildDuration 10.9s 11s ⚠️ +96ms
nodeModulesSize 47.7 MB 47.7 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
main-HASH.js gzip 6.25 kB 6.25 kB
webpack-HASH.js gzip 746 B 746 B
de003c3a9d30..3f64.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.4 kB 56.4 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
main-HASH.module.js gzip 4.78 kB 4.78 kB
webpack-HASH..dule.js gzip 746 B 746 B
de003c3a9d30..dule.js gzip 6.82 kB 6.82 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 51.5 kB 51.5 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Pages
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
_app.js gzip 1.24 kB 1.24 kB
_error.js gzip 3.15 kB 3.15 kB
hooks.js gzip 664 B 664 B
index.js gzip 222 B 222 B
link.js gzip 2.03 kB 2.03 kB
routerDirect.js gzip 279 B 279 B
withRouter.js gzip 278 B 278 B
Overall change 7.86 kB 7.86 kB
Client Pages Modern
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
_app.module.js gzip 594 B 594 B
_error.module.js gzip 2.08 kB 2.08 kB
hooks.module.js gzip 370 B 370 B
index.module.js gzip 212 B 212 B
link.module.js gzip 1.48 kB 1.48 kB
routerDirect..dule.js gzip 271 B 271 B
withRouter.m..dule.js gzip 270 B 270 B
Overall change 5.28 kB 5.28 kB
Client Build Manifests
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
_buildManifest.js gzip 61 B 61 B
_buildManife..dule.js gzip 61 B 61 B
Overall change 122 B 122 B
Rendered Page Sizes
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
index.html gzip 918 B 918 B
link.html gzip 927 B 927 B
withRouter.html gzip 914 B 914 B
Overall change 2.76 kB 2.76 kB

Serverless Mode (Decrease detected ✓)
General
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
buildDuration 11.9s 11.9s ⚠️ +33ms
nodeModulesSize 47.7 MB 47.7 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
main-HASH.js gzip 6.25 kB 6.25 kB
webpack-HASH.js gzip 746 B 746 B
de003c3a9d30..3f64.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.4 kB 56.4 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
main-HASH.module.js gzip 4.78 kB 4.78 kB
webpack-HASH..dule.js gzip 746 B 746 B
de003c3a9d30..dule.js gzip 6.82 kB 6.82 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 51.5 kB 51.5 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Pages
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
_app.js gzip 1.24 kB 1.24 kB
_error.js gzip 3.15 kB 3.15 kB
hooks.js gzip 664 B 664 B
index.js gzip 222 B 222 B
link.js gzip 2.03 kB 2.03 kB
routerDirect.js gzip 279 B 279 B
withRouter.js gzip 278 B 278 B
Overall change 7.86 kB 7.86 kB
Client Pages Modern
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
_app.module.js gzip 594 B 594 B
_error.module.js gzip 2.08 kB 2.08 kB
hooks.module.js gzip 370 B 370 B
index.module.js gzip 212 B 212 B
link.module.js gzip 1.48 kB 1.48 kB
routerDirect..dule.js gzip 271 B 271 B
withRouter.m..dule.js gzip 270 B 270 B
Overall change 5.28 kB 5.28 kB
Client Build Manifests
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
_buildManifest.js gzip 61 B 61 B
_buildManife..dule.js gzip 61 B 61 B
Overall change 122 B 122 B
Serverless bundles Overall decrease ✓
zeit/next.js canary scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript Change
_error.js gzip 233 kB 233 kB -11 B
404.html gzip 1.32 kB 1.32 kB
hooks.html gzip 957 B 957 B
index.js gzip 233 kB 233 kB -264 B
link.js gzip 243 kB 243 kB -2 B
routerDirect.js gzip 241 kB 241 kB -45 B
withRouter.js gzip 241 kB 241 kB ⚠️ +7 B
Overall change 1.19 MB 1.19 MB -315 B

@timneutkens
Copy link
Member

timneutkens commented Apr 6, 2020

Interesting, will merge for now. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue was opened via the examples template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants