Skip to content

Commit 3ffa7fa

Browse files
authored
Merge pull request #49 from theodevelop/dev
Release v1.5.3
2 parents 8787f56 + 8a5b1a6 commit 3ffa7fa

12 files changed

Lines changed: 361 additions & 79 deletions

.github/workflows/ci.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches: ["main", "dev"]
66
pull_request:
77
branches: ["main", "dev"]
8+
# manual run in actions tab - for all branches
9+
workflow_dispatch:
810

911
jobs:
1012
build-and-test:
@@ -25,9 +27,24 @@ jobs:
2527
- name: Compile
2628
run: npm run compile
2729

28-
- name: Run parser tests
30+
- name: Test — parsers
2931
run: npx ts-node --project server/tsconfig.json tests/test-parsers.ts
3032

33+
- name: Test — diagnostic codes
34+
run: TS_NODE_PROJECT=tsconfig.base.json npx ts-node tests/test-diagnostic-codes.ts
35+
36+
- name: Test — version settings
37+
run: TS_NODE_PROJECT=tsconfig.base.json npx ts-node tests/test-version-settings.ts
38+
39+
- name: Test — fix-it hints (code actions)
40+
run: TS_NODE_PROJECT=tsconfig.base.json npx ts-node tests/test-fix-it-hints.ts
41+
42+
- name: Test — line directive utils
43+
run: TS_NODE_PROJECT=tsconfig.base.json npx ts-node tests/test-line-directive.ts
44+
45+
- name: Test — new providers
46+
run: TS_NODE_PROJECT=tsconfig.base.json npx ts-node tests/test-new-providers.ts
47+
3148
- name: Package VSIX
3249
run: npx vsce package --no-dependencies -o extension.vsix
3350

.github/workflows/publish-ovsx.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,23 @@ on:
66
- "v*"
77

88
jobs:
9-
package:
9+
release:
1010
runs-on: ubuntu-latest
1111
permissions:
1212
contents: write
1313

1414
steps:
1515
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Verify tag is on main
20+
run: |
21+
git fetch origin main
22+
if ! git merge-base --is-ancestor HEAD origin/main; then
23+
echo "❌ Release tags must be created from the main branch."
24+
exit 1
25+
fi
1626
1727
- name: Setup Node.js
1828
uses: actions/setup-node@v4
@@ -24,12 +34,30 @@ jobs:
2434
run: npm ci
2535

2636
- name: Build VSIX
27-
run: |
28-
npm run package
29-
npx vsce package
37+
run: npx vsce package
3038

3139
- name: Create GitHub Release
3240
uses: softprops/action-gh-release@v2
3341
with:
3442
files: "*.vsix"
35-
generate_release_notes: true
43+
generate_release_notes: true
44+
45+
- name: Publish to Open VSX
46+
env:
47+
OVSX_PAT: ${{ secrets.OVSX_PAT }}
48+
run: |
49+
if [ -z "$OVSX_PAT" ]; then
50+
echo "⚠️ OVSX_PAT not set — skipping Open VSX publish"
51+
else
52+
npx ovsx publish *.vsix --pat "$OVSX_PAT"
53+
fi
54+
55+
- name: Publish to VS Marketplace
56+
env:
57+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
58+
run: |
59+
if [ -z "$VSCE_PAT" ]; then
60+
echo "⚠️ VSCE_PAT not set — skipping VS Marketplace publish"
61+
else
62+
npx vsce publish --pat "$VSCE_PAT"
63+
fi

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ server/out/
66
.env
77
tests/_*
88
docs/
9-
.vscode/
9+
.vscode/
10+
.claude/
11+
graphify-out/
12+
tests/manuals/
13+
.vscode/launch.json

.vscodeignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ package-lock.json
2525
.env
2626
.env.*
2727
docs/
28+
graphify-out/
29+
tests/manuals/

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,28 @@
22

33
All notable changes to the **Bison/Flex Language Support** extension will be documented in this file.
44

