Skip to content

The gen_protocol_ml*.js scripts die with assertion failures #2

@richardlford

Description

@richardlford

Using the latest protocol file referenced in the top-level dune file:

https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/gh-pages/debugAdapterProtocol.json

The gen_protocol_ml*.js scripts die with assertion failures. I have partially debugged the failures and one source of the problem new

		"StartDebuggingRequestArguments": {
			"type": "object",
			"description": "Arguments for `startDebugging` request.",
			"properties": {
				"configuration": {
					"type": "object",
					"additionalProperties": true,
					"description": "Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables')."
				},
				"request": {
					"type": "string",
					"enum": [
						"launch",
						"attach"
					],
					"description": "Indicates whether the new debug session should be started with a `launch` or `attach` request."
				}
			},
			"required": [
				"configuration",
				"request"
			]
		},

which contains a

					"additionalProperties": true,

The current code does not expect additionalProperties to have a boolean value, though that is allowed by the JSON Scheme spec.

There may be additional reasons for failures but that is the only cause I've identified so far.

The assertion failure is on line 190 of gen_protocol_ml.js or line 195 of gen_protocol_mli.js.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions