Skip to content
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

Don't attempt to generate DSL RBIs for test files #2039

Merged

Conversation

alexcrocha
Copy link

Motivation

Attempting to generate DSL RBIs for test files, which are not loaded in development mode, triggers exceptions and leads to unnecessary errors. By skipping test files in our watch configuration, we can prevent these issues.

Implementation

  • Updated workspace_did_change_watched_files to skip files ending with _test.rb and _spec.rb, preventing unnecessary processing and exceptions.

  • Discovered a bug during pairing with @KaanOzkan: added compact to flat_map to remove nil elements from our array, ensuring the empty? check functions correctly and preventing tapioca dsl from running without arguments.

@alexcrocha alexcrocha marked this pull request as ready for review October 9, 2024 20:15
@alexcrocha alexcrocha requested a review from a team as a code owner October 9, 2024 20:15
@alexcrocha alexcrocha merged commit 044b21f into tapioca-addon-feature-branch Oct 9, 2024
29 of 30 checks passed
@alexcrocha alexcrocha deleted the ar/stop-generating-for-test-files branch October 9, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants