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

[WIP] replace babel & browserify with rollup #948

Closed
wants to merge 4 commits into from

Conversation

leeoniya
Copy link

@leeoniya leeoniya commented Nov 21, 2018

this replaces babel & browserify with the much smaller and more efficient Rollup & a couple plugins (total node_modules: 7.89 MB, 469 Files). rollup also does a better job of dead code elim:

dygraph.min.js: 122 KB -> 106 KB

i'll leave this in WIP status until i get some feedback, since PRs seem to hang around in this repo with no activity :(

@danvk
Copy link
Owner

danvk commented Dec 3, 2018

Hi @leeoniya, thanks for the contribution! Rollup seems like a good fit for dygraphs and I'd like to incorporate this change.

My main question is whether this breaks any of the exported APIs. A few ways to check this are:

  • Build dygraph.js and open the various pages in tests/.
  • In particular check tests/exported-symbols.html.

@leeoniya
Copy link
Author

open the various pages in tests/.

i opened a few and they worked ok, but since many tests require interaction or are subtle, i dont even know what to look for. for me to manually verify that all features work exactly the same with no automated testing is pretty much impossible. i think this is something only you can do :(

In particular check tests/exported-symbols.html.

this looks fine.

@danvk
Copy link
Owner

danvk commented Jan 6, 2019

I pulled this branch and opened a few of the tests. This seems good. What's required to get the tests to pass?

@leeoniya
Copy link
Author

leeoniya commented Jan 7, 2019

What's required to get the tests to pass?

quite a bit more, actually.

after some tweaks to avoid utils mutation, i got auto_tests compiling/concating via Rollup.

when opening runner.html in Chrome i now get passes: 243, failures: 32. most of the failures are Cannot read property 'length' of undefined which seems like an easy fix. (can you take a look?)

once we get all tests passing, i'll try to hook up istanbul for coverage and replace phantomjs with puppeteer [1]. i don't know too much about travis and will be pretty much useless for any non-trivial tweaking of remaining shell scripts, so hopefully you can take over from there.

[1] https://www.npmjs.com/package/mocha-puppeteer

@leeoniya
Copy link
Author

leeoniya commented Jan 8, 2019

i'm going to keep digging. i'm starting to understand a bit better how the tests are structured.

@leeoniya
Copy link
Author

leeoniya commented Jan 8, 2019

passes: 330   failures: 0   duration: 8.23s

ok, i got all auto_tests passing on Windows 10 in Chrome and Firefox. the additional changes that were required:

  • create a global Dygraph.setGetContext for testing & Proxy injection
  • test actual, standalone built lib (don't re-bundle Dygraph into tests)
  • use hackish access to RangeSelectorPlugin constructor
  • fix a few off-by-one fuzzy pixel errors

- create a global Dygraph.setGetContext for testing & Proxy injection
- test actual, standalone built lib (don't re-bundle Dygraph into tests)
- use hackish access to RangeSelectorPlugin constructor
- fix a few off-by-one fuzzy pixel errors
@leeoniya
Copy link
Author

leeoniya commented Aug 5, 2019

hey @danvk, is this project effectively abandoned?

@danvk
Copy link
Owner

danvk commented Aug 6, 2019

Sorry @leeoniya. Would you be interested in becoming an owner? #727

@leeoniya
Copy link
Author

leeoniya commented Aug 6, 2019

unfortunately i have enough of my own open source projects to maintain. the dygraphs codebase is too large for someone unfamiliar with it to start maintaining it without a very significant time investment.

like most people, i probably only personally use 20% of the functionality/options, so it's hard to justify making such a commitment to study the whole thing well enough to make well-informed choices on a project-wide scale. if you don't have time to review PRs (even as simple/ready-to-go as this one), then you certainly won't have time to answer many many questions about the details of the codebase and intricate interactions between options, etc.

@leeoniya
Copy link
Author

@kraliq233 i'm now using uPlot and have no further plans to pursue this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants