aws / jsii

jsii allows code in any language to naturally interact with JavaScript classes. It is the technology that enables the AWS Cloud Development Kit to deliver polyglot libraries from a single codebase!
https://aws.github.io/jsii
Apache License 2.0
2.66k stars 247 forks source link

xmldom fatalError #4645

Open scottschreckengaust opened 2 months ago

scottschreckengaust commented 2 months ago

Describe the bug

During a dotnet target build, the message:

[xmldom fatalError] Opening and ending tag mismatch: "function" != "jsii-root" @#[line:1,col:22]

repeats itself three times.

This doesn't seem to be a fatal error, but the message is declaring something is wrong with parsing a document

Expected Behavior

No fatal error or warning messages, or location of the error.

Current Behavior

On building the dotnet target, there are messages, even sending --verbose --verbose --verbose has no more information on the messages.

Reproduction Steps

I've tried to make an SSCCE, but cannot reproduce, however this repository reproduces the issue. I've run npx jsii-pacmak --verbose --verbose --verbose --no-clean --target dotnet and searched for missing XML tags and jsii-root without results.

prerequisites: git, node, and yarn

  1. git clone https://github.com/awslabs/generative-ai-cdk-constructs.git
  2. cd generative-ai-cdk-constructs.git
  3. npx projen install
  4. npx projen
  5. npx projen compile
  6. npx projen package:dotnet
👾 package:dotnet | jsii-pacmak -v --target dotnet
[jsii-pacmak] [INFO] Found 1 modules to package
[jsii-pacmak] [INFO] Packaging NPM bundles
[jsii-pacmak] [INFO] Loading jsii assemblies and translations
[jsii-pacmak] [INFO] Packaging 'dotnet' for @cdklabs/generative-ai-cdk-constructs
[xmldom fatalError] Opening and ending tag mismatch: "function" != "jsii-root"
@#[line:1,col:22]
[xmldom fatalError] Opening and ending tag mismatch: "function" != "jsii-root"
@#[line:1,col:22]
[xmldom fatalError] Opening and ending tag mismatch: "function" != "jsii-root"
@#[line:1,col:22]
[jsii-pacmak] [INFO] dotnet finished
[jsii-pacmak] [INFO] Packaged. dotnet (2.6s) | npm pack (1.3s) | load jsii (0.7s) | cleanup (???)

Possible Solution

Searching for jsii-root or function revealed nothing...

Found the https://github.com/aws/jsii-rosetta/ project through https://github.com/search?q=jsii-root&type=code, which pointed to the sax parser within the @xmldom/xmldom matching the fatal message.

Additional Information/Context

I believe some HTML document causing this, but cannot find where that might be:

jsii-rosettta: https://github.com/aws/jsii-rosetta/blob/22f6add087c99fc9626cc953ab7335c196979460/src/markdown/xml-comment-renderer.ts#L79

@xmldom/xmldom: https://github.com/xmldom/xmldom/blob/8d576bee7d2121d62f78db1d3b064adfe42a0a0e/lib/sax.js#L168

SDK version used

jsii-pacmak --version 1.103.1 (build bef2dea) dotnet --version 9.0.100-rc.1.24452.12

Environment details (OS name and version, etc.)

macOS

scottschreckengaust commented 1 month ago

An increase in the number of issues:

👾 build » package » package-all » package:dotnet | jsii-pacmak -v --target dotnet
[jsii-pacmak] [INFO] Found 1 modules to package
[jsii-pacmak] [INFO] Packaging NPM bundles
[jsii-pacmak] [INFO] Loading jsii assemblies and translations
[jsii-pacmak] [INFO] Packaging 'dotnet' for @cdklabs/generative-ai-cdk-constructs
[xmldom fatalError]     Opening and ending tag mismatch: "details" != "jsii-root" 
@#[line:2,col:13]
[xmldom fatalError]     Opening and ending tag mismatch: "jsii-root" != "details" 
@#[line:1,col:1]
[xmldom fatalError]     Opening and ending tag mismatch: "jsii-root" != "details" 
@#[line:1,col:1]
[xmldom fatalError]     Opening and ending tag mismatch: "jsii-root" != "details" 
@#[line:1,col:1]
[xmldom fatalError]     Opening and ending tag mismatch: "jsii-root" != "details" 
@#[line:1,col:1]
[xmldom fatalError]     Opening and ending tag mismatch: "jsii-root" != "details" 
@#[line:1,col:1]
[xmldom fatalError]     Opening and ending tag mismatch: "function" != "jsii-root" 
@#[line:1,col:22]
[xmldom fatalError]     Opening and ending tag mismatch: "function" != "jsii-root" 
@#[line:1,col:22]
[xmldom fatalError]     Opening and ending tag mismatch: "function" != "jsii-root" 
@#[line:1,col:22]
[jsii-pacmak] [INFO] dotnet finished
[jsii-pacmak] [INFO] Packaged. dotnet (6.8s) | npm pack (5.5s) | load jsii (0.6s) | cleanup (0.0s)
scottschreckengaust commented 1 month ago

Keeping it alive.