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

Warning: Failed to upgrade ../ReadRealTimeWriteCSV/ using nix profile upgrade: ../ReadRealTimeWriteCSV/: package not found #2056

Open
josephwinston opened this issue May 15, 2024 · 2 comments
Assignees
Labels
bug Something isn't working triage Issue needs triage

Comments

@josephwinston
Copy link

What happened?

Using Devbox 0.10.7 and the command upgrade now produces this new warning on WSL2

Steps to reproduce

  1. Have custom flake being built as:
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    nuget-packageslock2nix = {
      url = "github:mdarocha/nuget-packageslock2nix/main";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { nixpkgs, nuget-packageslock2nix, ... }: {
    packages.x86_64-linux.default =
      let
        pkgs = import nixpkgs { system = "x86_64-linux"; };
        dotnet-sdk = pkgs.dotnetCorePackages.sdk_8_0;
        dotnet-aspnetcore = pkgs.dotnetCorePackages.aspnetcore_8_0;
        dotnet-runtime = pkgs.dotnetCorePackages.runtime_8_0;
      in
      pkgs.buildDotnetModule {
          dotnet-runtime = dotnet-runtime;
          dotnet-sdk = dotnet-sdk;
          dotnet-aspnetcore = dotnet-aspnetcore;

        pname = "ReadRealTimeWriteCSV";
        version = "0.0.1";
        src = ./ReadRealTimeWriteCSV;
        nugetDeps = nuget-packageslock2nix.lib {
          system = "x86_64-linux";
          name = "ReadRealTimeWriteCSV";
          lockfiles = [
            ./ReadRealTimeWriteCSV/packages.lock.json
          ];
        };
      };

      formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;

      devShells.x86_64-linux.default = let
        pkgs = import nixpkgs { system = "x86_64-linux"; };
      in
      pkgs.mkShell {
        buildInputs = with pkgs; [
          dotnet-sdk_8
        ];
      };
  };
}
  1. Added flake using devbox add path:../ReadRealTimeWriteCSV
  2. devbox update reports the new warning

Command

No response

devbox.json

{
  "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.10.6/.schema/devbox.schema.json",
  "packages": [
    "../ReadCSVWriteRealTime/",
    "path",
    "../WriteInputCSV/",
    "../ReadRealTimeWriteCSV/",
    "dos2unix@latest"
  ],
  "shell": {
    "init_hook": [
      "echo 'Welcome to devbox!' > /dev/null"
    ],
    "scripts": {
      "test": [
        "echo \"Error: no test specified\" && exit 1"
      ]
    }
  }
}


### Devbox version

0.10.7

### Nix version

nix (Nix) 2.17.1

### What system does this bug occur on?

Other (please include in the description above)

### Debug logs

_No response_
@josephwinston josephwinston added bug Something isn't working triage Issue needs triage labels May 15, 2024
@Lagoja Lagoja self-assigned this May 16, 2024
@Lagoja
Copy link
Contributor

Lagoja commented May 16, 2024

Is the devbox.json in this formatted correctly? It should be something like

  "packages": [
    "path:../ReadCSVWriteRealTime/",
    "path:../WriteInputCSV/",
    "path:../ReadRealTimeWriteCSV/",
    "dos2unix@latest"
  ],

The error message is saying that it can't find that package, most likely because ../ReadCSVWriteRealTime/ is not a valid Flake reference. Formatting it as above should fix the package not found error

@josephwinston
Copy link
Author

I agree the devbox.json isn't correct. I'm not in the habit of editing the file by hand, but did it this time to match your example:

  "packages": [
      "path:../ReadCSVWriteRealTime/",
      "path:../WriteInputCSV/",
      "path:../ReadRealTimeWriteCSV/",
    "dos2unix@latest"
  ],

I still have the issue:

Info: Attempting to upgrade path:../ReadCSVWriteRealTime/ using `nix profile upgrade`
Warning: Failed to upgrade path:../ReadCSVWriteRealTime/ using `nix profile upgrade`: path:../ReadCSVWriteRealTime/: package not found
Info: Attempting to upgrade path:../WriteInputCSV/ using `nix profile upgrade`
Warning: Failed to upgrade path:../WriteInputCSV/ using `nix profile upgrade`: path:../WriteInputCSV/: package not found
Info: Attempting to upgrade path:../ReadRealTimeWriteCSV/ using `nix profile upgrade`
Warning: Failed to upgrade path:../ReadRealTimeWriteCSV/ using `nix profile upgrade`: path:../ReadRealTimeWriteCSV/: package not found
Info: Already up-to-date dos2unix@latest 7.5.2
Info: Installing the following packages to the nix store: path:../ReadCSVWriteRealTime/, path:../WriteInputCSV/, path:../ReadRealTimeWriteCSV/, dos2unix@latest
Info: Running "nix flake update"
$ ls ../ReadCSVWriteRealTime/flake*
../ReadCSVWriteRealTime/flake.lock  ../ReadCSVWriteRealTime/flake.nix
$ ls ../WriteInputCSV/flake*
../WriteInputCSV/flake.lock  ../WriteInputCSV/flake.nix
$ ls ../ReadRealTimeWriteCSV/flake*
../ReadRealTimeWriteCSV/flake.lock  ../ReadRealTimeWriteCSV/flake.nix  ../ReadRealTimeWriteCSV/flake.nix~
josephwinston@LT-0061:~/work/StasisDrilling/FieldTrials/Tests/Exercise$

the good news is that everything works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Issue needs triage
Development

No branches or pull requests

2 participants