Skip to content

Fix SDFCore module not found #7

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

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Fix SDFCore module not found #7

merged 1 commit into from
Nov 12, 2024

Conversation

fdiaz
Copy link
Owner

@fdiaz fdiaz commented Nov 12, 2024

I've known executable targets have a problem when running unit tests on them, but since I haven't tried it in a couple of years I decided to give it another try with this package.

Even though things worked out locally and using the CLI, it started failing for @dfed when he pulled the repo, and after pulling the latest version the same happened to me.

To be safe, I created a new CLI target that contains the parsing of the arguments and delegates the rest to the SDFCore target for uni testing.

@@ -51,6 +51,22 @@ final class MacroInitializerSorterTests {
"""
try await #expect(sut.run(onContent: content.rawValue).contains(expected))
}

Copy link
Owner Author

Choose a reason for hiding this comment

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

This is completely unnecessary for this issue, but it's how I discovered this was failing.

Basically I was wondering if the changes introduced in #4 would work still when the nested type contains the macro too, and I was validating with this unit test.

As expected, things work! So nothing to see here, but I think this unit test is still valuable so I decided to commit it anyways.

Copy link
Collaborator

Choose a reason for hiding this comment

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

SafeDI does not allow nested macros today, but certainly doesn't hurt to support this potential future case.

@fdiaz fdiaz merged commit f533ddf into main Nov 12, 2024
3 checks passed
@fdiaz fdiaz deleted the fd/fix-sfdcore-not-found branch November 12, 2024 22:14
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