Skip to content

feat(workspace): add .firmignore support for ignoring files#54

Open
mrorigo wants to merge 2 commits into
42futures:mainfrom
mrorigo:features/firmignore
Open

feat(workspace): add .firmignore support for ignoring files#54
mrorigo wants to merge 2 commits into
42futures:mainfrom
mrorigo:features/firmignore

Conversation

@mrorigo
Copy link
Copy Markdown

@mrorigo mrorigo commented Apr 10, 2026

  • Add ignore crate dependency for gitignore-style pattern matching
  • Refactor load_directory to use WalkBuilder from ignore crate
  • Support .firmignore file, with fallback to .gitignore, then no filtering
  • Add tests for ignore file logic
  • Document feature in workspace.md

mrorigo added 2 commits April 10, 2026 20:14
- Add ignore crate dependency for gitignore-style pattern matching
- Refactor load_directory to use WalkBuilder from ignore crate
- Support .firmignore file, with fallback to .gitignore, then no filtering
- Add tests for ignore file logic
- Document feature in workspace.md
@danielrothmann
Copy link
Copy Markdown
Member

Thanks for the PR @mrorigo - would you mind sharing your workflow that needed this feature?

Copy link
Copy Markdown
Member

@danielrothmann danielrothmann left a comment

Choose a reason for hiding this comment

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

LGTM except I don't think we need special treatment of the schemas folder

self.load_directory_recursive(directory_path, directory_path)
}
// 1. Always load schemas from .firm/schemas/ explicitly - never subject to ignore rules
let schemas_dir = directory_path.join(".firm").join("schemas");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Although firm init will place built-in schemas in /schemas, schemas in general can be discovered from any subdirectory of the workspace, as well as being inlined into .firm files containing entities.

For this feature, I think it would be more expected that if a schema folder is explicitly ignored, they would not be included in the workspace build.

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.

2 participants