Skip to content

Fix file watcher to handle rename events - #351

Merged
jeparlefrancais merged 3 commits into
mainfrom
file-watcher-rename-fix
May 26, 2026
Merged

jeparlefrancais merged 3 commits into
mainfrom
file-watcher-rename-fix

Conversation

@jeparlefrancais

@jeparlefrancais jeparlefrancais commented May 25, 2026

Copy link
Copy Markdown
Contributor

Closes #340

Improved the file watcher to process rename events and also remove empty folders after the process if they weren't present initially.

  • add entry to the changelog

@github-actions

Copy link
Copy Markdown

Coverage after merging file-watcher-rename-fix into main will be

85.06%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
src/cli/utils
   file_watcher.rs0%100%0%0%102–109, 111–113, 119, 121–124, 126, 128–131, 133, 136–137, 139–144, 146, 149–150, 152–158, 160, 163–165, 169, 172–179, 181, 187–192, 194, 203–204, 206–209, 211, 213, 216–217, 219–221, 223, 226–227, 229–241, 243–247, 249–250, 252, 255, 257, 259–260, 262–273, 275–281, 283–285, 287–288, 290, 292–295, 297–305, 307–309, 312–315, 317, 321–325, 327–332, 334–339, 341–349, 352–354, 356–364, 366–374, 377–378, 381–389, 391–394, 396–399, 401–409, 41, 411–413, 415, 42, 420–429, 431, 438–439, 44, 441, 446–447, 449, 45, 451–452, 454–459, 46, 460–463, 47–55, 57–58, 60, 62–63, 65–66, 71–73, 75–76, 78–80, 82–84, 86–89, 91–92, 94–99
src/frontend
   mod.rs100%100%100%100%
   resources.rs66.98%100%66.67%67.03%109–117, 119, 122, 124–127, 129–137, 139, 142, 147, 149–151, 154, 156, 161–167, 169, 177–180, 203, 205, 210, 214–215, 217, 230–231, 233, 240–241, 243, 332–334, 337–342, 344–346, 364–366, 368–373, 57–59, 77
   worker_tree.rs48.73%100%45.45%49.06%112–113, 123, 151, 163, 166, 171, 177, 180, 184, 195–196, 199, 234, 236–237, 239–249, 251–253, 255, 258, 284, 294, 301–305, 308–313, 316–317, 319–328, 330–332, 335–336, 338–343, 345–348, 351–352, 354–358, 360–363, 365, 367–368, 370, 372–375, 377, 379, 381–387, 391–392, 395–398, 401–402, 404, 406–411, 430–431, 433–437, 439–443, 445, 447, 468, 471, 473–479, 481, 483, 50, 52, 54, 61, 63, 65, 76, 78–79, 82

@jeparlefrancais
jeparlefrancais merged commit 1a3154c into main May 26, 2026
6 checks passed
@jeparlefrancais
jeparlefrancais deleted the file-watcher-rename-fix branch May 26, 2026 15:10
@jeparlefrancais jeparlefrancais mentioned this pull request Jun 10, 2026
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
darklua 0.19.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>The big change is **content loaders**. darklua now accepts glob patterns that map to configurable loaders in your config file. Most loaders are already there by default, but you can override or extend them:

```json5
{
  generator: "retain_lines",
  rules: [
    // ...
  ],
  loaders: {
    "**/*.model.json": "copy",
    "**/*.json": "json",
    "**/*.md": "string",
  },
}
```

This solves a few issues I know people had and it opens up new possibilities too:
- Rojo model files can now be copied when processing files (no more manual `cp` workaround) with the `copy` loader
- when bundling, darklua could already load data files (json, toml, yaml) and inline the converted data as Lua code, **but now** there are actual loaders to make that work in the regular `process` flow too
- there is now a path to support more Lua parsers, since there is a way to add loaders like a future `lua53` loader. (this is not currently planned, but it could be sponsored)

Available loaders: `luau`, `copy`, `skip`, `string`, `buffer`, `bytes`, data loaders (`json`, `json_lines`, `toml`, `yaml`), and encoding variants for embedding content (`/base64`, `/zstd`, `/gzip`, `/zlib`)

Other changes:
- `const` declarations are now supported, with a new `make_assignment_local` rule to convert them to `local` assignments
- type instantiation prefixes and methods are now supported (e.g. `func<<string>>()`)
- the `rename_variables` rule can now detect globals automatically and avoid renaming them

---

## What's Changed
* Support type instantiation prefixes and methods by @jeparlefrancais in seaofvoices/darklua#345
* Add `make_assignment_local` rule by @notpoiu in seaofvoices/darklua#346
* Add `detect_globals` parameter to `rename_variables` rule by @jeparlefrancais in seaofvoices/darklua#348
* Fix file watcher to handle rename events by @jeparlefrancais in seaofvoices/darklua#351
* Create content loaders by @jeparlefrancais in seaofvoices/darklua#354
* Support infinity for generators `column_span` parameter by @jeparlefrancais in seaofvoices/darklua#355
* Add content loader for json-lines and `ztsd`, `gzip` and `zlib` encoding by @jeparlefrancais in seaofvoices/darklua#356

## New Contributors
* @notpoiu made their first contribution in seaofvoices/darklua#346

**Full Changelog**: https://github.com/seaofvoices/darklua/compare/v0.18.0...v0.19.0</pre>
  <p>View the full release notes at <a href="https://github.com/seaofvoices/darklua/releases/tag/v0.19.0">https://github.com/seaofvoices/darklua/releases/tag/v0.19.0</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!11206
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.

Folder gets deleted if there is no file inside

1 participant