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

Add ignore access level modifier #116

Merged
merged 1 commit into from
Mar 3, 2024
Merged

Conversation

skorulis-ap
Copy link
Collaborator

@skorulis-ap skorulis-ap commented Feb 29, 2024

This allows tagging an entire assembly with // @knit ignore to prevent parsing from continuing. The purpose of this is to allow wildcard specification of assemblies (like Sources/DI/*Assembly.swift) but still being able to ignore individual files.

The ignore directive works for registrations as well and drops them from the array. A further improvement could completely skip parsing allowing for non parsable registrations to be included and handled manually.

This was driven from #114 which required this option.

@skorulis-ap skorulis-ap marked this pull request as ready for review February 29, 2024 06:52
Copy link
Collaborator

@jmesmith jmesmith left a comment

Choose a reason for hiding this comment

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

The purpose of this is to allow wildcard specification of assemblies (like Sources/DI/*Assembly.swift) but still being able to ignore individual files.

Implementation makes sense, but could you expand on this for my own understanding? I'm not sure I understand why this is useful

@skorulis-ap
Copy link
Collaborator Author

Implementation makes sense, but could you expand on this for my own understanding? I'm not sure I understand why this is useful

Currently we manually specify any other assemblies to be parsed in the podspec s.dependency_injected(additional_assemblies: ["CommonCashAppAssembly", "CommonCashAbstractAppAssembly"]). One thing I'm working on is driven directly from bazel so it doesn't have this information, it's pulling in all assembly files from the DI folder. Some of these are using features that are incompatible which Knit so the parsing fails.

@skorulis-ap skorulis-ap merged commit 7899182 into main Mar 3, 2024
5 checks passed
@skorulis-ap skorulis-ap deleted the skorulis/assembly-ignore branch March 3, 2024 22:11
@jmesmith
Copy link
Collaborator

Implementation makes sense, but could you expand on this for my own understanding? I'm not sure I understand why this is useful

Currently we manually specify any other assemblies to be parsed in the podspec s.dependency_injected(additional_assemblies: ["CommonCashAppAssembly", "CommonCashAbstractAppAssembly"]). One thing I'm working on is driven directly from bazel so it doesn't have this information, it's pulling in all assembly files from the DI folder. Some of these are using features that are incompatible which Knit so the parsing fails.

I see, thanks!

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