Skip to content
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

Setting jsonnet-library-search-directories does not work #32

Open
ameyp opened this issue Dec 14, 2022 · 2 comments
Open

Setting jsonnet-library-search-directories does not work #32

ameyp opened this issue Dec 14, 2022 · 2 comments

Comments

@ameyp
Copy link

ameyp commented Dec 14, 2022

After installing a library using jsonnet-bundler, I have tried:

  1. Setting the variable to the relative path to vendor
  2. Setting the variable to the absolute path to vendor
  3. Setting the variable to a list containing the relative path to vendor
  4. Setting the variable to a list containing the absolute path to vendor

None of the four worked, I still get an error on the import line saying couldn't open import ....

If I run jsonnet path/to/my.jsonnet -J path/to/vendor, that succeeds.

@tminor
Copy link
Owner

tminor commented Dec 14, 2022

I think I'm able to reproduce this with jsonnet-eval-buffer (I have a test written that seems to, in any case), however your description isn't enough to reproduce the exact issue you're describing. Some information that would help: Emacs version, what command you're running (or minor mode if it's something like flycheck), minimal example to reproduce the exact issue you're reporting, etc.

@ameyp
Copy link
Author

ameyp commented Dec 15, 2022

Emacs version: GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.16.0)
Modes: projectile-mode and flycheck-mode

I'm setting the variable in my .dir-locals.el at the project (git) root with:

(setq jsonnet-library-search-directories (list (concat (projectile-project-root) "vendor")))

As mentioned in the issue description, I've also tried setting it to just the path (aka without the list call) and to a relative path.

Minimal example: https://github.com/ameyp/jsonnet-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants