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

Workspace is not included as an affected workspace if only change is a file deletion #706

Closed
1 task
FXStrato opened this issue Apr 22, 2024 · 0 comments · Fixed by #718
Closed
1 task
Labels
🐛 bug Something isn't working ⚛️ core The oneRepo core good first issue Good for newcomers 🚑 help wanted Extra attention is needed

Comments

@FXStrato
Copy link

FXStrato commented Apr 22, 2024

What version of oneRepo are you using?

1.1.0

Environment info

System:
    OS: macOS 14.4.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 60.38 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.19.1 - /usr/local/opt/node@18/bin/node
    Yarn: 4.0.2 - /usr/local/opt/node@18/bin/yarn
    npm: 10.2.4 - /usr/local/opt/node@18/bin/npm

Command

getWorkspaces()

What did you expect to happen?

Deleting a file under src/pages, staging the change, and then calling getWorkspaces() from a custom command handler with a builder that uses both withWorkspaces and withAffected should include that workspace that had the file deleted in the returned getWorkspaces() call.

What actually happened?

The workspace is not returned as an affected workspace. Running the debug logs, it does pick up the file change, but not the deletion as a modification.

DBG Running command:
 │ DBG {
 │ DBG   "name": "Checking for changes",
 │ DBG   "cmd": "git",
 │ DBG   "args": [
 │ DBG     "status",
 │ DBG     "-z"
 │ DBG   ]
 │ DBG }
 │ DBG /Users/jeffzhong/Documents/Development/frontend
 │ LOG D  apps/marketing/src/pages/sweeps.astro
 │ LOG Running: Getting modified files
 │ DBG Running command:
 │ DBG {
 │ DBG   "name": "Getting modified files",
 │ DBG   "cmd": "git",
 │ DBG   "args": [
 │ DBG     "diff",
 │ DBG     "--name-only",
 │ DBG     "-z",
 │ DBG     "--diff-filter",
 │ DBG     "ACMR",
 │ DBG     "b2edeecf338e5da99e8ee1c64d3dece7cb2afd51"
 │ DBG   ]
 │ DBG }

Participation

  • I am willing to submit a pull request for this issue.
@FXStrato FXStrato added the triage Issue needs to be verified label Apr 22, 2024
@paularmstrong paularmstrong added 🐛 bug Something isn't working ⚛️ core The oneRepo core 🚑 help wanted Extra attention is needed good first issue Good for newcomers and removed triage Issue needs to be verified labels Apr 23, 2024
jakeleveroni added a commit to jakeleveroni/onerepo that referenced this issue May 7, 2024
paularmstrong pushed a commit to jakeleveroni/onerepo that referenced this issue Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working ⚛️ core The oneRepo core good first issue Good for newcomers 🚑 help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants