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

duplicate *events def in timeseries.js v0.9.0 #203

Open
ikappaki opened this issue Aug 1, 2020 · 0 comments
Open

duplicate *events def in timeseries.js v0.9.0 #203

ikappaki opened this issue Aug 1, 2020 · 0 comments

Comments

@ikappaki
Copy link

ikappaki commented Aug 1, 2020

There is an duplicate, identical, *events definition in timeseries.js.

Although this appears not to cause issues loading the module in any JS VM, it does break when trying to compile with google-closure-compiler in simple mode (v0.8.x is where the v0.9.0 release tag was taken from):

Your branch is up to date with 'origin/v0.8.x'.
Switched to branch 'v0.8.x'
d:/src/pond $ npx google-closure-compiler --js=lib/lib/timeseries.js --compilation_level "SIMPLE"
npx: installed 29 in 2.717s
lib/lib/timeseries.js:524: ERROR - [JSC_DUPLICATE_CLASS_METHODS] Class contains duplicate method name "events"
  524|   *events() {
          ^^^^^^

The issue manifests itself when referencing the package with ClojureScript (which uses the google clojure compiler), and more specifically when using the rect-timeseries-charts npm module which depends on pondjs v0.9.0.

I assume the duplicate *events def was unintentional, and thus I would consider this an (almost harmless) "bug".

PR to follow.

duplicate:

pond/lib/lib/timeseries.js

Lines 524 to 528 in 1a873b7

*events() {
for (var i = 0; i < this.size(); i++) {
yield this.at(i);
}
} //

first occurance:

pond/lib/lib/timeseries.js

Lines 393 to 397 in 1a873b7

*events() {
for (var i = 0; i < this.size(); i++) {
yield this.at(i);
}
}

Thanks

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

No branches or pull requests

1 participant