Giter Club home page Giter Club logo

Comments (8)

DavHau avatar DavHau commented on July 4, 2024

Please provide a flake or repo that allows me to easily re-produce the issue. Thanks.

from dream2nix.

tgunnoe avatar tgunnoe commented on July 4, 2024

@DavHau, sorry about that. Here's a minimal i tried to come up with.

  {
    inputs.dream2nix.url = "github:nix-community/dream2nix";
    inputs.src.url = "github:tgunnoe/dream2nix-peerDependencies-test";
    inputs.src.flake = false;
    outputs = { self, dream2nix, src }@inputs:
      let
        dream2nix = inputs.dream2nix.lib.init {
          systems = [ "x86_64-linux" ];
          config.projectRoot = ./. ;
        };
      in dream2nix.makeFlakeOutputs {
        source = src;
      };
  }

from dream2nix.

DavHau avatar DavHau commented on July 4, 2024

Hey, thanks for providing the flake. I tried building all packages and there doesn't seem to be an eval error. Could you verify?
Was it maybe fixed in the meantime?

from dream2nix.

tgunnoe avatar tgunnoe commented on July 4, 2024

Still seems broken to me.

After updating to latest dream2nix, I did a build of the main package:
nix build '.#ethers'

from dream2nix.

DavHau avatar DavHau commented on July 4, 2024

Oh sorry, I confused the flakes. My bad. Now I see the issue.
Hm, I think that yarn does not install peer deps at all by default and that is the reason it cannot be found in the yarn.lock.
I think we should skip peer deps by default. If a peer dep is required for development, then it should be listed under devDependencies in package.json as well as under peerDependencies.

from dream2nix.

tgunnoe avatar tgunnoe commented on July 4, 2024

I think that yarn does not install peer deps at all by default and that is the reason it cannot be found in the yarn.lock

that's how it is for yarn v1 anyways. IIRC there are options for missing peerDependencies in v2.

I confirm this changing it to a peer dependency and running yarn:

  -ethers@^5.0.1, ethers@^5.0.2, ethers@^5.5.2:
  +ethers@^5, ethers@^5.0.1, ethers@^5.0.2, ethers@^5.5.2:

I think we should skip peer deps by default.

Sounds good to me. That would have been an easier way for me to solve it. But I'm not sure how you would want to make a config option for it, if any.

from dream2nix.

DavHau avatar DavHau commented on July 4, 2024

We don't need to have an option. If a peer dep is required for development, then the user can just add it to the devDependencies and done. Right?

from dream2nix.

tgunnoe avatar tgunnoe commented on July 4, 2024

Oh yes, I misunderstood you with "skip peer deps by default".

Sounds good.

from dream2nix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.