Skip to content

Commit

Permalink
push again
Browse files Browse the repository at this point in the history
  • Loading branch information
sxlijin committed Sep 6, 2024
1 parent ce39e00 commit 08bca1f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions engine/baml-runtime/src/cli/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ fn generate_main_baml_content(
openapi_generate_command
),
Some("java") => format!(
"{} --additional-properties generateApiTests=false,generateModelTests=false && cd ../baml_client && mvn clean install",
"{} --additional-properties invokerPackage=com.boundaryml.baml_client,modelPackage=com.boundaryml.baml_client.model,apiPackage=com.boundaryml.baml_client.api,java8=true && cd ../baml_client && mvn clean install",
openapi_generate_command
),
Some("php") => format!(
"{} --additional-properties composerPackageName=boundaryml/baml-client",
"{} --additional-properties composerPackageName=boundaryml/baml-client,invokerPackage=BamlClient",
openapi_generate_command
),
Some("ruby") => format!(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ class Project {
}: { onSuccess: (message: string) => void; onError: (message: string) => void }) => {
const startMillis = performance.now()
try {
await Promise.all(
const generated = await Promise.all(
this.wasmProject.run_generators().map(async (g) => {
// Creating the tmpdir next to the output dir can cause some weird issues with vscode, if we recover
// from an error and delete the tmpdir - vscode's explorer UI will still show baml_client.tmp even
Expand Down Expand Up @@ -424,7 +424,10 @@ class Project {
)
const endMillis = performance.now()

onSuccess(`BAML client generated! (took ${Math.round(endMillis - startMillis)}ms)`)
const generatedFileCount = generated.reduce((acc, g) => acc + g.files.length, 0)
if (generatedFileCount > 0) {
onSuccess(`BAML client generated! (took ${Math.round(endMillis - startMillis)}ms)`)
}
} catch (e) {
onError(`Failed to generate BAML client: ${e}`)
}
Expand Down

0 comments on commit 08bca1f

Please sign in to comment.