Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a small example of how Shadow CLJS can break
At this commit, the app compiles, yet at run time the app does not show the expected elements but instead throws a mysterious exception that states: An error occurred when calling (test-evergreen.core/init) This problem is triggered by the difference between how Shadow CLJS resolves dependencies and how Node.js does it. In a nutshell, Node.js supports multiple versions of a single package within a single project; Shadow CLJS does not. And in this short example, that makes all the difference. In our project, we are experiencing significant pain due to this limitation. I thought it would be worth sharing with the community a simplified example to indicate why this constraint is difficult to manage. In the case of this particular commit, here are the relevant dependencies and versions: - our app depends on evergreen-ui at ^6.0.1 (currently the latest) - [email protected] depends on: - glamor at ^2.20.40 (currently the latest) and - ui-box at ^4.0.0 (latest is 4.1.0) - [email protected] depends on inline-style-prefixer at ^3.0.6 - [email protected] (the latest) depends on inline-style-prefixer at ^5.0.4 It turns out that inline-style-prefixer (abbreviated ISP from now on) moved its modules around at version 5.0.0, so the way that glamor requires ISP works for pre-v5 but not v5 and later. Conversely, the way that ui-box requires ISP works for v5 and later but not pre-v5. **So there's no single version of ISP that works for both dependencies.** And neither dependency can be easily jettisoned, because they're both required by a dependency (evergreen-ui) that is maintained by others. What can we do? For starters, I've opened a PR for glamor to use a post-v5 version of ISP. Hopefully they'll accept my PR and release a new version soon. In the meantime, I can vendor my fork of glamor into the repo and depend on the vendored version instead of the version on NPM. That approach is shown in the next commit.
- Loading branch information