Giter Club home page Giter Club logo

Comments (8)

juftin avatar juftin commented on May 24, 2024 1

Confirmed, virtual will leave dependencies behind and not uninstall them.

Yeah, I'll go ahead and make pip the default, keeping the ability for pip-sync. The plugin is called hatch-pip-compile and not hatch-pip-compile-pip-sync so I don't think it warrants a breaking change.

I'm thinking of pip-compile-installer as the config option

from hatch-pip-compile.

oprypin avatar oprypin commented on May 24, 2024

Yeah I've never used pip-sync.
How does Hatch handle this in virtual environments? Does it uninstall anything?

from hatch-pip-compile.

juftin avatar juftin commented on May 24, 2024

Yeah I've never used pip-sync. How does Hatch handle this in virtual environments? Does it uninstall anything?

pip-sync is the other side of pip-compile but I haven't used it much before either. Yeah - it uninstalls everything not on the lockfile. This is also the reason why the plugin has to go through the extra step of reinstalling the project in dev mode, pip-sync uninstalls that too.

from hatch-pip-compile.

juftin avatar juftin commented on May 24, 2024

How does Hatch handle this in virtual environments? Does it uninstall anything?

Oh, I see what you were asking before.

I don't think so - as far as I know it never performs an uninstall it just iterates through the dependencies attribute and requests a pip install if that dependency isn't detected in the environment

from hatch-pip-compile.

oprypin avatar oprypin commented on May 24, 2024

If so, sounds like pip-sync could be just dropped ¯\_(ツ)_/¯

Or make it be the opt-in

from hatch-pip-compile.

oprypin avatar oprypin commented on May 24, 2024

Meanwhile...
I got some totally bizarre interaction with uninstalling.

oprypin/mkdocs@28e19f3
->
https://github.com/oprypin/mkdocs/actions/runs/7076610215/job/19260039359

I have this:

[tool.hatch.envs.docs]
type = "pip-compile"
pip-compile-hashes = false
dependencies = [
   ...
]

[tool.hatch.envs.integration]
template = "docs"

I don't know why but it attempts to uninstall Hatch! And this fails only on Windows because only Windows cares that the process is trying to uninstall itself.

I actually realized one big problem with my setup that I just need to fix - for the integration env I intended to use the requirements file of the docs env, but actually it's still computed dynamically, so the lock file is missing. But why, if the lock file is missing, is it trying to uninstall Hatch?

from hatch-pip-compile.

juftin avatar juftin commented on May 24, 2024

Yeah, that is bizarre. It seems to me like pip-sync is pointed at an empty lockfile and not a non-existent lockfile. When you run pip-sync on an empty lockfile it basically uninstalls the whole environment.

I wonder if there is something different going on in windows where it escapes the virtual environment differently than macOS / Linux

from hatch-pip-compile.

juftin avatar juftin commented on May 24, 2024

🎉 This issue has been resolved in version 1.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

from hatch-pip-compile.

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.