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

direnv: error: attribute 'lorri-eval-patched' missing, at (string):1:2 #7

Closed
vroad opened this issue Sep 6, 2021 · 6 comments
Closed

Comments

@vroad
Copy link

vroad commented Sep 6, 2021

Stopped working after updating direnv-nix-lorelei to ba5f664 on my mac. Last version that worked on my machine is f81a6e7

I deleted my own home-manager module in my home-manager config repo and switched to the one created by you, but I guess this change is not relevant to the issue.

#4

direnv: loading ~/my-app/.envrc
direnv: initializing cache
direnv: rebuilding with Nix
direnv: error: attribute 'lorri-eval-patched' missing, at (string):1:2
direnv: ERROR: Nix build failed

I looked into generated shell scripts to see what's happening, and found the lines possibly caused build failure.
lorri-eval-patched no longer exists in current version of the package. (confirmed with auto completion of nix repl)

local auto_watch_eval=patched

--expr "((import ${buildSource} {}).lorri-eval-$auto_watch_eval)"

--expr "((import /nix/store/ra2fzvpx1il2qyx5lcxgwx5xw0l6lnn2-source {}).lorri-eval-$auto_watch_eval)"
nix-repl> lorelei = ((import /nix/store/ra2fzvpx1il2qyx5lcxgwx5xw0l6lnn2-source {}))

nix-repl> lorelei.
lorelei.distribution  lorelei.nix-project   lorelei.nixpkgs

Previous version did have lorri-eval-patched.

lorri-eval-patched

@shajra
Copy link
Owner

shajra commented Sep 6, 2021

Shoot. I was making changes to the build that shouldn't have affected the script. I got a false confidence, and didn't test everything correctly, evidently.

I think this is an easy fix, I'll try to do it today.

@shajra
Copy link
Owner

shajra commented Sep 6, 2021

As expected, this is on Linux as well as Mac. My testing missed this, sorry. As least it's reproduced. Working on it now.

@shajra shajra closed this as completed in f8d21cb Sep 6, 2021
@shajra
Copy link
Owner

shajra commented Sep 6, 2021

@vroad the GitHub comment auto-closed this. I tested it out on my end, so I didn't feel as badly pushing it out to the main branch. But please comment back that the fix is working on your end as well.

@shajra
Copy link
Owner

shajra commented Sep 6, 2021

@vroad Hey, I'll also be interested if the Home Manager module is working for you, because that's new code.

@shajra
Copy link
Owner

shajra commented Sep 6, 2021

Man... there were multiple things errant with my manual testing. I always believe in testing, but for personal projects, I sometimes leave manual testing as an option, because the work to automate testing completely isn't always worth it. I have these supporting scripts, but they require too many assumptions that are easily broken.

I think I'm overthinking the complexity of testing this. I have a feeling it's pretty easy to test in a Nix expression. That will be a controlled environment.

@vroad
Copy link
Author

vroad commented Sep 8, 2021

Thank you, home manager module from this repo is now working.

For testing, Something that ensures core functionality of lorelei is not broken at least might still be useful. Testing all combination of arguments is often difficult to achieve.

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