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

[BUG] Projects which set licensed to false emitting Apache 2.0 #736

Closed
zsstiers opened this issue Mar 25, 2024 · 0 comments · Fixed by #737
Closed

[BUG] Projects which set licensed to false emitting Apache 2.0 #736

zsstiers opened this issue Mar 25, 2024 · 0 comments · Fixed by #737
Labels
bug Something isn't working needs-triage

Comments

@zsstiers
Copy link
Contributor

zsstiers commented Mar 25, 2024

Describe the bug

When upgrading to the latest version of PDK unexpected license files have appeared.

Expected Behavior

No license to be generated when a subproject sets licensed: false.

Current Behavior

Many LICENSE files have been generated even though their projects set licensed: false.

Reproduction Steps

import { javascript } from "projen";
import { monorepo } from "@aws/pdk";
import { NodeProject } from "projen/lib/javascript";

const project = new monorepo.MonorepoTsProject({
  devDeps: ["@aws/pdk"],
  name: "example",
  packageManager: javascript.NodePackageManager.PNPM,
  projenrcTs: true,
});

new NodeProject({
  parent: project,
  name: "nolicense",
  outdir: "packages/nolicense",
  defaultReleaseBranch: "main",
  licensed: false,
  packageManager: javascript.NodePackageManager.PNPM,
});

project.synth();

produces packages/nolicense/LICENSE as an Apache 2.0 license even though it specifically set licensed to false.

Possible Solution

Sadly I don't see a clear path to easily support this because the licensed property is not made available anywhere. Maybe just a way to opt-out of the _addLicenses feature entirely?

Additional Information/Context

No response

PDK version used

0.23.19

What languages are you seeing this issue on?

Typescript

Environment details (OS name and version, etc.)

Amazon AL2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant