Skip to content

fix: skip regular files on engine clean#620

Merged
expert-backports[bot] merged 1 commit into
v0.1from
backport-613-to-v0.1
Apr 24, 2026
Merged

fix: skip regular files on engine clean#620
expert-backports[bot] merged 1 commit into
v0.1from
backport-613-to-v0.1

Conversation

@expert-backports
Copy link
Copy Markdown

Description

Backport of #613 to v0.1.

This was found in a #570 , which added DETS file inside the cache
directory. Then when `engine clean` was run, it failed because it could
only handle directories.

The failure looked like this:

```
❯ ~/.local/bin/expert_darwin_arm64 engine clean --force
Kernel pid terminated (application_controller) ("{application_start_failure,xp_expert,{bad_return,{{'Elixir.XPExpert.Application',start,[normal,[]]},{'EXIT',{#{reason => enotdir,path => <<\"/Users/pawel.sw/Library/Caches/expert/hex.dets\">>,'__struct__' => 'Elixir.File.Error','__exception__' => true,action => <<\"list directory\">>},[{'Elixir.File','ls!',1,[{file,\"lib/file.ex\"},{line,2064}]},{'Elixir.XPExpert.Engine','-get_engine_dirs/0-fun-1-',3,[{file,\"lib/expert/engine.ex\"},{line,103}]},{'Elixir.Enum','-reduce/3-lists^foldl/2-0-',3,[{file,\"lib/enum.ex\"},{line,2520}]},{'Elixir.XPExpert.Engine',get_engine_dirs,0,[{file,\"lib/expert/engine.ex\"},{line,102}]},{'Elixir.XPExpert.Engine',clean_engines,1,[{file,\"lib/expert/engine.ex\"},{line,80}]},{'Elixir.XPExpert.Application',start,2,[{file,\"lib/expert/application.ex\"},{line,26}]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,299}]}]}}}}}")

Crash dump is being written to: erl_crash.dump...done
```

This PR makes the `clean` command skip any files in the cache directory.

(cherry picked from commit ce93691)
@expert-backports expert-backports Bot enabled auto-merge (squash) April 24, 2026 13:41
@expert-backports expert-backports Bot merged commit 2f70d10 into v0.1 Apr 24, 2026
72 of 74 checks passed
@expert-backports expert-backports Bot deleted the backport-613-to-v0.1 branch April 24, 2026 14:25
mhanberg pushed a commit that referenced this pull request Apr 24, 2026
🤖 I have created a release *beep* *boop*
---


## [0.1.2](v0.1.1...v0.1.2)
(2026-04-24)


### Bug Fixes

* eager loading for large projects
([#618](#618))
([74af23f](74af23f))
* skip regular files on engine clean
([#620](#620))
([2f70d10](2f70d10))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
mhanberg pushed a commit that referenced this pull request Apr 24, 2026
🤖 I have created a release *beep* *boop*
---


## [0.1.2](v0.1.1...v0.1.2)
(2026-04-24)


### Bug Fixes

* eager loading for large projects
([#618](#618))
([74af23f](74af23f))
* skip regular files on engine clean
([#620](#620))
([2f70d10](2f70d10))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant