Skip to content

Revert "Bump assets/syntaxes/02_Extra/Docker from 0f6b7bc to c001fb2 (#3024)"#3476

Merged
keith-hall merged 7 commits into
masterfrom
docker_syntax_fix
Nov 26, 2025
Merged

Revert "Bump assets/syntaxes/02_Extra/Docker from 0f6b7bc to c001fb2 (#3024)"#3476
keith-hall merged 7 commits into
masterfrom
docker_syntax_fix

Conversation

@keith-hall

Copy link
Copy Markdown
Collaborator

This reverts commit 3838766 (#3024) to fix #3446.

@HirschBerge

Copy link
Copy Markdown

Is there a reason this isn't merged?

@keith-hall

Copy link
Copy Markdown
Collaborator Author

Two reasons:

  • I wasn't able to come up with a test which proves that bat cache fails before this change and succeeds afterwards - it seems like it was always succeeding, and the Dockerfile highlighting seems fine... Maybe I need to try with a fresh clone in case that makes any difference.
  • there are no reviews on this PR yet. Likely waiting for regression tests lol.

Feel free to try building bat from source with this PR's changes and share your experience.

@Enselic

Enselic commented Nov 20, 2025

Copy link
Copy Markdown
Collaborator

Feel free to merge this without review if you know it's the right thing to do (and it seems to be the right thing).

@HirschBerge

HirschBerge commented Nov 24, 2025

Copy link
Copy Markdown

Not Sure I"m really grasping the whole submodules of this repo, but I think I figured out checking out the proper branch and submodules, etc. Not sure if I tested properly though

cargo run --release -- cache --build --blank
Some referenced contexts could not be found!
- Syntax 'Dockerfile (with bash)' with scope 'source.dockerfile.bash' has unresolved context reference ByScope { scope: <source.json>, sub_context: Some("array"), with_escape: false }
- Syntax 'Dockerfile (with bash)' with scope 'source.dockerfile.bash' has unresolved context reference ByScope { scope: <source.shell.bash>, sub_context: None, with_escape: false }
- Syntax 'Dockerfile (with bash)' with scope 'source.dockerfile.bash' has unresolved context reference ByScope { scope: <source.shell.bash>, sub_context: Some("cmd-args"), with_escape: false }
Writing theme set to /home/USER/.cache/bat/themes.bin ... okay
Writing syntax set to /home/USER/.cache/bat/syntaxes.bin ... okay
Writing metadata to folder /home/USER/.cache/bat ... okay
cargo run --release -- cache --build
    Finished `release` profile [optimized] target(s) in 0.14s
     Running `target/release/bat cache --build`
Some referenced contexts could not be found!
- Syntax 'Dockerfile (with bash)' with scope 'source.dockerfile.bash' has unresolved context reference ByScope { scope: <source.json>, sub_context: Some("arrays"), with_escape: false }
Writing theme set to /home/USER/.cache/bat/themes.bin ... okay
Writing syntax set to /home/USER/.cache/bat/syntaxes.bin ... okay
Writing metadata to folder /home/USER/.cache/bat ... okay

Please let me know if there was something different I should have done and i'll try and get to it.

Edit:
Turns out reading is useful. Found the proper section for custom themes/syntaxes.
Yes, this does seem to fix it the error

@keith-hall

Copy link
Copy Markdown
Collaborator Author

Note to self, reverting the submodule didn't update my local files. In the end I had to:

git submodule deinit -f assets/syntaxes/02_Extra/Docker
git submodule init assets/syntaxes/02_Extra/Docker     
git submodule update assets/syntaxes/02_Extra/Docker     

probably there is a quicker way, but I'm not sure I have really got the hang of submodules yet

otherwise CI fails due to the brownout actions/runner-images#13046
@keith-hall keith-hall merged commit c88353b into master Nov 26, 2025
24 checks passed
@keith-hall keith-hall deleted the docker_syntax_fix branch November 26, 2025 20:19
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Dec 3, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [sharkdp/bat](https://github.com/sharkdp/bat) | patch | `v0.26.0` -> `v0.26.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>sharkdp/bat (sharkdp/bat)</summary>

### [`v0.26.1`](https://github.com/sharkdp/bat/blob/HEAD/CHANGELOG.md#v0261)

[Compare Source](sharkdp/bat@v0.26.0...v0.26.1)

#### Features

- Add paging to '-h' and '--help' see MR [#&#8203;3478](sharkdp/bat#3478) ([@&#8203;MuntasirSZN](https://github.com/MuntasirSZN))

#### Bugfixes

- Fix hang when using `--list-themes` with an explicit pager, see [#&#8203;3457](sharkdp/bat#3457) ([@&#8203;abhinavcool42](https://github.com/abhinavcool42))
- Fix negative values of N not being parsed in \<N:M> line ranges without `=` flag value separator, see [#&#8203;3442](sharkdp/bat#3442) ([@&#8203;lmmx](https://github.com/lmmx))
- Fix broken Docker syntax preventing use of custom assets, see [#&#8203;3476](sharkdp/bat#3476) ([@&#8203;keith-hall](https://github.com/keith-hall))
- Fix decorations being applied unexpectedly when piping. Now only line numbers explicitly required on the command line should be applied in auto decorations mode for `cat` compatibility. See [#&#8203;3496](sharkdp/bat#3496) ([@&#8203;keith-hall](https://github.com/keith-hall))
- Fix diagnostics attempting to find the version of an executable named builtin when builtin pager is used. See [#&#8203;3498](sharkdp/bat#3498) ([@&#8203;keith-hall](https://github.com/keith-hall))
- `--help` now correctly reads the config file for theme information etc. See [#&#8203;3507](sharkdp/bat#3507) ([@&#8203;keith-hall](https://github.com/keith-hall))

#### Other

- Improve README documentation on pager options passed to less, see [#&#8203;3443](sharkdp/bat#3443) ([@&#8203;injust](https://github.com/injust))
- Make PowerShell completions compatible with PowerShell v5.1, see [#&#8203;3495](sharkdp/bat#3495) ([@&#8203;keith-hall](https://github.com/keith-hall))
- Use more robust approach to escaping in Bash completions, see [#&#8203;3448](sharkdp/bat#3448) ([@&#8203;akinomyoga](https://github.com/akinomyoga))

#### Syntaxes

- Update quadlet syntax mapping to include \*.{build,pod} files [#&#8203;3484](sharkdp/bat#3484) ([@&#8203;cyqsimon](https://github.com/cyqsimon))
- Fix inconsistencies in Ada syntax, see [#&#8203;3481](sharkdp/bat#3481) ([@&#8203;AldanTanneo](https://github.com/AldanTanneo))
- Add syntax mapping for podman's `artifact` quadlet files, see [#&#8203;3497](sharkdp/bat#3497) ([@&#8203;xduugu](https://github.com/xduugu))
- Highlight Korn Shell scripts (i.e. with a shebang of ...`ksh`) using Bash syntax, see [#&#8203;3509](sharkdp/bat#3509) ([@&#8203;keith-hall](https://github.com/keith-hall))

#### Themes

#### `bat` as a library

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4zMC40IiwidXBkYXRlZEluVmVyIjoiNDIuMzAuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
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.

[v0.26.0] bat cache --build: unresolved context reference error for Dockerfile (with bash)

3 participants