Skip to content

Commit 2a4771b

Browse files
authored
cache current binary in downloads folder as well (#1910)
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > This PR adds caching for the current bundled CLI, introduces a `syncExtensionToGeneratorVersion` setting, and removes the `restartTSServerOnSave` option. > > - **Behavior**: > - Cache current bundled CLI in downloads folder in `cliDownloader.ts` to preserve previous version's CLI on auto-updates. > - Add `syncExtensionToGeneratorVersion` option to `bamlConfig.ts` in `playground-common`, `language-server`, and `language-server-client`. > - Remove `restartTSServerOnSave` option from `package.json` and related files. > - **Configuration**: > - Add `syncExtensionToGeneratorVersion` setting to `bamlConfigSchema` in `bamlConfig.ts` files. > - Update `package.json` to include `syncExtensionToGeneratorVersion` setting. > - **Version Handling**: > - Update `index.ts` to handle `baml_src_generator_version` notifications and sync versions based on `syncExtensionToGeneratorVersion` setting. > - Skip version update on Windows when `syncExtensionToGeneratorVersion` is set to `auto`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral)<sup> for 006652a. You can [customize](https://app.ellipsis.dev/BoundaryML/settings/summaries) this summary. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
1 parent dd26a2d commit 2a4771b

16 files changed

Lines changed: 119 additions & 38 deletions

File tree

fern/03-reference/vscode-ext/restartTSServerOnSave.mdx

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
| Type | Default Value |
2+
| --- | --- |
3+
| `"auto" \| "never" \| "always"` | "auto" |
4+
5+
6+
- `auto`: Sync the extension version to match the generator version when a mismatch is detected. This will make the extension download the correct version of the baml-cli to generate the client code -- preventing issues with mismatched versions.
7+
- `never`: Never sync the extension version to match the generator version
8+
- `always`: Always attempt to sync the extension version to match the generator version.
9+
10+
11+
Note that on Windows platforms, the extension-sync feature is disabled when the `syncExtensionToGeneratorVersion` setting is set to `auto`.
12+
13+
## Usage
14+
15+
```json
16+
{
17+
"baml.syncExtensionToGeneratorVersion": "auto",
18+
}
19+
```

fern/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -814,10 +814,10 @@ navigation:
814814
path: 03-reference/vscode-ext/clipath.mdx
815815
- page: baml.generateCodeOnSave
816816
path: 03-reference/vscode-ext/generateCodeOnSave.mdx
817-
- page: baml.restartTSServerOnSave
818-
path: 03-reference/vscode-ext/restartTSServerOnSave.mdx
819817
- page: baml.enablePlaygroundProxy
820818
path: 03-reference/vscode-ext/enablePlaygroundProxy.mdx
819+
- page: baml.syncExtensionToGeneratorVersion
820+
path: 03-reference/vscode-ext/syncExtensionToGeneratorVersion.mdx
821821
- section: Boundary Extraction API
822822
contents:
823823
- api: API Reference

integ-tests/baml_src/generators.baml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ generator lang_ruby {
3434
generator openapi {
3535
output_type rest/openapi
3636
output_dir "../openapi"
37-
version "0.86.1"
37+
version "0.86.0"
3838
on_generate "rm .gitignore"
3939
}
4040

integ-tests/go/baml_client/inlinedbaml.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integ-tests/python/baml_client/inlinedbaml.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)