-
-
Notifications
You must be signed in to change notification settings - Fork 253
Closed as not planned
Labels
questionFurther information is requestedFurther information is requestedwontfixThis will not be worked onThis will not be worked on
Description
Please read the FAQ for the bug you encountered.
- I have read the existing FAQ
β― Playground Link
not applicable
π» Code
I am on Windows trying to register the custom dart
language from https://www.npmjs.com/package/@ast-grep/lang-dart and use it with the cli tool.
> md D:\ast-grep
> cd D:\ast-grep
> npm install --silent @ast-grep/lang-dart
> dir "node_modules\@ast-grep\lang-dart\prebuilds\prebuild-Windows-X64\
Volume in drive D is Windows
Volume Serial Number is 0DC3-13DD
Directory of D:\ast-grep\node_modules\@ast-grep\lang-dart\prebuilds\prebuild-Windows-X64\parser.so
07.08.2025 16:17 766.976 parser.so
1 File(s) 766.976 bytes
0 Dir(s) 183.259.955.200 bytes free
D:\ast-grep\sgconfig.yaml:
ruleDirs: []
customLanguages:
dart:
libraryPath: "D:\\ast-grep\\node_modules\\@ast-grep\\lang-dart\\prebuilds\\prebuild-Windows-X64\\parser.so"
extensions: [dart]
> set AST_GREP_CONFIG=D:\ast-grep-dart\sgconfig.yml
> echo class Foo { } | sg.exe run -l dart -p "class $NAME { }" -
error: invalid value 'dart' for '--lang <LANG>': dart is not supported!
For more information, try '--help'.
π Actual behavior
sg.exe ignores the registered custom dart language and fails with error: invalid value 'dart' for '--lang <LANG>': dart is not supported!
π Expected behavior
sg.exe picks up the config from sgconfig.yml and registers the configured dart customLanguage and allows me to use it.
Additional information about the issue
It would be extremely helpful if sg had a command display it's effective config or a verbose mode where one can see if any config files are loaded and applied.
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requestedwontfixThis will not be worked onThis will not be worked on