Giter Club home page Giter Club logo

Comments (9)

floatingpurr avatar floatingpurr commented on May 29, 2024

Thank you @real-yfprojects for your notice. It looks like that poetry 1.5.0 relies on poetry-core 1.6.0 that deprecates Package.category.

I'm not using the newer versions of Poetry on a daily basis. AFAIU from the doc, now there's no way to infer whether the dependency is a "dev dependency" or not from the lock file. Now, this kind of info is managed by dependency groups in the toml file (I guess this holds since poetry 1.2.0).

As per the doc of poetry 1.5.0:

Poetry will slowly transition away from the dev-dependencies notation which will soon be deprecated, so it’s advised to migrate your existing development dependencies to the new group notation.

I'm open to discussions (and contributions) about it.

from sync_with_poetry.

real-yfprojects avatar real-yfprojects commented on May 29, 2024

AFAIU from the doc, now there's no way to infer whether the dependency is a "dev dependency" or not from the lock file.

Why do you need that in the first place?

from sync_with_poetry.

floatingpurr avatar floatingpurr commented on May 29, 2024

There's no hard need. It is just the current way used by swp to check if a package is a "dev dependency". The newer versions of poetry rely on the broader concept of dependency groups. The dependency group of each package has been abstracted away from poetry.lock. That's correct, IMO. However, this changes how this package has to check the dependency type.

from sync_with_poetry.

real-yfprojects avatar real-yfprojects commented on May 29, 2024

I mean why do you differentiate between dev and non dev dependencies? If it is used in .pre-commit-config.yaml it should be synced with poetry no matter what.

from sync_with_poetry.

floatingpurr avatar floatingpurr commented on May 29, 2024

Oh, I'm sorry, I didn't get your question.

I introduced the --all option at the very beginning of the story of this package. It was supposed to be just a kind of a little optimization for going through the collection of PreCommitRepo objects. Indeed, in most cases, .pre-commit is used only with dev packages. Usually, your business packages are not part of the pre-commit process. But this is not a relevant (or even a good) design, even more so now with these changes introduced in poetry.

You are right, the quickest fix could by simply considering poetry.lock as a whole, without caring anymore about the package type.

from sync_with_poetry.

floatingpurr avatar floatingpurr commented on May 29, 2024

New release brach tracked in #27.

from sync_with_poetry.

real-yfprojects avatar real-yfprojects commented on May 29, 2024

πŸ‘ Thanks. I can do a quick review later this week if you like.

from sync_with_poetry.

floatingpurr avatar floatingpurr commented on May 29, 2024

from sync_with_poetry.

floatingpurr avatar floatingpurr commented on May 29, 2024

Ok, the fix is ready to ship, baked in version 1.0.0.

from sync_with_poetry.

Related Issues (9)

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.