Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed error on unspecified output to warning #445

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

evur
Copy link

@evur evur commented Jan 4, 2022

This changes "tup error: File '%s' was written to, but is not in .tup/db. You probably should specify it as an output" into a warning and adds a configuration option to disable it "display.unspecified_output_warnings".

Why?

Fixes #113 and fixes #182

@evur evur marked this pull request as draft January 4, 2022 16:45
@evur evur marked this pull request as ready for review January 4, 2022 19:01
@gittup
Copy link
Owner

gittup commented Jan 29, 2022

Thanks for taking a look at this. However, I think your approach would disable a very valuable safety check in tup that prevents subprocesses from writing to files that aren't intended to be written to. It would be too easy to miss the warning message in a long build log, and then potentially have issues with incremental updates with the unspecified file.

For issues like #182, you can tell a rule to ignore specific files with the ^ marker in the outputs section of a rule (which matches on a pattern). See the "outputs" section under the ":" rule in the TUPFILES section of the man page for more information. This can be used to ignore writes to cache directories, compiler licenses, etc. This is a more targeted and explicit approach to tell tup to ignore specific files, rather than ignoring a whole class of potential errors.

Does that make sense? What program are you using that you're having an issue with?

@Beiri22
Copy link

Beiri22 commented Jul 30, 2023

I'm not the issuer, but like to ask. I would like to generate pngs out of a pdf file in the first step; later using this files in subsequent calls. The generated files will have a strict naming schema file{n}.png. As far as I understand, my use case is not realizable with tup, correct?

1.) pdf => some png files
2.) compile some file that uses all those png files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants