Skip to content

[BUG]: single-line comment fails in VS Code June release #10

@yCodeTech

Description

@yCodeTech

Describe the bug
Extension fails when using single-line comments due to this VS Code PR microsoft/vscode#243283 which was merged and released in the June's release (version 1.102). The PR changes the lineComment config to accept an object as well as a string. This breaks the code that relies on lineComment being a string and uses the String.prototype.includes() method.

https://github.com/yCodeTech/auto-comment-blocks/blob/master/src/configuration.ts#L530-L532

Error in Extension Host Output:

 Activating extension ycodetech.automatic-comment-blocks failed due to an error:
2025-07-11 00:40:41.749 [error] TypeError: config.comments.lineComment.includes is not a function
	at c:\Users\Stuart\.vscode\extensions\ycodetech.automatic-comment-blocks-1.1.8\out\src\configuration.js:464:54
	at Map.forEach (<anonymous>)
	at Configuration.setSingleLineCommentLanguageDefinitions (c:\Users\Stuart\.vscode\extensions\ycodetech.automatic-comment-blocks-1.1.8\out\src\configuration.js:449:30)
	at new Configuration (c:\Users\Stuart\.vscode\extensions\ycodetech.automatic-comment-blocks-1.1.8\out\src\configuration.js:70:14)
	at Object.<anonymous> (c:\Users\Stuart\.vscode\extensions\ycodetech.automatic-comment-blocks-1.1.8\out\src\extension.js:10:21)
	at Module._compile (node:internal/modules/cjs/loader:1738:14)
	at Module._extensions..js (node:internal/modules/cjs/loader:1904:10)
	at Module.load (node:internal/modules/cjs/loader:1472:32)
	at Module._load (node:internal/modules/cjs/loader:1289:12)
	at c._load (node:electron/js2c/node_init:2:17950)
	at e._load (file:///c:/Users/Stuart/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:356:5519)
	at t._load (file:///c:/Users/Stuart/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:174:22697)
	at r._load (file:///c:/Users/Stuart/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:166:25633)
	at TracingChannel.traceSync (node:diagnostics_channel:322:14)
	at wrapModuleLoad (node:internal/modules/cjs/loader:242:24)
	at Module.require (node:internal/modules/cjs/loader:1494:12)
	at require (node:internal/modules/helpers:135:16)
	at KG.Cb (file:///c:/Users/Stuart/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:205:1253)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions