microsoft / SandDance

Visually explore, understand, and present your data.
https://microsoft.github.io/SandDance
MIT License
6.41k stars 526 forks source link

"Cannot read property 'AllData' of undefined" - Did not change code or references #196

Closed casperOne closed 1 year ago

casperOne commented 4 years ago

Originally mentioned in: https://github.com/microsoft/SandDance/issues/155#issuecomment-589845026_

Codesandbox: https://codesandbox.io/s/sanddance-js-demo-wwyv1

As per the above; these codesandboxe hasn't changed at all, no code changes, no reference changes, but now they are getting an error from the Sanddance react package:

Cannot read property `AllData` of undefined

Has something changed in version 2.0.0 of the package that causes it to break?

danmarshall commented 4 years ago

I've contacted CodeSandbox support for this one, since it does not seem to occur anywhere else.

CompuIves commented 4 years ago

Hey! Sorry for the late reply, I believe this issue has now been fixed. It was related to how we converted es modules - they were not mutable and this caused this bug. I've forked the sandbox and updated vega, and everything seems to be working as expected now!

https://codesandbox.io/s/sanddance-js-demo-jp42p?file=/src/index.js

casperOne commented 4 years ago

It seems this introduced a new issue.

image

No changes have been made to this sandbox.

Is the sanddance project making updates to the same semantic version and publishing them instead of making new semantic versions?

I'm now concerned that Sanddance will introduce breaking code into my application when we make no changes and are only rebuilding it (because new code for an existing semver has been deployed).

mattijn commented 4 years ago

Which version of Vega are you using? I had this error today and it went away with vega 5.13.0. See: https://codesandbox.io/embed/ydqz6?codemirror=1

casperOne commented 4 years ago

@mattijn This is using vega 5.9.0.

We could update to vega 5.13.0, but that only hides the issue; if semvers for Sandance are being reused, then the risk of breaking builds is very high (and defeats the purpose of semvers to begin with).

danmarshall commented 4 years ago

Hi @casperOne , we’re not republishing semvers.

CompuIves commented 4 years ago

It seems this introduced a new issue.

That error seems to be related to a circular dependency, there are two versions of vega-dataflow, one that vega needs (which is pinned) and another one that is required by another dependency. It doesn't work well because some globals are set on that dependency, but there are two versions. I was able to repro it with npm as well.

Updating vega fixes it, because newer versions don't pin the dependencies to one specific version anymore.