-
Notifications
You must be signed in to change notification settings - Fork 16
Description
What projects is this feature for?
No response
Description
Currently the tools that maintain the Node.js/Python/Java/R environments are applied to all the projects. However, doing so may be a waste of time and resources (mainly storage space) for projects that a developer is not contributing too.
For example, developers who work on Schematic shouldn't ideally have to prepare the OC projects. On the other hand, schematic-api comes with many dependencies that take about two minutes to install (see logs below).
There are different strategies we may explore to save resources:
Approach 1
The first method is to rely on Nx to run the preparation tasks for the affected projects. One edge case is that when cloning the repo, there are no affected projects and so nothing could be built without preparing some project first.
A potential solution may be to initialize the workspace by preparing all the projects (potentially in combination with solution 2), and from then only prepare again the projects that are affected.
Another solution is to make "build", "test", "lint", etc. tasks depends on the preparation tasks. This approach would not be worth it if running the preparation task on project that have already been prepare takes time.
Approach 2
Here the idea would be to allow the developers to define the list of products they want to work with. E.g. "openchallenges", "schematic", "synapse", etc.
Approach 3
This approach consist in evaluating whether running the preparation task on a project that has already been prepared and has not changed is fast or if it takes time. If preparing the environment again is super fast, then developers will not waste time. However, storage space would still be wasted.
Notes
- There are files in the workspace that Nx will consider as affecting all the projects if they are changed. Examples include
package.jsonand some configuration files. When that happens, all the project will have their environments prepared if we rely on the list of affected projects. - We may be able to tell Nx that among the projects it consider as affected, ignore some.
cc: @andrewelamb @linglp @milen-sage
Anything else?
No response
Code of Conduct
- I agree to follow this project's Code of Conduct