-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pipeline fails to load tree-sitter grammar. Is there a way to debug? #168
Comments
I haven't tried dynamically loading treesitter grammars so I'm not familiar with what Emacs is trying to do under the hood. Might you need to add |
@purcell I've tried to change the path, used treesit-additional-load-path, I tried to put grammar directly and nothing works. I tried to run I have downloaded nix as a VM image and will try to debug it this way. Not sure if it's correct approach. |
Yes, Nix on your machine is fine, no NixOS VM necessary. I don't have much advice on how to debug this, sorry. Note that in general, mixing non-Nix-built .so files with binaries that come with Nix is likely to result in mismatches — it could well be the case that the library is found but can't be loaded. Perhaps the .so links against the tree-sitter shared library, which is probably not visible on the load path within the Emacs process. |
I got it working with the version from https://github.com/alexmurray/emacs-snap/tree/emacs-29 . |
FYI, Nixpkgs on the latest master now contains support for adding tree-sitter grammars without rebuilding the entire Emacs (see NixOS/nixpkgs#230751). You could use the following let
emacsCI = (pkgs.emacs.pkgs.overrideScope'
(_: _: {
emacs = emacs-ci.emacs-snapshot.overrideAttrs (_: {
treeSitter = true;
});
}))
.withPackages (epkgs: [
(epkgs.treesit-grammars.with-grammars (grammars: [grammars.tree-sitter-php]))
]);
in
pkgs.mkShell {
buildInputs = [
emacsCI
];
} This doesn't work right now due to an integration issue with |
I have created emacs-php/php-ts-mode#20 as an example of custom Emacs build with tree-sitter grammars. It works locally, but CI seems to fail without binary cache (operation cancelled). |
Great. Thanks @akirak 🙏 |
Also thanks to @DamienCassou who has invented the mechanism of |
Hi. First of all I would like to thank you for all the time you put into open source overall.
I have an issue with setting up a CI pipeline for emacs with
treesitter
forphp-ts-mode
.I have tried multiple ways of installing grammar itself and nothing works.
The same script works for me with my local build of emacs 29 but doesn't seem to work as expected in the pipeline.
I have a minimal example to reproduce an issue:
It generates:
You can see it here in
Run tests
https://github.com/piotrkwiecinski/php-ts-mode/actions/runs/5099871411/jobs/9167833683I have installed https://github.com/nektos/act to debug GH action locally and I'm able to reproduce an issue in the local container that I can access.
I tried running gdb on the container but there is no symbol table.
I assume I would have to get a nix VM to have a better control.
Any pointers were to go from here?
Is there a way to add debug symbols on top of what's currently compiled for CI containers?
Edit: I tested
elixir-ts-mode
withact
locally and it runs correctly and I was their CI work as expected.The text was updated successfully, but these errors were encountered: