Skip to content

hellovai/type fixes #1899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 39 commits into
base: canary
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
1d12c0b
add traceeventid
sxlijin Apr 10, 2025
df4ff7f
s3 metadata
sxlijin Apr 10, 2025
484d320
compiling!
hellovai Apr 14, 2025
4e42315
mor tests working
hellovai Apr 15, 2025
5133f0b
Merge branch 'canary' into sam/baml-endpoints2
hellovai Apr 15, 2025
2892831
all integ tests pass.
hellovai Apr 15, 2025
27d7c9a
feat: add baml-rpc bindings and package.json for rpc
seawatts Apr 16, 2025
0707da8
some more changes
hellovai Apr 16, 2025
fb67dd0
Merge remote-tracking branch 'origin/seawatts/rpc-updates' into sam/b…
sxlijin Apr 16, 2025
ad817c9
add filters to listfunctionspans
sxlijin Apr 16, 2025
90d94e6
more compiling stuff
hellovai Apr 16, 2025
df99f65
remove generated code
hellovai Apr 16, 2025
665a14d
correctly track and publish all events
hellovai Apr 17, 2025
16eedac
update
hellovai Apr 17, 2025
12dc3a3
add batch id
sxlijin Apr 17, 2025
590eb4f
pin the toolchain
sxlijin Apr 18, 2025
e6e9c92
Merge branch 'canary' into sam/baml-endpoints2
sxlijin Apr 18, 2025
c0dd61c
fix
sxlijin Apr 18, 2025
a672f51
events mostly work
hellovai Apr 21, 2025
e3f01f5
functions are generated
hellovai Apr 21, 2025
f39cf3b
get publisher working
sxlijin Apr 24, 2025
1f49701
run all basic input tests
sxlijin Apr 24, 2025
86d21e6
more build script
sxlijin Apr 24, 2025
21b0e9c
getting it workin
hellovai Apr 24, 2025
96bc4e1
add more core types
hellovai Apr 28, 2025
882db7a
feat: checkpoint baml upload src
seawatts Apr 29, 2025
4388e2e
no more panics
sxlijin Apr 24, 2025
5f2cec1
clickhouse sandbox code
sxlijin Apr 29, 2025
a64f5b5
move webhooks into studio, their types dont need to be shared
sxlijin Apr 30, 2025
60161be
move more types around
sxlijin Apr 30, 2025
014014a
into to from
sxlijin Apr 30, 2025
8c09407
feat: get baml src upload without top ast ids working
seawatts Apr 30, 2025
b1e5ac7
fix build errors
sxlijin Apr 30, 2025
5658f5c
get it building again
sxlijin Apr 30, 2025
0ed2209
studio2 api setup
sxlijin May 1, 2025
61fff11
feat: get runtime upload src working
seawatts May 2, 2025
64b2765
feat: upload baml src now working
seawatts May 2, 2025
da091a3
merge with canary
hellovai May 3, 2025
230e108
Attempt #1 at fixing types
hellovai May 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 2 additions & 9 deletions .github/workflows/build-ruby-release.reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: BAML Release - Build Ruby
on:
workflow_call: {}
push:
branches: [aaron-fix]
branches: [bump-ruby]

permissions:
contents: read
Expand All @@ -20,15 +20,8 @@ jobs:
fail-fast: false
matrix:
_:
# Note needs glibc 2.29 https://github.com/rake-compiler/rake-compiler-dock/issues/122
- platform: x86_64-linux
# This is necessary because rb-sys-dock depends on manylinux2014,
# which is based on CentOS 7 which is EOL as of July 2024 Once
# rake-compiler-dock switches to manylinux_2_28 and rb-sys-dock
# picks that up, we can pick their updates up and then drop this.
# See https://github.com/oxidize-rb/rb-sys/issues/402 and
# https://github.com/rake-compiler/rake-compiler-dock/issues/122
# for more details.
rb-sys-dock-setup: ./x86-64_linux-setup.sh
- platform: x86_64-linux-musl
- platform: aarch64-linux
- platform: aarch64-linux-musl
Expand Down
101 changes: 101 additions & 0 deletions .github/workflows/integ-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# infisical checks this against OIDC
name: integ-tests

