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

fix(pacmak): remove disclaimer on compiling examples #3148

Merged
merged 3 commits into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ import {
} from 'jsii-rosetta';
import * as xmlbuilder from 'xmlbuilder';

import {
INCOMPLETE_DISCLAIMER_COMPILING,
INCOMPLETE_DISCLAIMER_NONCOMPILING,
} from '..';
import { INCOMPLETE_DISCLAIMER_NONCOMPILING } from '..';
import { renderSummary } from '../_utils';
import { DotNetNameUtils } from './nameutils';

Expand Down Expand Up @@ -188,9 +185,6 @@ export class DotNetDocGenerator {
}

private prefixDisclaimer(translated: Translation) {
if (translated.didCompile && INCOMPLETE_DISCLAIMER_COMPILING) {
return `// ${INCOMPLETE_DISCLAIMER_COMPILING}\n${translated.source}`;
}
if (!translated.didCompile && INCOMPLETE_DISCLAIMER_NONCOMPILING) {
return `// ${INCOMPLETE_DISCLAIMER_NONCOMPILING}\n${translated.source}`;
}
Expand Down
4 changes: 1 addition & 3 deletions packages/jsii-pacmak/lib/targets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,5 @@ export const ALL_BUILDERS: { [key in TargetName]: BuilderFactory } = {
new IndependentPackageBuilder(TargetName.PYTHON, Python, ms, o),
};

export const INCOMPLETE_DISCLAIMER_COMPILING =
'Example automatically generated. See https://github.com/aws/jsii/issues/826';
export const INCOMPLETE_DISCLAIMER_NONCOMPILING =
'Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826';
'Example automatically generated from non-compiling source. May contain errors.';
9 changes: 1 addition & 8 deletions packages/jsii-pacmak/lib/targets/java.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ import { VERSION, VERSION_DESC } from '../version';
import { stabilityPrefixFor, renderSummary } from './_utils';
import { toMavenVersionRange, toReleaseVersion } from './version-utils';

import {
INCOMPLETE_DISCLAIMER_COMPILING,
INCOMPLETE_DISCLAIMER_NONCOMPILING,
TargetName,
} from '.';
import { INCOMPLETE_DISCLAIMER_NONCOMPILING, TargetName } from '.';

// eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-require-imports
const spdxLicenseList = require('spdx-license-list');
Expand Down Expand Up @@ -3013,9 +3009,6 @@ class JavaGenerator extends Generator {
}

private prefixDisclaimer(translated: Translation) {
if (translated.didCompile && INCOMPLETE_DISCLAIMER_COMPILING) {
return `// ${INCOMPLETE_DISCLAIMER_COMPILING}\n${translated.source}`;
}
if (!translated.didCompile && INCOMPLETE_DISCLAIMER_NONCOMPILING) {
return `// ${INCOMPLETE_DISCLAIMER_NONCOMPILING}\n${translated.source}`;
}
Expand Down
9 changes: 1 addition & 8 deletions packages/jsii-pacmak/lib/targets/python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ import {
import { die, toPythonIdentifier } from './python/util';
import { toPythonVersionRange, toReleaseVersion } from './version-utils';

import {
INCOMPLETE_DISCLAIMER_COMPILING,
INCOMPLETE_DISCLAIMER_NONCOMPILING,
TargetName,
} from '.';
import { INCOMPLETE_DISCLAIMER_NONCOMPILING, TargetName } from '.';

// eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-require-imports
const spdxLicenseList = require('spdx-license-list');
Expand Down Expand Up @@ -2400,9 +2396,6 @@ class PythonGenerator extends Generator {
}

private prefixDisclaimer(translated: Translation) {
if (translated.didCompile && INCOMPLETE_DISCLAIMER_COMPILING) {
return `# ${INCOMPLETE_DISCLAIMER_COMPILING}\n${translated.source}`;
}
if (!translated.didCompile && INCOMPLETE_DISCLAIMER_NONCOMPILING) {
return `# ${INCOMPLETE_DISCLAIMER_NONCOMPILING}\n${translated.source}`;
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.