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

Multiple copies of a workspace do not properly share a cache directory #6880

Closed
FrozenPandaz opened this issue Aug 27, 2021 · 1 comment · Fixed by #6881
Closed

Multiple copies of a workspace do not properly share a cache directory #6880

FrozenPandaz opened this issue Aug 27, 2021 · 1 comment · Fixed by #6881
Assignees
Labels

Comments

@FrozenPandaz
Copy link
Collaborator

Current Behavior

The hash for a project includes an absolute path of the configPath when configuration is in standalone configs

This means that the cache is not shared due to the hash being different.

Expected Behavior

The hash for a project should not include the config path.

Thus the cache should be shared.

Steps to Reproduce

  1. Clone https://github.com/nrwl/nx-examples twice and set cacheDirectory in the taskRunnerOptions in nx.json in both clones of the repo to somewhere outside of the repos (/tmp/nx-cache).

  2. Set the 2 clones to same commit.

  3. Run nx build cart in clone 1 (This should not be cached)

  4. Run nx build cart in clone 2 (This is expected to be cached but currently is not.

Environment

  Node : 16.5.0
  OS   : linux x64
  yarn : 1.22.10
  
  nx : Not Found
  @nrwl/angular : Not Found
  @nrwl/cli : 12.7.0
  @nrwl/cypress : 12.7.0
  @nrwl/devkit : 12.7.0
  @nrwl/eslint-plugin-nx : 12.7.0
  @nrwl/express : Not Found
  @nrwl/jest : 12.7.0
  @nrwl/linter : 12.7.0
  @nrwl/nest : Not Found
  @nrwl/next : 12.7.0
  @nrwl/node : 12.7.0
  @nrwl/nx-cloud : 12.3.8
  @nrwl/react : 12.7.0
  @nrwl/schematics : Not Found
  @nrwl/tao : 12.7.0
  @nrwl/web : 12.7.0
  @nrwl/workspace : 12.7.0
  @nrwl/storybook : 12.7.0
  @nrwl/gatsby : Not Found
  typescript : 4.3.5

Related

This PR tried to fix the issue but @AgentEnder will take a look at the underlying issue.

#6872

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants