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

Move metals-vscode to a subdirectory #1373

Merged
merged 1 commit into from
Mar 21, 2023
Merged

Conversation

gabro
Copy link
Member

@gabro gabro commented Mar 20, 2023

This PR prepares the ground for folding https://github.com/scalameta/metals-languageclient back into this repo.
The general idea is that https://github.com/scalameta/metals-languageclient used to be used by coc-scala and metals-vscode, but since coc-scala is now deprecated it doesn't make much sense to split the common code to a separate repository any longer.

Still, I think it makes sense to keep metals-languageclient as a separate package for two reasons:

  • in the odd chance something was depending on it, it can keep doing so
  • it may be useful to someone writing js-based Metals clients in the future

Now, to achieve the goal, I would normally use a yarn workspace, which would look like this:

├── package.json
├── yarn.lock
├── packages
│   ├── metals-vscode
│   │   ├── package.json
│   │   ├── ...
│   └── metals-languageclient
│       ├── package.json
│       ├── ...
└── node_modules

However, due to vsce not supporting yarn workspaces we cannot have a proper workspace, so each subdirectory will live on its own and we don't get features like symlinking or dependency hoisting and result in something like:

├── packages
│   ├── metals-vscode
│   │   ├── package.json
│   │   ├── yarn.lock
│   │   ├── node_modules
│   │   ├── ...
│   └── metals-languageclient
│       ├── package.json
│       ├── yarn.lock
│       ├── node_modules
│       ├── ...

I think this is mostly fine; it will require some fiddling, but nothing too crazy.
And if microsoft/vscode-vsce#300 ever gets merged, we can then easily move to a proper workspace.

Once this PR lands, we can then add the contents of the metals-languageclient repo as a directory next to metals-vscode. In order to do that preserving the git history, I will need to rewrite the repo history, so it would be better to cleanup the PR queue before that.

@gabro gabro requested a review from tgodzik March 20, 2023 15:28
@gabro gabro force-pushed the package-workspace branch 9 times, most recently from b349e3e to 2a58bc7 Compare March 20, 2023 16:27
Copy link
Member

@kpodsiad kpodsiad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I will need to rewrite the repo history, so it would be better to cleanup the PR queue before that.

I think there are no important PRs waiting tio be merged

@gabro gabro merged commit d2ed698 into scalameta:main Mar 21, 2023
@gabro gabro deleted the package-workspace branch March 21, 2023 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants