Skip to content
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

docs(core): make examples compile #11273

Merged
merged 17 commits into from
Nov 30, 2020
Merged

docs(core): make examples compile #11273

merged 17 commits into from
Nov 30, 2020

Conversation

RomainMuller
Copy link
Contributor

@RomainMuller RomainMuller commented Nov 3, 2020

Add support in cdk-build to actually run jsii-rosetta --compile --fail
in packages that declare supporting "strict" mode for jsii-rosetta.
This enables a "quick" feedback loop for detecting "now-invalid" code
examples.

Turned on this feature on @aws-cdk/core and made the necessary
adjustments to fixtures and examples so that they now compile. In
particular:

  • Made all import statements implicit from the examples, as they are
    all moved to the fixture. Imports from the library itself are always
    unqualified
    , and external ones are always qualified.
  • Used declare statements in the fixtures to avoid having to come
    up with "real" values that compile. This is way less brittle than actually
    coming up with an initializer, especially for external types.

Also turned on this feature on @aws-cdk/aws-iam and made the
ajustement to fixtures and examples so that they now compile. In
particular:

  • All imports to @aws-cdk/core are nominal and un-qualified.
  • All imports to other libraries are always qualified.

Fixes #11624.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@RomainMuller RomainMuller added contribution/core This is a PR that came from AWS. docs/inline Related to inline documentation of the API Reference documentation This is a problem with documentation. labels Nov 3, 2020
@RomainMuller RomainMuller requested a review from a team November 3, 2020 15:39
@RomainMuller RomainMuller self-assigned this Nov 3, 2020
@gitpod-io
Copy link

gitpod-io bot commented Nov 3, 2020

packages/@aws-cdk/aws-iam/README.md Show resolved Hide resolved
packages/@aws-cdk/aws-iam/README.md Show resolved Hide resolved
packages/@aws-cdk/aws-iam/package.json Outdated Show resolved Hide resolved
packages/@aws-cdk/core/README.md Show resolved Hide resolved
packages/@aws-cdk/core/README.md Show resolved Hide resolved
tools/cdk-build-tools/lib/compile.ts Outdated Show resolved Hide resolved
Add support in `cdk-build` to actually run `jsii-rosetta --compile --fail`
in packages that declare supporting "strict" mode for `jsii-rosetta`.
This enables a "quick" feedback loop for detercting "now-invalid" code
examples.

Turned on this feature on `@aws-cdk/core` and made the necessary
adjustements to fixtures and examples so that they now compile.
@RomainMuller RomainMuller force-pushed the rmuller/rosetta-strict branch from 693a08f to 9b9e1d9 Compare November 25, 2020 15:47
@RomainMuller
Copy link
Contributor Author

(Sorry I had to force-push to remove an un-tangled commit that I separated out to a different PR)

@RomainMuller RomainMuller marked this pull request as ready for review November 25, 2020 15:48
@RomainMuller RomainMuller requested a review from rix0rrr November 25, 2020 15:48
@github-actions github-actions bot added the @aws-cdk/core Related to core CDK functionality label Nov 25, 2020
@mergify
Copy link
Contributor

mergify bot commented Nov 30, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 234e0b6
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Nov 30, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 5bf5ecc into master Nov 30, 2020
@mergify mergify bot deleted the rmuller/rosetta-strict branch November 30, 2020 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/core Related to core CDK functionality contribution/core This is a PR that came from AWS. docs/inline Related to inline documentation of the API Reference documentation This is a problem with documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[aws-iam] readme typos
3 participants