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

[Case Study] Is it possible to have nested worktrees? #1027

Closed
zdm opened this issue Mar 3, 2020 · 4 comments
Closed

[Case Study] Is it possible to have nested worktrees? #1027

zdm opened this issue Mar 3, 2020 · 4 comments
Assignees
Labels
case study Package compatibility report

Comments

@zdm
Copy link

zdm commented Mar 3, 2020

Hi,
I have following structure.

(1) package.json - workspaces: ["*"]
|--- (2) package.json - workspaces: ["*"]
     |--- (3) package.json

How it is possible to make (3)package.json to be a part of worktree (2)?

Currently when I run yarn from dir (3) it is trying to create .yarn.lock under top-level dir (1).

So, I need to make worktree (2) isolated from worktree (1) but is should be a subdirectory of (1).

I hope, you understand my question. ;-)

@zdm zdm added the case study Package compatibility report label Mar 3, 2020
@zdm
Copy link
Author

zdm commented Mar 3, 2020

In other words:

  1. I have two projects;
  2. Both are configured as worktrees;
  3. Project2 is located in subdirectory of project1;

I need to make project2 worktree to be isolated from project1.

@arcanis
Copy link
Member

arcanis commented Mar 3, 2020

If I understand correctly there will always be a single lockfile with the current model. We may consider read-only views in the future, but not until the next major at the very least.

@eliw00d
Copy link

eliw00d commented Oct 5, 2020

I am also trying out nested worktrees but the documentation is not very clear on how to do so. I have the following setup:

/package.json (workspaces: ["backend", "frontend"])
/backend/package.json (workspaces: ["services/*"])
/backend/services/**/package.json
/frontend/package.json (workspaces: ["applications/*"])
/frontend/applications/**/package.json

However, when I install from the root the dependencies in services and applications do not get installed.

@merceyz
Copy link
Member

merceyz commented Jan 7, 2021

This issue is seems to boil down to per workspace lockfiles so closing as a duplicate of #1223 even though this was opened first as that has more details

However, when I install from the root the dependencies in services and applications do not get installed.

@eliw00d That looks correct, could you open a issue with a full reproduction?

@merceyz merceyz closed this as completed Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
case study Package compatibility report
Projects
None yet
Development

No branches or pull requests

4 participants