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
[Swift APIView] Create intermediate models and SwiftAPIViewTests package #3069
Conversation
568e0c5
to
f4ef41f
Compare
f4ef41f
to
db35168
Compare
checkIndent() | ||
let item = Token(definitionId: definitionId, navigateToId: nil, value: text, kind: .text) | ||
// TODO: Add cross-language definition ID | ||
// if add_cross_language_id: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this just for Swift or across languages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just left comment here so I know where to add it. Right now only Python has this implemented.
} | ||
|
||
// TODO: Add support for diagnostics | ||
// func diagnostic(self, text, line_id): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are diagnostics disabled across the board?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They've never been implemented in Swift APIView, so I added this to come to later.
decl.members.forEach { member in | ||
switch member { | ||
case let .declaration(decl): | ||
// TODO: We need to push these into the relevant object definitions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this mean? Push the extension declaration into the proper Extended class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was more me thinking out loud. Part of: #2536
I'm not yet sure what the best way would be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…age (Azure#3069) * Initial work. * Refactoring progress. * Refactoring progress. * More refactoring. * Fixes and extract tests to new test project. * Address fixes. * More updates. Add operator and precedence group tests. * Fix navigation. Add attribute tests. * Fix issues with enums. Add enum test file. * TypeModel improvements. * Add FunctionsTestFile
This refactor extracts tests out to a
SwiftAPIViewTests
package a la Python, adds a number of new tests from Apple's own documentation, and adds an internal intermediate model that will allow us to manipulate objects in support of fixing the issues we see with extensions. Fixes #3091.This PR does not attempt to fix the issue with extensions. It just lays that groundwork.
APIView: https://apiviewstaging.azurewebsites.net/Assemblies/Review/a0490ca69cf740cea3ce6fabad9c3c67/2b0384fd32894ecfa24edfcd73a11cff