Skip to content

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

@maorleger

Description

@maorleger

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/[email protected]/node_modules/xmlbuilder/lib/XMLElement.js:4:195)
    at /home/mleger/workspace/worktrees/keyvault-admin-core-v2/common/temp/node_modules/.pnpm/[email protected]/node_modules/xmlbuilder/lib/XMLElement.js:18:5
    at /home/mleger/workspace/worktrees/keyvault-admin-core-v2/common/temp/node_modules/.pnpm/[email protected]/node_modules/xmlbuilder/lib/XMLElement.js:296:4
    at /home/mleger/workspace/worktrees/keyvault-admin-core-v2/common/temp/node_modules/.pnpm/[email protected]/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/[email protected] /home/mleger/workspace/worktrees/keyvault-admin-core-v2/sdk/keyvault/keyvault-admin
└─┬ @azure/[email protected] -> /home/mleger/workspace/worktrees/keyvault-admin-core-v2/sdk/core/core-lro
  └─┬ @azure/[email protected]
    └─┬ [email protected]
      └── 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?

Metadata

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