5+
## [1.5.3] - 2026-04-20
6+
7+
### Added
8+
9+
- **Show in Generated File — output channel** (#27): a dedicated *Bison/Flex Navigation* output channel now logs every directory and file path searched when locating the generated file. The channel is shown automatically when the search starts, making it easy to diagnose `buildDirectory` misconfigurations.
10+
- **Show in Generated File — automake file names** (#45, contributed by [@GitMensch](https://github.com/GitMensch)): the generated-file search now also looks for the automake-style names used when Bison/Flex is called from an automake rule (`.tab.c`/`.tab.h`, `_tab.c`/`_tab.h`, `lex.yy.c`, `lex._.c`, and their `.cc`/`.cpp` variants).
11+
12+
### Fixed
13+
14+
- **Show in Source — `#line` offset and unquoted filenames** (#44): the command now correctly handles `#line` directives without quoted filenames (e.g. `#line 42 parser.y` in addition to `#line 42 "parser.y"`), and the line offset is now computed correctly so the editor opens at the exact grammar line.
15+
- **Show in Generated File — cached lookup / multi-root workspaces** (#27): the last successfully found generated file is cached per source file, avoiding redundant filesystem scans on repeated calls. In multi-root workspaces `${workspaceFolder}` in `bisonFlex.buildDirectory` now resolves to the workspace folder that contains the source file, so a single setting works correctly across all roots.
16+
17+
### Documentation
18+
19+
- `bisonFlex.buildDirectory` is now documented in the README with supported formats (`${workspaceFolder}`, relative paths, absolute paths) and multi-root workspace behaviour.
20+
21+
### CI / Internal
22+
23+
- Workflows consolidated: CI now runs on `push`/`pull_request` for both `main` and `dev`; the VSIX artifact is built on every CI run.
24+
25+
---
26+
527
## [1.5.2] - 2026-04-05
628

729
### Added

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,16 @@ Jump between Bison/Flex grammar sources and their generated C files using `#line
7777
- **Bison/Flex: Show in Source** — from a generated `.tab.c` / `lex.yy.c` file, reads the nearest `#line N "file.y"` directive above the cursor and opens the grammar source at the correct line. Appears in the context menu only when a generated file is detected.
7878
- **Bison/Flex: Show in Generated File** — from a `.y` / `.l` source, locates the generated file and navigates to the matching line. Searches `bisonFlex.buildDirectory`, then CMake/Makefile detection, then the same directory, then a workspace-wide scan. A QuickPick is shown when multiple candidates are found.
7979

80+
#### Configuring `bisonFlex.buildDirectory`
81+
82+
Set this to the directory where Bison/Flex writes its generated files when they are not placed next to the source:
83+
84+
- **`${workspaceFolder}`** — resolved to the workspace folder that contains the source file. In multi-root workspaces each folder resolves independently, so a single setting works across all roots.
85+
- **Relative path** — resolved relative to that same workspace folder (e.g. `build` or `cmake-build-debug/parser`).
86+
- **Absolute path** — used as-is.
87+
88+
If the setting is empty or the generated file is not found there, the extension falls back to CMake/Makefile-detected paths, then the source file's own directory, then a workspace-wide scan.
89+
8090
### Autocompletion
8191

8292
Context-aware suggestions triggered as you type:
@@ -226,7 +236,7 @@ Then press `F5` in VS Code to launch the Extension Development Host.
226236
| `bisonFlex.minVersionBison` | `string` | `""` | Suppress checks that require a newer Bison version (e.g. `"3.0"`). Fires `bison/feature-requires-version` when a `%define` feature exceeds this version. |
227237
| `bisonFlex.minVersionFlex` | `string` | `""` | Same as above for Flex. |
228238
| `bisonFlex.disabledChecks` | `array` | `[]` | Diagnostic code slugs to suppress entirely (e.g. `["bison/shift-reduce", "flex/missing-yywrap"]`). |
229-
| `bisonFlex.buildDirectory` | `string` | `""` | Path to the build output directory. Used by **Show in Generated File** to locate `.tab.c` / `lex.yy.c` when they are not next to the source. |
239+
| `bisonFlex.buildDirectory` | `string` | `""` | Directory where Bison/Flex writes its generated files (`.tab.c`, `lex.yy.c`). Supports `${workspaceFolder}` (resolved per workspace root in multi-root setups), paths relative to that root, and absolute paths. See [Configuring `bisonFlex.buildDirectory`](#configuring-bisonflexbuilddirectory) for details. |
230240

231241
---
232242

0 commit comments

Comments
 (0)