Git Product home page Git Product logo

Comments (3)

mtkennerly avatar mtkennerly commented on June 11, 2024 1

I may revisit this in the future, but I'm still a bit hesitant about this one. For now, I'm introducing a general purpose env var for debug logging, which covers this case and could be expanded to others:

$ POETRY_DYNAMIC_VERSIONING_DEBUG=1 poetry build
No files found for substitution with glob '*.py' in folder 'C:\git\poetry-dynamic-versioning\tests\dependency-dynamic'
No files found for substitution with glob '*/__version__.py' in folder 'C:\git\poetry-dynamic-versioning\tests\dependency-dynamic'
No files found for substitution with glob '*/_version.py' in folder 'C:\git\poetry-dynamic-versioning\tests\dependency-dynamic'
No changes made during substitution in file 'C:\git\poetry-dynamic-versioning\tests\dependency-dynamic\dependency_dynamic\__init__.py'

from poetry-dynamic-versioning.

mtkennerly avatar mtkennerly commented on June 11, 2024

I've tried messing around with this a bit, but I'm not entirely satisfied with it.

  • Although the current default values do have wildcards, I could imagine having a non-wildcard default in the future.
  • Someone might copy/paste the same config in several projects. For example, they may put docs/conf.py in the plugin config in advance, even if they don't have that file yet in one of their projects.
  • On the other hand, something like */_versoin.py does have a wildcard, but deserves a warning.

The best option I could think of is enabling the warning when some environment variable is set. I don't mind adding that, but it's not as convenient as something automatic. Do you have any interest in this option for your use case?

from poetry-dynamic-versioning.

cmarqu avatar cmarqu commented on June 11, 2024

For the non-wildcard case (2nd item), I would say it's a matter of "don't do that then".
It's easy to either touch the docs/conf.py or comment out that line in the pyproject.toml if the warning is somehow breaking their build.

But if not automatic (which I would be fine with, it could be a breaking change for some of your users), instead of an environment variable which is not very discoverable, how about a setting in the pyproject.toml like on-version-substitution-fail = {"warn-non-wildcard", "warn-all", "error-non-wildcard", "error-all"}?

from poetry-dynamic-versioning.

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.