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

Emit warnings when using foreign reserved words #701

Closed
3 of 6 tasks
RomainMuller opened this issue Aug 13, 2019 · 0 comments · Fixed by #704
Closed
3 of 6 tasks

Emit warnings when using foreign reserved words #701

RomainMuller opened this issue Aug 13, 2019 · 0 comments · Fixed by #704
Labels
feature-request A feature should be added or improved. language/javascript Related to Javascript bindings module/jsii Issues affecting the `jsii` module.

Comments

@RomainMuller
Copy link
Contributor

🚀 Feature Request

Affected Languages

  • TypeScript or Javascript
  • Python
  • Java
  • .NET (C#, F#, ...)

General Information

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Description

The jsii compiler should emit warnings upon encountering declarations that
are named after reserved words of target languages. This will encourage
developers not to use those as identifiers.

@RomainMuller RomainMuller added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. module/jsii Issues affecting the `jsii` module. language/javascript Related to Javascript bindings and removed needs-triage This issue or PR still needs to be triaged. labels Aug 13, 2019
RomainMuller added a commit that referenced this issue Aug 13, 2019
Emits warnings when an exported API is named after a reserved word in
any of the supported target languages (best-effort). This warns users
that their code may have toruble compiling for certain target languages
and invites them to use a different name.

Additionally, a `--fail-on-warnings` / `--Werr` option was added to the
CLI that allows treating warnings as errors, allowing users to create
and maintain a codebase that does not rely on naming things in ways that
will cause conflicts in target languages.

Fixes #701
@mergify mergify bot closed this as completed in #704 Aug 15, 2019
mergify bot pushed a commit that referenced this issue Aug 15, 2019
* feat(jsii): emit warnings when using reserved words

Emits warnings when an exported API is named after a reserved word in
any of the supported target languages (best-effort). This warns users
that their code may have toruble compiling for certain target languages
and invites them to use a different name.

Additionally, a `--fail-on-warnings` / `--Werr` option was added to the
CLI that allows treating warnings as errors, allowing users to create
and maintain a codebase that does not rely on naming things in ways that
will cause conflicts in target languages.

Fixes #701

* also prohibit using 'build'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. language/javascript Related to Javascript bindings module/jsii Issues affecting the `jsii` module.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant