SandDance icon indicating copy to clipboard operation
SandDance copied to clipboard

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

Open casperOne opened this issue 5 years ago • 7 comments
trafficstars

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?

casperOne avatar Mar 22 '20 21:03 casperOne

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

danmarshall avatar May 20 '20 21:05 danmarshall

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

CompuIves avatar Jun 22 '20 14:06 CompuIves

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).

casperOne avatar Jun 23 '20 13:06 casperOne

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

mattijn avatar Jun 23 '20 14:06 mattijn

@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).

casperOne avatar Jun 23 '20 15:06 casperOne

Hi @casperOne , we’re not republishing semvers.

danmarshall avatar Jun 23 '20 16:06 danmarshall

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.

CompuIves avatar Jul 09 '20 11:07 CompuIves