editorconfig / editorconfig-core-js

EditorConfig Core library and command line utility written in JavaScript
http://editorconfig.org
MIT License
273 stars 48 forks source link

Use of wasm (via one-ini) causes failures on some systems #128

Open Colengms opened 1 week ago

Colengms commented 1 week ago

We'd like to be able to use the editorconfig module in the C/C++ Extension for VS Code. However, it's inclusion currently results in the following issue for some of our users: https://github.com/microsoft/vscode-cpptools/issues/12529

The issue would appear to be related to inclusion of wasm, which is pulled in by one-ini, which is used by editorconfig. The issue is fully resolved if we omit the editorconfig module from our project.

However, it's trickly to replicate the behavior, particularly glob matching against section patterns. Would it be possible to avoid the dependency on one-ini and wasm? Or, alternatively, could someone point me to (TypeScript) code I might use to match section patterns? (The tricky part seems to be the numeric ranges).

hildjj commented 1 week ago

We had a whole discussion about one-ini and the wasm therein and made an explicit decision to go that way. Let's see if we can fix one-ini's WASM, which is likely broken in several ways since I'm not at all a WASM or Rust expert.

I've opened an issue there, and will follow up here with releases as we try to find this.

hildjj commented 1 week ago

I'm working on a patch to this project with @one-ini/wasm v0.1.2. It's going to take a while because there are a bunch of new tests that fail in editorconfig-core-test.