You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Only 21 of 75 Tests succeed when running them on main. #28
When trying to work on some of the issues I filed earlier today, I discovered that when running the tests on main (simply opening the Package.swift in XCode an pressing Command + U) about 75% of the Tests fail.
The failures seem to indicate that @Codable is not expanded:
Activity
soumyamahunt commentedon Oct 10, 2023
This is because testing of extension macros are not supported by swift-syntax.
The workaround I use currently to test is to comment these lines and run tests to check:
https://github.com/SwiftyLab/MetaCodable/blob/main/Sources/CodableMacroPlugin/Registration/Registrar.swift#L121-L127
https://github.com/SwiftyLab/MetaCodable/blob/main/Sources/CodableMacroPlugin/Registration/Registrar.swift#L129-L131
https://github.com/SwiftyLab/MetaCodable/blob/main/Sources/CodableMacroPlugin/Registration/Registrar.swift#L133-L139
https://github.com/SwiftyLab/MetaCodable/blob/main/Sources/CodableMacroPlugin/Registration/Registrar.swift#L141-L143
With these lines commented most of the test cases will pass but some cases asserting extension macro behaviour will fail.
I am waiting for a fix from swift-syntax so that I can and unit tests part of CI. Until then this work around is all I have.
soumyamahunt commentedon Nov 3, 2023
@Midbin I have added fix in my forked version of swift-syntax which is now used by this library, hopefully the fix is accepted by upstream.
The fix works well with VSCode without any additional steps.
For XCode, you might need to comment out line
49and63inPackage.swift:MetaCodable/Package.swift
Line 49 in 5344f13
MetaCodable/Package.swift
Line 63 in 5344f13