-
Notifications
You must be signed in to change notification settings - Fork 58
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
Extensions ignored in type length analysis #1
Comments
Yeah, this is something I'd really love to see – the system should collapse extensions into their parent type before running analysis. I think this would be a great thing for someone else to implement, because not only can they collapse length of the type, but they can also collapse the inheritance arrays too. I'm going to mark this with a help wanted tag to encourage someone to pick up this and have a go at implementing. |
@twostraws I was gonna take a look at this but I can't make the Package run from Xcode. It always fails because it doesn't find the SwiftSyntax dlyb.
Running the tests has the additional error of
This seems to be some known issue https://forums.swift.org/t/swiftsyntax-with-swift-5-1/29051/15 but I haven't been able to find a workaround that works. Building, running and testing from the CI works tho. Do you have any special setup to make it work from Xcode? EDIT: I've did a fix anyway, running the test from the CLI. That's when you realise how awesome Xcode is 😂 |
Gather all types based on name so extensions count towards their extending type.
Gather all types based on name so extensions count towards their extending type.
Fixes #1 - improved type length analysis
How to reproduce:
Create empty directory named "Foobar"
Initialize swift package via
$ swift package init
Change …
… to …
$ sitrep
$ sitrep
againFoobar
is now suddenly not considered the longest type any more.This is wrong.
The contents of a type's extensions should be considered content of the type.
The text was updated successfully, but these errors were encountered: