-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Remove obsolete yarn.lock files and check in root yarn.lock file #34588
Conversation
👌 This is the correct way to use Yarn Workspaces, AFAIK. We have the same setup for https://github.com/stimulusjs/stimulus: a single |
Let's make sure |
#34370 didn't add any dependencies, so there are no changes when I rebase and run |
Yes, please. I want to make sure actioncable's tests still pass on CI. Can't hurt to rebase. |
e5e9013
to
6f22d6c
Compare
Sounds good. It's rebased and passing |
When I run |
Hmm, do you know what these entries are for in the workspaces configuration: Lines 7 to 9 in aa1ba9c
After running
to delete those directories and rerunning It seems like these directories are also untracked by git which means that you could have stale files in there which cause the root For now, I'll push the |
6f22d6c
to
fb0c81d
Compare
It seems to have originated from this commit: @lsylvester commented in #33640 (comment) about some tests potentially requiring the workspaces configuration, but I'm not sure if that included these lines Lines 7 to 9 in aa1ba9c
or if Lines 4 to 6 in aa1ba9c
is sufficient. @lsylvester, if you're able to provide more context that'd be great. Otherwise, I would suggest we try removing the |
+1 for removing those entries. Test / tmp directories shouldn't be workspaces. |
I can provide some context as to why I added the tmp directories into the workspaces. At the time - we were getting errors in the railties tests that generated applications and then needed to compile the assets as the versions that the were being required (which were based on the I added in the yarn workspaces in order to allow the Rails application that were generated in the tmp directory visibility of the different required packages. Without the tmp directories in workspace the generated rails applications didn't have visibility of the unpublished packages. Since then, the version of the packages that is required was relaxed (fbd4597) to include published versions. This was done after a discussion about the differences in the versioning schemes between npm and ruby gems where I am not sure what version of the packages was being used in the tests prior to this being merged (ie latest on npm or alpha version that is in the rails repo) but I think that without the tmp directories in the workspace, it will be the 5.2.X versions. I don't know if this is an issue as long as any issues get picked up in the prerelease. All the railties tests are doing are ensuring that the packages can compile, so I think this is unlikely to be an issue unless something is seriously broken. I don't think that the workspaces are currently providing any value, but expect that that might change once ActionText is merged, as it depends on the ActiveStorage package. I hope that that clears some things up. |
Having these directories configured as yarn workspaces can cause you to generate an incorrect root yarn.lock when you run `yarn install` if you have stale files in these directories. This can be particularly troubling because the directories are ignored by git so it's not immediately obvious that you have files there which could be causing an invalid lockfile to be generated. Additionally, @lsylvester said that his initial motiviation for including these directories was resolved by relaxing the requirements in the package.json template used by the app generator. [1] [1]: rails#34588 (comment)
Thanks a bunch for the context! Given that:
it seems like you agree that we can remove the tmp directories from the workspaces. I opened a PR to do that here: #34630 I agree that the workspaces should provide value when ActionText is merged, so I did not remove the workspaces configuration for the real |
Resolves #34587
Issue description