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

Ability to silence JSII warnings selectively #1073

Closed
1 of 4 tasks
RomainMuller opened this issue Nov 27, 2019 · 1 comment
Closed
1 of 4 tasks

Ability to silence JSII warnings selectively #1073

RomainMuller opened this issue Nov 27, 2019 · 1 comment
Labels
closed-for-staleness effort/medium Medium work item – a couple days of effort feature-request A feature should be added or improved. language/typescript Related to Typescript code module/compiler Issues affecting the JSII compiler module/tools Issues related to the JSII toolkit p1

Comments

@RomainMuller
Copy link
Contributor

🚀 Feature Request

Affected Languages

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

Proposed Solution

The jsii compilation emits warnings when language keywords are used for identifiers in TypeScript code, as this may result in sub-par code being generated in other languages. In certain cases, those warnings were introduced after the APIs were declared stable, so they cannot be addressed anymore without incurring an undesirable major version change.

The proposal is to allow user code to silence the warning on select offenses, noting that they have intentionally decided to leave it this way.

@RomainMuller RomainMuller added the feature-request A feature should be added or improved. label Nov 27, 2019
eladb pushed a commit that referenced this issue Nov 27, 2019
By default, jsii issues a warning when it encounters a symbol that uses a word that is reserved in one of the supported languages. Practically this creates a tremendous amount of noise for large existing projects.

#1073 proposes to add support for a warning exclusion file, which is probably a better long term solution, but in the meantime, this switch allows opting-out of reserved words warnings in order to save the planet.

Tested by adding `--disable-reserved-words-warnings` to `jsii-calc` (which uses many reserved words already).
mergify bot pushed a commit that referenced this issue Dec 18, 2019
* feat(jsii): switch to disable reserved words warnings

By default, jsii issues a warning when it encounters a symbol that uses a word that is reserved in one of the supported languages. Practically this creates a tremendous amount of noise for large existing projects.

#1073 proposes to add support for a warning exclusion file, which is probably a better long term solution, but in the meantime, this switch allows opting-out of reserved words warnings in order to save the planet.

Tested by adding `--disable-reserved-words-warnings` to `jsii-calc` (which uses many reserved words already).

* change boolean switch to --silence-warnings array

* Update jsii.ts

* Update packages/jsii/lib/warnings.ts

Co-Authored-By: Romain Marcadier-Muller <rmuller@amazon.com>

* Update jsii.ts

* Update warnings.ts
@SomayaB SomayaB added language/javascript Related to Javascript bindings module/compiler Issues affecting the JSII compiler module/tools Issues related to the JSII toolkit labels Jan 7, 2020
@SomayaB SomayaB added language/typescript Related to Typescript code and removed language/javascript Related to Javascript bindings labels Jan 7, 2020
@MrArnoldPalmer MrArnoldPalmer added the effort/medium Medium work item – a couple days of effort label Feb 12, 2020
@MrArnoldPalmer MrArnoldPalmer removed their assignment Jun 28, 2021
@github-actions
Copy link
Contributor

This issue has not received any attention in 2 years. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jun 29, 2023
@github-actions github-actions bot closed this as completed Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness effort/medium Medium work item – a couple days of effort feature-request A feature should be added or improved. language/typescript Related to Typescript code module/compiler Issues affecting the JSII compiler module/tools Issues related to the JSII toolkit p1
Projects
None yet
Development

No branches or pull requests

3 participants