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.

Add option to ignore VCSError

See original GitHub issue

While in development, I want o be able to run flit build before commiting and adding files to my github repo.

if I do that I get

$ flit build
flit.common.VCSError: Untracked or deleted files in the source directory. Commit, undo or ignore these files in your VCS. (.)

I want to be able to do:

$ flit build dev
#or
$ flit build --novcs

So I can test my builds before commiting

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:5
  • Comments:21 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
miccolicommented, Dec 15, 2019

I understand the flit approach this way:

  • use the index to decide what has to be included in sdist, but build against the working tree.

With respect to this approach we have three different cases

  1. files in the index but missing in the working tree. This is an error, since I’m instructing flit to add to the sdist a non-existing file.

  2. files in the working tree but not in the index. This should be a warning, and those files should not be included in the sdist

  3. files in the working tree modified with respect to the index. This should be a warning, since I’m building (and possibly publishing) a version which is not yet consolidated under VCS.

Currently for flit, 1. and 2. are an error and 3. is ignored.

My suggestion: make 2, and 3 warnings, and add a way for silencing them, something like export FLITVCSUNTRACKED=ignore and export FLITVCSMODIFIED=ignore, on the line of PYTHONWARNINGS

Finally, regarding your suggestion about a scratch directory: I think that it is a bit intrusive from flit to dictate how I should organise my working tree, and where and when I have to put/commit my files. If my VCS hygiene is not up to the flit standard, I would kindly accept a suggestion (i.e. a warning) but the fact that flit refuses to work, without a compelling reason, in my personal setup, is a great annoyance.

But again, this is just my personal view, so thank you for your comments.

1reaction
takluyvercommented, Dec 14, 2019

By default, the source dist includes everything that’s tracked in your VCS under the folder containing pyproject.toml. So it gives this error because it doesn’t know whether the files should be included in the sdist or not.

Since Flit 2, you can include & exclude files in the config file (https://flit.readthedocs.io/en/latest/pyproject_toml.html#sdist-section ). So you could have a scratch/ subfolder and put it in the exclude list. But you could also add it to .gitignore, which should have the same result.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add option to ignore VCSError · Issue #133 · pypa/flit - GitHub
The idea is that you need to make a positive decision on which files belong in the sdist. Since I'm trying to avoid...
Read more >
VCS/VCSi User Guide
Tells VCS to ignore timing check system tasks when it compiles your design. This option can moderately improve simulation performance.
Read more >
Missing "Ignore" option in VCS window - Stack Overflow
In version 2019.2, Rider's VCS client was updated so that you can now ignore files using the native Git mechanism of .gitignore files....
Read more >
Samuel Colvin on Twitter: "@anthonycorletti hatch/hatchling was ...
Add option to ignore VCSError · Issue #133 · pypa/flit. While in development, I want o be able to run flit build before...
Read more >
Discovery Visual Environment User Guide
it adds simulation line stepping and allows you to track the ... In the Signal types and ignore options section, select the signal....
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