-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pacmak): API locations for inherited members are incorrect (#3130)
The code generators in pacmak are now passing API locations to Rosetta, to indicate the source of the snippets they're finding. This is necessary to distinguish the same code snippet found in a different submodule, because it might be using a different fixture. They all had the same mistake though, in that `rosetta extract` was identifying snippets by "defining API element", whereas pacmak was identifying snippets by what class it was generating code for... and in the case of inheritance, those two locations would be different. Put in extra effort in the pacmak target generators to keep track of where we found a method or property, so we can use the same location translating the examples. This was validated by running pacmak over the entire CDK repository, with the option `--rosetta-unknown-snippets=fail`, and making sure it completed successfully. We prevent regressions by doing the same in the jsii integ tests: cdklabs/cdk-ops#1777. I hope that will do, I'm not sure how to turn this into a proper unit test. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
- Loading branch information
Showing
4 changed files
with
109 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.