-
Notifications
You must be signed in to change notification settings - Fork 170
[feat] bamlproject.toml
instead of baml_src/
#1904
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
Comments
we really like this idea -- but we would probably just choose one approach and not 2. And the reason is that once you have more than 1 way of configuring things you start venturing into dangerous territory. But we could potentially help people initialize baml projects with the right baml_src delineation using a .toml file |
I love this idea! I am facing this problem right now, and am solving it in the meantime by shadow-copying from multiple directories into one (to avoid my root python app from having to be in one big "baml_src" directory). Works for my situation, but very hacky, so I would welcome a better solution! |
Note I fully support keeping baml_src/ as a recommended convention for the name of the directory containing BAML files, just let's not have its presence be the discovery mechanism. TL;DR Let's decouple the discovery mechanism from a fixed directory name
This is a valid concern. However, with a clear auto-transition to a bamlproject.toml marker file and a defined deprecation timeline, the risk of persistent dual configurations (the "dangerous territory") is very low.
# This file marks this directory as a BAML source root.
#
# It was automatically generated to ensure compatibility with future BAML versions,
# which will rely on 'bamlproject.toml' for discovering BAML files.
# All '*.baml' files in this directory and its subdirectories are included.
P.S. FAQ |
+1 on this! we've talked about this internally and are actually already aligned here. We think this is way :) |
Use case
I use step-based prototyping (step 1, step2, etc.)
this makes prototypes super readable
Problem
however this means that I HAVE to always hold everything in baml_src, I think it's not as elegant once you start mixing baml files with the rest of the codebase (if you know what you're doing and why holding everything in a dedicated
baml_src
would still make most sense for most projects)I do however understand the value of baml_src pattern, it makes browsing 3rd party baml projects really easy
Solution spec
baml_src/
and*/
the same if folder*/
has*/bamlproject.toml
(the same way howpyproject.toml
signifies the root of a python project instead ofpython_src/
). Keep the file empty, or you can make itbamlproject.baml
, where it would be included like any other baml file.baml_src
would ignore allbaml_src/**/baml_src/
folders, andX
folders wherebaml_src/**/X/bamlproject.toml
)(TL;DR all I'm asking is for VSCode support for this alternate convention)
(P.S. Now that I think about it, I could probably symlink a
x/*
folder to a gitignored.baml/baml_src/x/*
, and VSCode should pick it up (?))The text was updated successfully, but these errors were encountered: