-
Notifications
You must be signed in to change notification settings - Fork 268
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
"path '/devenv.nix' does not exist in Git repository" when ignored by git #1078
Comments
For now it would be enough for me to be able to downgrade to an older devenv version, but I did not find a simple way to do that. Edit: I downgraded to 0.6.3 using |
Hmmm, I'll look into this. |
I'm also seeing this, as I also frequently use devenv to work on customer, internal, and oss repositories that don't track devenv files. My ignore solution is a bit simpler though; it's just a global gitignorefile tracked by my dotfiles that I can include via > # if a repo isn't using devenv, just tell git to ignore its files
> git config --local --set core.excludesfile ~/.devenv.gitignore # file: ~/.devenv.gitignore
# Devenv
.devenv*
devenv.local.nix
# direnv
.direnv
.envrc
devenv.lock
devenv.nix
devenv.yaml |
@domenkozar this is still occurring in 1.0.4 |
I tested recently released 1.0.5 and it fixes the issue, please someone
confirm using https://github.com/cachix/devenv/releases/tag/v1.0.5
…On Sat, Apr 20, 2024 at 8:24 PM Todd Brown ***@***.***> wrote:
@domenkozar <https://github.com/domenkozar> this is still occurring in
1.0.4
image.png (view on web)
<https://github.com/cachix/devenv/assets/18373623/d123d8a0-c76e-4ce8-86ab-b1ebd18846bb>
—
Reply to this email directly, view it on GitHub
<#1078 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA63A3ONIUYI6RWTSGC7LDY6K6GNAVCNFSM6AAAAABFML7MZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXG43DCNRRHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It seems like 1.0.5 does allow For instance, I have a python project that needs a more recent version of poetry than what is on the 1: (sourced from the nixpkgs repo) { pkgs, ... }:
let
poetry-latest = pkgs.callPackage .nix-custom/poetry/default.nix { };
in
{
... # other options
languages.python = {
enable = true;
version = "3.11.6";
poetry = {
enable = true;
package = poetry-latest;
activate.enable = true;
};
};
}
> devenv version
devenv 1.0.5 (x86_64-linux)
> # devenv was installed with:
> nix profile install --accept-flake-config 'tarball+https://github.com/cachix/devenv/tarball/v1.0.5' |
It's a tricky thing, since obviously I'm circumventing a reproducible environment by having ignored nix modules, but I'm the only one in this repository using nix; so I'm keeping it to myself. I have a solution I posted above, where I just run I can totally understand if devenv chooses to keep this behaviour / wontfix, since the whole idea is to make a reproducible environment - and the problem of users like me importing unversioned modules are totally circumventing that. It would be nice if that was a warning instead of an error though :) |
This fixed the issue for me. Thanks! |
Describe the bug
After upgrading to from < 1 to 1.0.2 I started getting the error
path '/devenv.nix' does not exist in Git repository
Context
As I work in a constrained environment, I can not add any devenv related files into our git repositories. I am using an envelope project that syncs the devenv config files into the respective project directories:
> tree envelope envelope ├── devenv │ ├── repo-1 │ │ ├── devenv.nix │ │ └── devenv.yaml │ └── repo-2 │ ├── devenv.nix │ └── devenv.yaml ├── repo-1 │ └── ... ├── repo-2 └── ...
The devenv specific files are ignored by git not using the normal
.gitignore
but instead using the repo local.git/info/exclude
file:To reproduce
Version
devenv 1.0.2 (x86_64-darwin)
The text was updated successfully, but these errors were encountered: