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

jsii assemblies contain redundant dependency information #453

Closed
rix0rrr opened this issue Apr 12, 2019 · 0 comments · Fixed by #454
Closed

jsii assemblies contain redundant dependency information #453

rix0rrr opened this issue Apr 12, 2019 · 0 comments · Fixed by #454

Comments

@rix0rrr
Copy link
Contributor

rix0rrr commented Apr 12, 2019

Looking at the start of the dependency section of the @aws-cdk/app-delivery assembly, it looks like this:

  "dependencies": {
    "@aws-cdk/aws-cloudformation": {
      "dependencies": {
        "@aws-cdk/aws-iam": {
          "dependencies": {
            "@aws-cdk/cdk": {
              "dependencies": {
                "@aws-cdk/cx-api": {
                  "peer": true,
                  "targets": {
                    "dotnet": {
                      "assemblyOriginatorKeyFile": "../../key.snk",
                      "namespace": "Amazon.CDK.CXAPI",
                      "packageId": "Amazon.CDK.CXAPI",
                      "signAssembly": true
                    },
                    "java": {
                      "maven": {
                        "artifactId": "cdk-cx-api",
                        "groupId": "software.amazon.awscdk"
                      },
                      "package": "software.amazon.awscdk.cxapi"
                    },
                    "js": {
                      "npm": "@aws-cdk/cx-api"
                    },
                    "python": {
                      "distName": "aws-cdk.cx-api",
                      "module": "aws_cdk.cx_api"
                    }
                  },
                  "version": "0.28.0"
                }
              },
              "peer": true,
              "targets": {
                "dotnet": {
                  "assemblyOriginatorKeyFile": "../../key.snk",
                  "namespace": "Amazon.CDK",
                  "packageId": "Amazon.CDK",
                  "signAssembly": true
  • Why does it contain transitive dependencies?
  • Why do the dependencies have information on the targets and their build instructions (../../key.snk???) in there?

For funzies... in a package with highly complex dependencies such as @aws-cdk/app-delivery, removing the dependencies node from the assembly reduces the file size from

8.2 MB

to

18 kB (!!!!)
rix0rrr added a commit that referenced this issue Apr 15, 2019
Stop deeply nesting dependency packages and their dependencies. All
dependencies are now flattened to a single transitive dependency
closure. This will save a lot of space and processing power in
processing the assembly.

Make jsii-reflect validate the schema (including the version). It wasn't doing that before!!

Fixes #453.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant