Giter VIP home page Giter VIP logo

diffing's Introduction

diffing

find strictDeps problems

point the NIXGITS env var to a directory containing a nixpkgs dir

That repo will be compared to the current dir you're in so make sure both are at the same rev

diffing ".#bash" will build bash in both repositories and then diff their outputs this is to allow you to make changes in my-nixpkgs and then run diffing again

usage

nix run "github:Artturin/diffing" ".#bash"

example of making a attrlist file

cat ./pkgs/top-level/all-packages.nix | rg "shells" | sort -hk1 | cut -f1 -d '=' | sed 's/  //' > attrlist

mass enabling strictDeps in a dependency tree

first i run

nix-diff $(nix eval --raw ".#bash.drvPath") $(nix eval --raw --expr 'with import ./. { config = { strictDepsByDefault = true; }; }; bash.drvPath' --impure)

then i pick derivations which don't already have strictDeps, for example

• The input derivation named `libffi-3.4.2` differs
  - /nix/store/0m0ijn5d1nh5mfxg5y687br7ywvqlw3b-libffi-3.4.2.drv:{dev,out}
  + /nix/store/pdab3mkc93a6llj9x3xakrx5bfv0nkm1-libffi-3.4.2.drv:{dev,out}
  • The environments do not match:
      strictDeps=1

then i put the attr in a attrlist file and run

diffing --file attrlist

and read through the whole diff and if it looks fine i enable strictDeps

diffing's People

Contributors

artturin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

diffing's Issues

diffoscope is missing from propagatedBuildInput

It seems that diffing.py tries to call diffoscope, but it is missing from the flake. As a temporary hack, I use nix-shell -p diffoscope to then run diffing flake.

$ nix run ../diffing ".#haskellPackages.safe-exceptions"
['haskellPackages.safe-exceptions']

-----------------------diffing output doc of haskellPackages.safe-exceptions------------------------
normal: /nix/store/5lgnxcs8p182j7k98k0h1vvvix6rd7zk-safe-exceptions-0.1.7.4-doc
strict: /nix/store/nh4r7wfis09hp2kdpxbzpvlzbznnm5il-safe-exceptions-0.1.7.4-doc

Traceback (most recent call last):
  File "/nix/store/ss27janw9d2p8kpk9pq1k8v963bf6a2p-diffing/bin/diffing", line 195, in <module>
    main()
  File "/nix/store/ss27janw9d2p8kpk9pq1k8v963bf6a2p-diffing/bin/diffing", line 189, in main
    subprocess.run(
  File "/nix/store/6b1fqdwb3g56j5pazv8zkx9qd0mv3wiz-python3-3.11.9/lib/python3.11/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/6b1fqdwb3g56j5pazv8zkx9qd0mv3wiz-python3-3.11.9/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/nix/store/6b1fqdwb3g56j5pazv8zkx9qd0mv3wiz-python3-3.11.9/lib/python3.11/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'diffoscope'

(thanks for sharing this cool tool!)

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.