Skip to content

Conversation

@Lyokone
Copy link

@Lyokone Lyokone commented Jan 23, 2026

Description

Scenarios Tested

Sample Commands

Comment on lines +427 to +430
// For Dart, include the function name in the path so the server can route
// For other runtimes, use / as they use FUNCTION_TARGET env var
const isDart = runtime?.startsWith("dart");
const path = isDart ? `/${trigger.entryPoint}` : `/`;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this

private staticBackends: EmulatableBackend[] = [];
private dynamicBackends: EmulatableBackend[] = [];
private watchers: chokidar.FSWatcher[] = [];
private buildRunnerProcesses: Map<string, ChildProcess> = new Map();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, feels like we are polluting something generic


// For Dart, include the function name in the path so the server can route
// For other runtimes, use / as they use FUNCTION_TARGET env var
const isDart = runtime?.startsWith("dart");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like this should be easier to check? E.g. for each runtime add a runtime type enum/const, so we can do:

runtime.type === RUNTIMES.DART

Or something... maybe out of scope of the PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or instanceof DartDelegate

dependencies:
firebase_functions:
path: ../
shelf:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Remove once we wrap shelf types

/.+?[\\\/]venv[\\\/].+?/, // Ignore site-packages in venv
...(backend.ignore?.map((i) => `**/${i}`) ?? []),
],
ignored: isDart
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, wondering if it's not polluting too much, maybe we should try to integrate with the

async build(): Promise<void> {

@Ehesp Ehesp changed the title @invertase/dart feat: add Dart runtime delegate Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants