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

react-gemini-scrollbar dependency issue #10894

Closed
turt2live opened this issue Sep 17, 2019 · 1 comment · Fixed by matrix-org/matrix-react-sdk#3451
Closed

react-gemini-scrollbar dependency issue #10894

turt2live opened this issue Sep 17, 2019 · 1 comment · Fixed by matrix-org/matrix-react-sdk#3451
Assignees
Labels
T-Task Tasks for the team like planning

Comments

@turt2live
Copy link
Member

This is largely an issue to track the solution and minor scope of the problem for future reference.

In upgrading to React 16 we had to bump the react-gemini-scrollbar dependency (matrix-org/react-gemini-scrollbar#2 and matrix-org/matrix-react-sdk#3276), however because we reference the dependency by hash it causes problems for us. There's two problems at play here: the installation order of our dependencies (for development environments) and the lack of version bump in the react-gemini-scrollbar package.

Our installation docs say to install riot-web first, which references the current release of the react-sdk instead of develop. This means that the dependency (in this case [email protected]#5e97aef) gets pulled in and cached. Later, when the react-sdk is installed, a hash change occurs but no version change so the update is skipped. It's worth noting that the CDN appears to operate in this fashion too: it would cache 5e97aef instead of f644523 for 2.1.5.

However, if we had riot-web pointing to react-sdk#develop instead of release, we'd pull in the new dependency first and it would be largely okay. There's some uncertainty about how the CDN or local cache would react given the lack of version change, but it should at least solve most of the problem.

Bumping the version alongside the hash is the best fix, as it causes a cache miss regardless of dependency conflicts. This is what matrix-org/react-gemini-scrollbar#3 does.

Additional notes: #10893 doesn't appear to have the same version problem, though it's relatively important for us to use the same versions of dependencies across our layers.

@turt2live turt2live added the T-Task Tasks for the team like planning label Sep 17, 2019
@turt2live turt2live self-assigned this Sep 17, 2019
@turt2live
Copy link
Member Author

There's a possible concern with pointing at develop in that npm doesn't build the dependencies, so the checkout is useless. Need to make sure that yarn does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant