Open domoritz opened 4 years ago
Hey there. Circular dependencies shouldn't be a problem, and in fact I have some passing tests for circular dependencies already. But yeah, it does look like something to do with circular deps. Thanks for spotting this. I would greatly appreciate it if you could narrow this down into a minimal repro that I can set up a simple test case for, as that will make it a lot easier for me track this down. In any case I'll see if I can make sense of it by cloning your repo and debugging a bit.
Thanks for looking into this. For now, I switched to a combination of rollup-plugin-typescript2 and babel in https://github.com/vega/vega-lite/pull/6852/files#diff-ff6e5f22a9c7e66987b19c0199636480. However, since I use your plugin in https://github.com/vega/vega-embed/blob/master/rollup.config.js, https://github.com/vega/vega-tooltip/blob/master/rollup.config.js, and https://github.com/vega/vega-themes/blob/master/rollup.config.js, it would be great to switch to your bundler for Vega-Lite as well.
Since the traceback shows declaration-bundler, I guess this problem may be related to declaration bundling. I'm having some separate issues with declaration bundles (https://github.com/wessberg/rollup-plugin-ts/issues/117) and wonder whether I am doing something wrong that causes these two issues.
I won't be able to investigate it based on your repro if there is no active branch or PR on which the error is reproducible using @wessberg/rollup-plugin-ts. Is there a way for you to either push a new branch to git based on the state before your last commit or, preferably, prepare a smaller repro (in case you have one) so that I can investigate? :-)
I made https://github.com/vega/vega-lite/pull/6859 for you. Does that work?
Yes, that looks good. Thanks, I'll look into it!
Thanks to your repo, I've managed to reproduce the problem. Feel free to close the PR now, since I have what I need and have prepared a test case. I'll fix it as soon as possible.
Awesome!
Encountering the same issue on latest version (1.4.0), any update on this?
Any updates?
@wessberg this is still occuring and I'm trying to make sense out of this, but the deeper I look, the weirder it gets
I also have this issue. This is only reproducing for commonjs
output format. But I suppose that is because of esm
+ preserveModules
declarations aren't merged. On 1.2.27
it doesn't reproduce. Is it possible to merge declarations even in preserveModules
?
+1
tsc
(if applicable): yesReproduction
Happening with https://github.com/vega/vega-lite/tree/0889ccc6a33a789f985ce0fb08f11f087a245ee4.
Expected Behavior
I expect to get a compiled bundle.
Actual Behavior
Are the circular dependencies a problem here?
Note that compiling this code with rollup hasn't been a problem in the past. I used to compile typescript -> javascript and then use rollup to bundle the generated files.