question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hemmed in by unnecessary dependency removal in 3.3+

See original GitHub issue

I’m updating a dev environment and tried moving up to 3.3 from 3.2, but the unnecessary dependency removal feature is removing a required dependency of a private package added via overridesPre. My best-guess is that the dependencies of packages in overridesPre aren’t making it into the list of dependencies to preserve?

First, I’ll describe what we’ve been doing in 3.2.

We:

  1. have a runCommand that generates a filtered copy of our requirements with incompatible stuff like the --extra-index-url line removed.
  2. have a 2nd runCommand that finds the version of our private package specified in the filtered requirements.txt, fetches the private index, and looks up the url for this version.
  3. build the package by feeding this url to mach-nix.buildPythonPackage
  4. and include it in overridesPre

When we update to 3.3, we start seeing this early on in the build (followed by failures on missing dependencies later):

trace: 
 automatically detected pname: 'private_package'
trace: 
 automatically detected version: '1.2.23'
trace: 
 automatically detected requirements of private_package:1.2.23 22.05pre-git:
Flask
Flask-Cors
Flask-SQLAlchemy
SQLAlchemy
SQLAlchemy-Utils
mistletoe


trace: removing dependency python3.9-aiohttp-3.8.0 from black
... [ several more deps removed from black ] ...
trace: Updated inherited nixpkgs dep flask-script from 2.0.6 to 2.0.5
trace: removing dependency python3.9-nose-1.3.7 from flask-assets
trace: removing dependency python3.9-greenlet-1.1.2 from sqlalchemy
trace: Updated inherited nixpkgs dep flask from 2.0.1 to 1.0.4
trace: Updated inherited nixpkgs dep flask-cors from 3.0.10 to 3.0.10
trace: removing dependency python3.9-Flask-Cors-3.0.10 from private_package
trace: Updated inherited nixpkgs dep flask-sqlalchemy from 2.5.1 to 2.3.2
trace: Updated inherited nixpkgs dep mistletoe from 0.7.2 to 0.8.1
trace: removing dependency python3.9-mistletoe-0.8.1 from private_package
trace: Updated inherited nixpkgs dep sqlalchemy from 1.4.17 to 1.3.15
trace: Updated inherited nixpkgs dep sqlalchemy-utils from 0.37.6 to 0.37.6

I tried moving the package into packagesExtra, but it resolves the dependencies separately and ends up with conflicting versions of common dependencies:

error: collision between /nix/store/33789z8sgagf7kyag5nkw93n4rgfi7l6-python3.8-flask-1.1.2/bin/flask' and /nix/store/aicnwssf9v1alvxyp7qsg0h0fq66iqjb-python3.8-flask-1.0.4/bin/flask’

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
bjornforcommented, Jun 4, 2022

I started seeing errors like this (the segfault appears 2x):

I’ve noticed too, and did some bisecting, but haven’t found the time/energy to submit a (detailed) issue about it. (Apparently a setuptools upgrade in nixpkgs is causing this.)

1reaction
bjornforcommented, Jun 15, 2022

There’s an issue about that segfault now: https://github.com/DavHau/mach-nix/issues/467

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Hook useCallback has an unnecessary dependency ...
React Hook useCallback has an unnecessary dependency: 'price'. Either exclude it or remove the dependency array react-hooks/exhaustive-deps.
Read more >
Exhaustive dependency warning when using ... - GitHub
React Hook useMemo has an unnecessary dependency: 'sort'. Either exclude it or remove the dependency array. Outer scope values like 'sort' ...
Read more >
Pocket guide on hem flange bonding - Atlas Copco
If the leaked material is not removed this can lead to contamination not only of the hemming tools but also of the e-coating...
Read more >
A multi-method approach for the North Slope Borough, Alaska
Focusing on a widespread form of Arctic resource extraction, our paper speaks to many other remote, hydrocarbon-dependent jurisdictions.
Read more >
apt - Why isn't `auto-remove' removing all unnecessary ...
I just installed a package ( dansguardian in this case) and apt told me that I had unmet dependencies. # sudo apt-get install...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found