on:
workflow_call: {}
workflow_dispatch: {}
push:
branches: [ sam/integ-tests-ci ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
# for oidc
id-token: write

jobs:
build-test:
strategy:
fail-fast: false
matrix:
_:
- runs-on: ubuntu-22.04
setup: |
env | sort
curl -fsSL https://ollama.com/install.sh | sh
# test: |
# ollama serve &
# sleep 5
# ollama run tinyllama "2+2?"
# ./tools/build integ-tests/python
# ./tools/build integ-tests/typescript
# ./tools/build integ-tests/ruby

- runs-on: macos-14
setup: |
env | sort
brew install ollama go
# test: |
# ollama serve &
# sleep 5
# ollama run tinyllama "2+2?"
# ./tools/build integ-tests/python
# ./tools/build integ-tests/typescript
# ./tools/build integ-tests/ruby

# winget is not available on windows-2019 or windows-2022
# https://github.com/actions/runner-images/issues/8584
# winget upgrade --all --silent --disable-interactivity --accept-source-agreements --accept-package-agreements
# - runs-on: windows-2025
# setup: |
# env | sort
# winget install --id=Ollama.Ollama -e --accept-package-agreements --accept-source-agreements

name: ${{ matrix._.runs-on }}
runs-on: ${{ matrix._.runs-on }}
# For when we have go integ tests
# env:
# GOARCH: ${{ matrix._.goarch }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.ollama/models
key: ollama-${{ matrix._.runs-on }}
- uses: Swatinem/rust-cache@v2

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'integ-tests' step
Uses Step
uses 'Swatinem/rust-cache' with ref 'v2', not a pinned commit hash
with:
workspaces: engine
cache-on-failure: true
- uses: jdx/mise-action@v2

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'integ-tests' step
Uses Step
uses 'jdx/mise-action' with ref 'v2', not a pinned commit hash
env:
GITHUB_TOKEN: ${{ github.token }}
- uses: astral-sh/setup-uv@v6

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'integ-tests' step
Uses Step
uses 'astral-sh/setup-uv' with ref 'v6', not a pinned commit hash
- name: Setup
run: ${{ matrix._.setup }}
- uses: infisical/[email protected]

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'integ-tests' step
Uses Step
uses 'infisical/secrets-action' with ref 'v1.0.9', not a pinned commit hash
with:
method: oidc
# https://app.infisical.com/organization/identities/5b66a909-d5b3-4835-b518-27abf4c9b97d
identity-id: 5b66a909-d5b3-4835-b518-27abf4c9b97d
env-slug: test
project-slug: gloo-infra-9-fkp

- name: setup TS
run: pnpm install --frozen-lockfile
working-directory: engine/language_client_typescript

- name: Run all integ tests
run: |
ollama serve &
sleep 5
ollama run tinyllama "2+2?"
# If this fails, still run the next one
./tools/bctl integ-tests --suite python
# If this fails, still run the next one
./tools/bctl integ-tests --suite typescript
# If this fails, still run the next one
./tools/bctl integ-tests --suite ruby
6 changes: 6 additions & 0 deletions .github/workflows/primary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- uses: actions/setup-go@v5
with:
go-version: "1.21.x"
- uses: actions/setup-node@v4
with:
node-version: 20
Expand Down Expand Up @@ -133,6 +136,9 @@ jobs:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- uses: astral-sh/setup-uv@v5
- uses: actions/setup-go@v5
with:
go-version: "1.21.x"
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
echo "is_release_tag=$IS_RELEASE" >> $GITHUB_OUTPUT
echo "Determined version: $VERSION"
echo "Is release tag: $IS_RELEASE"

build-python-release:
uses: ./.github/workflows/build-python-release.reusable.yaml

Expand All @@ -83,6 +84,11 @@ jobs:
version: ${{ needs.determine-version.outputs.version_string }}
# Pass the boolean output directly
is_release_build: ${{ needs.determine-version.outputs.is_release_tag == 'true' }}

# Kick off integration tests when we build everything.
# This does not yet succeed/pass consistently, or even run everything, but it's a good start.
integ-tests:
uses: ./.github/workflows/integ-tests.yml

# placeholder fan-in step
all-builds:
Expand Down
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,53 @@

All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.

## [0.86.1](https://github.com/boundaryml/baml/compare/0.86.0..0.86.1) - 2025-04-30


### Bugs
- Fix arguments for functions from go (#1884) - ([b83557c](https://github.com/boundaryml/baml/commit/b83557c2c2ff279e49a7e589f5d6f06e1bd59fba)) - Todd Berman
- Bump version to 0.86.1 - ([af4c366](https://github.com/boundaryml/baml/commit/af4c366c2633b6049dbdb87b8a8e0fb4ad08c286)) - Aaron Villalpando

## [0.86.0](https://github.com/boundaryml/baml/compare/0.85.0..0.86.0) - 2025-04-30

### Bug Fixes

- fix union streaming bug where unions wouldn't stream until they were done (#1858)
- Fix codegen when streaming done types (#1861) - ([d6c4ff3](https://github.com/boundaryml/baml/commit/d6c4ff30ebdaa4b90440b92b2d2045eca0205775)) - Greg Hale
- Go Encode/Decode fixes (#1865) - ([8ecb065](https://github.com/boundaryml/baml/commit/8ecb065d89cc10b9e306c6155146122ee3427a0f)) - Todd Berman
- Fix bedrock stalled stream protection not working with custom http client, and support additional_model_request_fields (#1877) - ([da15434](https://github.com/boundaryml/baml/commit/da1543470ff2a3601808e6ebc04548c1a56a445f)) - aaronvg
- Remove run command from CLI (#1879) - ([7684d71](https://github.com/boundaryml/baml/commit/7684d71c615c0dc4d093a2316cf06054292c74ae)) - hellovai
- [Rust LSP] Support generateCodeOnSave setting, clean up error messages (#1881) - ([784f1b1](https://github.com/boundaryml/baml/commit/784f1b1ccbb2361254020a2a389f8b2633c8a39a)) - aaronvg


### Features
- Download the right LSP and CLI depending on the project version (#1738) - ([429936d](https://github.com/boundaryml/baml/commit/429936dcfa802db5a51b9c250ce52ca5657fd3de)) - Antonio Sarosi
- make gcp auth work seamlessly from vscode (#1860) - ([484c449](https://github.com/boundaryml/baml/commit/484c44987dcf5b87512d333cc71bc2f2717c58a7)) - Samuel Lijin


## [0.85.0](https://github.com/boundaryml/baml/compare/0.84.4..0.85.0) - 2025-04-23

### Bug Fixes

- make playground env var reveal toggle visibility on the correct row (#1816) - ([5c3794a](https://github.com/boundaryml/baml/commit/5c3794a10b2257b8f3ef9c4cc8bc49429359dbe3)) - Samuel Lijin
- Fix issue where playground proxy wasn't actually used which caused CORS issues (#1841) - ([1657e35](https://github.com/boundaryml/baml/commit/1657e3529476ec1aa9ccdd2059e50795a3a5a0b9)) - aaronvg
- add support for plumbing through some errors for go (#1844) - ([766ba08](https://github.com/boundaryml/baml/commit/766ba08f4fb7062d977cc834e3016211d06ac27f)) - hellovai

### Features

- move REST API out of preview and add docs on streaming (#1818) - ([55e9d9d](https://github.com/boundaryml/baml/commit/55e9d9da7055b3ad708890d769128c9d1a1be403)) - Samuel Lijin
- Support claude models via vertex apis (#1820) - ([c8378bc](https://github.com/boundaryml/baml/commit/c8378bc4d049d6c254cb30b4fc4c3eaa95af1ff2)) - Samuel Lijin
- Support HTTPS_PROXY and HTTP_PROXY system proxies in AWS client by delegating to the reqwest client (#1827) - ([c5c7fc6](https://github.com/boundaryml/baml/commit/c5c7fc63138a391f16c432ba3cc84376189ef6b8)) - aaronvg
- Make Typescript generator have a `outputFormat "esm"` field to use ES Module-friendly imports (#1831) - ([d27e729](https://github.com/boundaryml/baml/commit/d27e729b9bb6d50fac0059401c4a8ca1269d8168)) - aaronvg
- Support ruby 3.4 (#1830) - ([960c7d8](https://github.com/boundaryml/baml/commit/960c7d8bc2adde79c1f62b1ed6887fde212ececb)) - aaronvg


### Miscellaneous
- Test collector using openai-generic client (groq) (#1813) - ([430e428](https://github.com/boundaryml/baml/commit/430e4288b3a8b17166832bd61beda1a36fa4d1c6)) - aaronvg
- Document jinja in checks and asserts (#1826) - ([b27c980](https://github.com/boundaryml/baml/commit/b27c98073519120914ad29fae0ca627fc1757b57)) - Greg Hale
- only print out vertex auth errors if it failed to auth completely (#1843) - ([e42a594](https://github.com/boundaryml/baml/commit/e42a594475557c75c04f2aeeafc77ffae7fdb0d9)) - aaronvg
- Bump version to 0.85.0 - ([654fec2](https://github.com/boundaryml/baml/commit/654fec219d88ff90fa64fdf77aa49a124cbd0d45)) - Aaron Villalpando

## [0.84.4](https://github.com/boundaryml/baml/compare/0.84.3..0.84.4) - 2025-04-17

### Bug Fixes
Expand Down
73 changes: 23 additions & 50 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@ First off, thanks for your interest in contributing to BAML! We appreciate all t

## Table of Contents

- [How to Contribute](#how-to-contribute)
- [Join our Community](#join-our-community)
- [Check Existing Issues](#check-existing-issues)
- [Creating an Issue](#creating-an-issue)
- [Fork the Repository](#fork-the-repository)
- [Submit a Pull Request (PR)](#submit-a-pull-request-pr)
- [Examples of Merged PRs](#examples-of-merged-prs)
- [Setting up the BAML Compiler and Runtime](#setting-up-the-baml-compiler-and-runtime)
- [Compiler Architecture Overview](#compiler-architecture-overview)
- [Steps to Build and Test Locally](#steps-to-build-and-test-locally)
- [Running Integration Tests](#running-integration-tests)
- [Python Integration Tests](#python-integration-tests)
- [TypeScript Integration Tests](#typescript-integration-tests)
- [OpenAPI Server Tests](#openapi-server-tests)
- [Grammar Testing](#grammar-testing)
- [VSCode Extension Testing](#vscode-extension-testing)
- [Testing PromptFiddle.com](#testing-prompfiddlecom)
- [Contributing to BAML](#contributing-to-baml)
- [Table of Contents](#table-of-contents)
- [How to Contribute](#how-to-contribute)
- [Examples of Merged PRs:](#examples-of-merged-prs)
- [Setting up the BAML Compiler and Runtime](#setting-up-the-baml-compiler-and-runtime)
- [Compiler Architecture Overview](#compiler-architecture-overview)
- [Steps to Build and Test Locally](#steps-to-build-and-test-locally)
- [Running Integration Tests](#running-integration-tests)
- [Prerequisites for All Tests](#prerequisites-for-all-tests)
- [Environment Variables](#environment-variables)
- [TypeScript Integration Tests](#typescript-integration-tests)
- [Python Integration Tests](#python-integration-tests)
- [Ruby Integration Tests](#ruby-integration-tests)
- [Adding New Tests](#adding-new-tests)
- [Debugging Tests](#debugging-tests)
- [OpenAPI Server Testss](#openapi-server-testss)
- [Grammar Testing](#grammar-testing)
- [VSCode Extension Testing](#vscode-extension-testing)
- [Testing promptfiddle.com](#testing-promptfiddlecom)


## How to Contribute
Expand Down Expand Up @@ -231,36 +233,6 @@ Each language has its own debugging setup in VS Code:
- Use launch configuration from Ruby README
- Use verbose mode for detailed output

### Common Issues and Solutions

1. **Environment Setup**:
- For external contributors:
- Create a `.env` file with required API keys
- Use `dotenv` commands instead of Infisical
- For BAML internal developers:
- Ensure Infisical is configured correctly
- Use `infisical run` commands

2. **Client Generation**:
- Ensure BAML CLI is up to date: `baml update-client`
- Check BAML source files for errors
- Regenerate client code after changes

3. **Build Issues**:
- Clean and rebuild language clients
- Check language-specific toolchain versions
- Verify all dependencies are installed

4. **Environment Variables**:
- Set up Infisical correctly
- Verify API keys are present
- Check `.env` file if not using Infisical

5. **Test Timeouts**:
- Adjust timeout settings in test configurations
- Consider rate limiting for API calls
- Use appropriate test annotations/decorators

### OpenAPI Server Testss

1. Navigate to the test directory:
Expand Down Expand Up @@ -310,8 +282,11 @@ This requires a macos or linux machine, since we symlink some playground files b
- Select "Launch VSCode Extension" and press the play button.
- This will open a new VSCode window in Debug mode.
- You can open a simple BAML project in this window (refer to our quickstart guide to set up a simple project, or clone the `baml-examples` repository).
4. Generate the language server binary (in case our scripts don't do this for you)
- `cd typescript/vscode-ext/packages/vscode`
- `pnpm server:build`

4. Reload the extension:
5. Reload the extension:
- Use `Command + Shift + P` to reload the extension when you change any core logic.
- Alternatively, close and reopen the playground if you rebuild the playground.

Expand All @@ -333,5 +308,3 @@ This is useful if you want to iterate faster on the Extension UI, since it suppo
- `pnpm dev`

3. Modify the files in `typescript/playground-common`

4. Use the `vscode-` prefixed tailwind classes to get proper colors.
Loading
Loading