Skip to content

[core] core-lro depends on core-http #15880

Closed

Description

Discovered when moving Azure Key Vault to core V2. Looks like core-lro still takes a dependency on core-http

Error when building after removing core-http:

TypeError: Cannot read property 'prototype' of undefined
    at extend (/home/mleger/workspace/worktrees/keyvault-admin-core-v2/common/temp/node_modules/.pnpm/xmlbuilder@11.0.1/node_modules/xmlbuilder/lib/XMLElement.js:4:195)
    at /home/mleger/workspace/worktrees/keyvault-admin-core-v2/common/temp/node_modules/.pnpm/xmlbuilder@11.0.1/node_modules/xmlbuilder/lib/XMLElement.js:18:5
    at /home/mleger/workspace/worktrees/keyvault-admin-core-v2/common/temp/node_modules/.pnpm/xmlbuilder@11.0.1/node_modules/xmlbuilder/lib/XMLElement.js:296:4
    at /home/mleger/workspace/worktrees/keyvault-admin-core-v2/common/temp/node_modules/.pnpm/xmlbuilder@11.0.1/node_modules/xmlbuilder/lib/XMLElement.js:298:4
    at createCommonjsModule (/home/mleger/workspace/worktrees/keyvault-admin-core-v2/sdk/keyvault/keyvault-admin/dist-test/index.node.js:68:35)
    at Object.<anonymous> (/home/mleger/workspace/worktrees/keyvault-admin-core-v2/sdk/keyvault/keyvault-admin/dist-test/index.node.js:29765:18)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)

Looking up who is asking for xmlbuilder:

keyvault-admin keyvault-admin-core-v2 % npm ls xmlbuilder
@azure/keyvault-admin@4.1.0-beta.1 /home/mleger/workspace/worktrees/keyvault-admin-core-v2/sdk/keyvault/keyvault-admin
└─┬ @azure/core-lro@1.0.6 -> /home/mleger/workspace/worktrees/keyvault-admin-core-v2/sdk/core/core-lro
  └─┬ @azure/core-http@1.2.7
    └─┬ xml2js@0.4.23
      └── UNMET DEPENDENCY xmlbuilder@~11.0.0

Finally, Looking at core-lro it includes core-http in dependencies.

Looking at the codebase it looks like none of the product code actually needs core-http, but it is used in tests.

Anyway, I think we should remove the core-http dependency from core-lro or at least move it to devDependencies?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Azure.CoreClientThis issue points to a problem in the data-plane of the library.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions