Since installing the openHAB VS Code extension 1.0.2 I see three separate
failures. All three disappear after downgrading to 1.0.0 and reappear after
upgrading again, so they look like one bundling problem in the 1.0.2 build
rather than three unrelated bugs.
Environment
- openHAB 5.2.0 (official Docker image), conf/ reached from VS Code over a
UNC path (\…\openhab5.2.0\conf) - VS Code on Windows
- openHAB VS Code extension 1.0.2 (upgraded from 1.0.0 to get hover on .js files)
-
“Add all items to file” fails for every Thing
Error running command openhab.command.things.addItems: c is not a
constructor. This is likely caused by the extension that contributes
openhab.command.things.addItems.
Reproduce: Things view → any Thing → add ALL items of that Thing to a
file. Fails for every Thing, regardless of binding.
Adding a SINGLE item/channel still works normally. So only the bulk path
is broken, not item creation as such. -
Language server TypeErrors on every openHAB file
Editing any openHAB file (.items, .things, .rules, .sitemap) throws on
textDocument/didOpen and textDocument/didChange. Adding a single space is
enough to trigger it. Editing a .js file does not trigger it. -
File watcher errors on the UNC path
ERR_NETWORK_IO_SUSPENDED / “UNC host not allowed” while watching conf/. -
Deprecation notice
VS Code emits a deprecation notice for this extension on 1.0.2
(reproducible with Code --trace-deprecation). It is absent on 1.0.0.
What I verified
- 1.0.2: all four present.
- 1.0.0: all four gone, including the addItems command, which works normally.
“c is not a constructor” on a minified identifier suggests a dependency that is no longer a constructor after bundling. That the single-item path still works while the bulk path throws would fit a class that is only instantiated when iterating over a Thing’s channels. The deprecation notice appearing in the same version may point at that same dependency.
Note on impact: I upgraded to 1.0.2 specifically for item hover in .js files.
Staying on 1.0.0 to avoid these four issues means giving that up, so right now
there is no version that offers both.
Happy to supply full stack traces or test a build.