Visitar URL original
Swift: Extract type aliases by geoffw0 · Pull Request #12509 · github/codeql · GitHub
The Wayback Machine - https://web.archive.org/web/20260605100103/https://github.com/github/codeql/pull/12509
Skip to content

Swift: Extract type aliases#12509

Merged
geoffw0 merged 7 commits into
github:mainfrom
geoffw0:typealiasimpl
Mar 30, 2023
Merged

Swift: Extract type aliases#12509
geoffw0 merged 7 commits into
github:mainfrom
geoffw0:typealiasimpl

Conversation

@geoffw0
Copy link
Copy Markdown
Contributor

@geoffw0 geoffw0 commented Mar 13, 2023

Following up from #12489, this PR adds the extractor change for type alias targets, uses it in QL, and updates the tests. There is also an upgrade and downgrade script, which I've tested, but currently as far as I can tell the upgrade script is not being found/used.

@geoffw0 geoffw0 added no-change-note-required This PR does not need a change note Swift labels Mar 13, 2023
@geoffw0
Copy link
Copy Markdown
Contributor Author

geoffw0 commented Mar 14, 2023

The failure looks something like this:

	CodeQL database location: swift/ql/test/library-tests/elements/type/nominaltype/nominaltype.testproj
	Query location: swift/ql/test/library-tests/elements/type/nominaltype/nominaltype.ql
The database may be too new for the QL libraries the query is using; try upgrading them.
Alternatively, running 'codeql database upgrade swift/ql/test/library-tests/elements/type/nominaltype/nominaltype.testproj' with an appropriate --search-path option might help.

@geoffw0
Copy link
Copy Markdown
Contributor Author

geoffw0 commented Mar 15, 2023

After discussion with @d10c , it seems most likely the error is in my testing. Once I have it working I'll have to merge main and reconstruct the upgrade/downgrade scripts.

@geoffw0
Copy link
Copy Markdown
Contributor Author

geoffw0 commented Mar 29, 2023 •

I've just removed the upgrade script and changes to generated and .expected files; merged in main; re-created all that was removed (i.e. updated this onto latest); working on testing it...

@geoffw0
Copy link
Copy Markdown
Contributor Author

geoffw0 commented Mar 29, 2023

I've now rebased the whole thing, and I've successfully tested the upgrade script.

Downgrading with codeql database upgrade . --allow-downgrades --target-sha=[SHA] stubbornly refuses to recognize that the correct downgrade script is there (very likely I'm getting the command wrong?) I think it is downgrading automatically as part of codeql query run , because otherwise the upgraded snapshot should no longer work on the main branch. But it's difficult to be 100% sure what the commands are doing. I'd appreciate if someone could confirm?

@geoffw0 geoffw0 marked this pull request as ready for review March 30, 2023 07:23
@geoffw0 geoffw0 requested a review from a team as a code owner March 30, 2023 07:23
@geoffw0 geoffw0 merged commit 7729a6b into github:main Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note Swift

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants