Skip to content

remove unused files in dart functions gitignore#10516

Merged
aalej merged 5 commits into
mainfrom
aalej_clean-dart-gitignore
May 27, 2026
Merged

remove unused files in dart functions gitignore#10516
aalej merged 5 commits into
mainfrom
aalej_clean-dart-gitignore

Conversation

@aalej

@aalej aalej commented May 14, 2026

Copy link
Copy Markdown
Contributor

Description

Removed unused files .gitignore template and added bin/server to the list

Fixes #10500. Imitates a similar .gitignore from other templates

Scenarios Tested

Ran firebase init functions
Screenshot 2026-05-14 at 7 52 11 PM

Not sure if we might want to keep build/. We do have build_runner in pubspec.yaml, and we do run it at some point so it might worth keeping?

const buildRunnerProcess = spawn(
this.bin,
["run", "build_runner", "build", "--delete-conflicting-outputs"],
{
cwd: this.sourceDir,
stdio: ["ignore", "pipe", "pipe"],
},
);

The build was generated in .dart_tool/build so .dart_tool/ should cover the build_runner build output

Sample Commands

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the .gitignore template for Dart functions by removing several JavaScript-related ignore patterns. The reviewer recommends retaining the Firebase debug log patterns, as they are standard CLI artifacts, and suggests adding bin/server and functions.yaml to the ignore list to ensure build artifacts are not tracked in version control.

*.js.symbols
firebase-debug.log
firebase-debug.*.log
*.local

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The JavaScript-related patterns are unused in this context, but firebase-debug.log and its variants should be retained as they are standard artifacts produced by the Firebase CLI and should not be committed to version control. Additionally, it is recommended to ignore the compiled executable bin/server and the generated functions.yaml file, as these are build artifacts that should not be tracked in version control.

bin/server
functions.yaml
firebase-debug.log
firebase-debug.*.log
*.local

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks good. I think we should keep bin/server though.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thanks for checking! added bin/server to the list

@shettyvarun268 shettyvarun268 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One very minor nit that we might want to mention in the description that we added bin/server in the file but apart from that LGTM!

@OutdatedGuy

OutdatedGuy commented May 17, 2026

Copy link
Copy Markdown
Contributor

Not sure if we might want to keep build/. We do have build_runner in pubspec.yaml, and we do run it at some point so it might worth keeping?

Output of build_runner is at location .dart_tool/build. Hence, build at root level is never used AFAIK.

This PR also seems to solve firebase/firebase-functions-dart#177

@aalej

aalej commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

You are right @OutdatedGuy, the build output was in .dart_tool/build - removing build/ as well as it should be covered by .dart_tool/

@aalej aalej enabled auto-merge (squash) May 27, 2026 12:03
@aalej aalej merged commit 7c96938 into main May 27, 2026
50 of 56 checks passed
@aalej aalej deleted the aalej_clean-dart-gitignore branch May 27, 2026 12:18
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.

Bloated .gitignore in Dart Functions template

5 participants