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
In a workspace, also include missing deeply linked workspace packages at headless installation #5220
Conversation
4fef945
to
16ae965
Compare
b458ef5
to
b95ab21
Compare
TBH, I don't think running |
yeah I agree on this part
I feel that this wouldn't address the issue #5034 😅 |
The issue should be fixed for the up-to-date lockfile only. That means that the fix needs to be in the |
3ccfd06
to
5b1fe6a
Compare
If we pass all the projects to core anyway, maybe we should do the project filtering inside core and headless. That might improve the code quality. |
yea that makes sense 🤔 |
5b1fe6a
to
ec92c95
Compare
I attempted this... It feels like I would need to move and split whole plugin-installation's recursive.ts to core and headless, but I'm not confident in doing so.. |
2e8199e
to
be349e6
Compare
I'll look into it. |
3671ed1
to
4f7bed7
Compare
Hi @zkochan, is the refactor a blocker to this PR? |
yes |
I'll review it. Maybe it is ok. |
ok, I think I know the right way to do it. Project filtering should not be moved. However, some refactoring is needed. Currently you pass all the projects to What we should do instead is removing the manifest fields from MutateProject. All the info is already present in the new allProjects field. So we just need to make this new field required and read the data from it. It might be hard to implement. I can probably work on this refactoring if you don't want to. |
Thanks for the feedback. Unfortunately I'm not very confident in doing that. Please do help 🙏 🙏 |
The refactor is in progress in this PR: #5338 |
@kenrick95 I have merged the refactoring that had to happen before these changes. Now headless install receives the |
4f7bed7
to
efc5728
Compare
efc5728
to
562462a
Compare
Attempt to fix #5034
Problem:
When using link-workspace-packages = deep + filter, there could be case where it depends on a project inside the workspace that is not selected by the filter. We only know what are the projects after we resolve the dependencies.
Idea for solution:
"resolve-dependencies", after the first "resolveDependencyTree", when we encounter projects in "dependenciesTree" that are not yet part of the "projectsToResolve", we add it into "importers" & "projectsToResolve" and run "resolveDependencyTree" again and again till all projects in "dependenciesTree" are part of "projectsToResolve"I wonder if the solution sounds ok?Not fully working yet, have some questions (inline in codes)plus there are some failing tests (test/linkRecursive.ts
&test/miscRecursive.ts
) due to this changeUpdated solution: